/*
Theme Name: CONRE-1 Theme
Description: Tema WordPress completo para o Conselho Regional de Estatística da 1ª Região. Inclui homepage dinâmica, sistema de usuários, boletos e layouts configuráveis.
Author: Desenvolvido para CONRE-1
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: conre1-theme
*/

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    position: absolute;
    left: 6px;
    top: 7px;
    z-index: 999999;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    text-decoration: none;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.top-bar a:hover {
    color: #ccc;
}

.top-info-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-info-menu li {
    margin-right: 1rem;
}

.social-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
}

.logo-img {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 500px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.carousel {
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: relative;
    min-height: 500px;
    width: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 800px;
}

/* Services Section */
.services-section {
    background: #f8f9fa;
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.service-icon {
    margin-bottom: 1rem;
}

.service-title {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1em;
}

/* About Section */
.about-section {
    background: #fff;
}

.about-image img {
    border-radius: 0.5rem;
}

/* CTA Section */
.cta-section {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #f8f9fa;
}

.cta-content {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.cta-content > * {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-item {
    margin-bottom: 0;
}

.cta-item .btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Testimonials Section */
.testimonials-section {
    background: #fff;
}

.testimonial-card {
    transition: transform 0.3s ease;
    border: 1px solid #e9ecef;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

.testimonial-content {
    font-style: italic;
}

.author-image img {
    border-radius: 50%;
}

/* Blog Section */
.blog-section {
    background: #f8f9fa;
}

.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.blog-title a {
    color: #333;
    text-decoration: none;
}

.blog-title a:hover {
    color: #0d6efd;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    padding: 4rem 0;
}

.page-title {
    margin-bottom: 1rem;
}

.page-description {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-item.active {
    color: #fff;
}

/* Content Sections */
.section-padding {
    padding: 4rem 0;
}

.page-content {
    margin-bottom: 2rem;
}

.entry-content {
    line-height: 1.8;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

/* Sidebar */
.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}

.widget-title {
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0d6efd;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #666;
    text-decoration: none;
}

.widget ul li a:hover {
    color: #0d6efd;
}

/* Footer */
.site-footer {
    margin-top: auto;
}

.footer-widgets {
    background: #343a40;
}

.footer-widget-title {
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-widget p {
    color: #adb5bd;
    line-height: 1.6;
}

.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #fff;
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    color: #adb5bd;
    margin-bottom: 0.75rem;
}

.contact-info i {
    color: #0d6efd;
    width: 20px;
}

.footer-social .social-link {
    background: rgba(255, 255, 255, 0.1);
    margin-right: 0.5rem;
}

.footer-bottom {
    background: #212529;
}

.copyright {
    font-size: 0.875rem;
}

.footer-links a {
    font-size: 0.875rem;
}

/* Newsletter Form */
.newsletter-form .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Comments */
.comments-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
}

/* Page Links */
.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.page-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: #f8f9fa;
    color: #0d6efd;
    text-decoration: none;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

.page-links a:hover {
    background: #0d6efd;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }
    
    .carousel-item {
        min-height: 400px;
    }
    
    .carousel-caption {
        padding: 1rem;
        width: 95%;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .top-bar {
        font-size: 0.75rem;
    }
    
    .top-bar .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .carousel-caption {
        position: static;
        transform: none;
        background: rgba(0, 0, 0, 0.7);
        margin-top: -100px;
        z-index: 3;
    }
}

/* Utility Classes */
.text-primary {
    color: #0d6efd !important;
}

.bg-primary {
    background-color: #0d6efd !important;
}

.border-primary {
    border-color: #0d6efd !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .site-header,
    .site-footer,
    .btn,
    .social-link {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}


/* Documents Section */
.documents-section {
    background: #f8f9fa;
}

.document-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.document-icon {
    margin-bottom: 1rem;
}

.document-title {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1em;
}

.document-meta .badge {
    font-size: 0.75em;
}

/* Statistics Section */
.statistics-section {
    background: #fff;
}

.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    margin-bottom: 1rem;
}

.stat-number {
    margin-bottom: 1rem;
}

.counter {
    display: inline-block;
}

.stat-title {
    color: #333;
    margin-bottom: 1rem;
}

.stat-description {
    font-size: 0.9em;
}

/* FAQ Section */
.faq-section {
    background: #f8f9fa;
}

.accordion-button {
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Partners Section */
.partners-section {
    background: #fff;
}

.partner-card {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.partner-card:hover {
    transform: scale(1.05);
}

.partner-logo {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%);
}

.partner-placeholder {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Events Section */
.events-section {
    background: #f8f9fa;
}

.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.event-date {
    border-left: 3px solid #0d6efd;
    padding-left: 0.5rem;
}

.event-title {
    color: #333;
    margin-bottom: 1rem;
}

.event-meta {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.event-location,
.event-price {
    margin-bottom: 0.5rem;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter.animated {
    animation: countUp 0.6s ease-out;
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.fade-in-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease-out;
}

.fade-in-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced Hover Effects */
.service-card,
.blog-card,
.testimonial-card,
.document-card,
.event-card {
    position: relative;
    overflow: hidden;
}

.service-card::before,
.blog-card::before,
.testimonial-card::before,
.document-card::before,
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.service-card:hover::before,
.blog-card:hover::before,
.testimonial-card:hover::before,
.document-card:hover::before,
.event-card:hover::before {
    left: 100%;
}

.service-card > *,
.blog-card > *,
.testimonial-card > *,
.document-card > *,
.event-card > * {
    position: relative;
    z-index: 2;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Improved Responsive Design */
@media (max-width: 992px) {
    .cta-section {
        margin-left: calc(-50vw + 50%);
        width: 100vw;
    }
    
    .stat-number .display-4 {
        font-size: 2.5rem;
    }
    
    .partner-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .cta-content {
        padding: 3rem 1rem !important;
    }
    
    .stat-number .display-4 {
        font-size: 2rem;
    }
    
    .document-card,
    .event-card {
        margin-bottom: 1.5rem;
    }
    
    .accordion-button {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .cta-content {
        padding: 2rem 1rem !important;
    }
    
    .cta-title {
        font-size: 1.75rem !important;
    }
    
    .stat-number .display-4 {
        font-size: 1.5rem;
    }
    
    .partner-logo {
        max-height: 60px !important;
    }
    
    .event-card .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .document-card,
    .event-card,
    .partner-placeholder {
        background-color: #2d3748 !important;
        color: #e2e8f0 !important;
        border-color: #4a5568 !important;
    }
    
    .stat-title,
    .event-title,
    .document-title {
        color: #e2e8f0 !important;
    }
    
    .accordion-button:not(.collapsed) {
        background-color: #2d3748 !important;
        color: #63b3ed !important;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 6px;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.accordion-button:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .service-card,
    .blog-card,
    .testimonial-card,
    .document-card,
    .event-card {
        border: 2px solid #000 !important;
    }
    
    .btn-primary {
        background-color: #000 !important;
        border-color: #000 !important;
    }
    
    .btn-outline-primary {
        color: #000 !important;
        border-color: #000 !important;
    }
}

