/* assets/css/modern-theme.css */

:root {
    /* Base Variables (Light Mode Default) */
    --theme-bg-light: #F9FAFB;
    --theme-text-primary: #111827;
    --theme-text-secondary: #4B5563;
    --theme-primary: #1E3A8A;
    /* Azul Institucional */
    --theme-primary-hover: #1e40af;
    --theme-accent: #F97316;
    /* Laranja Ação */
    --theme-card-bg: #FFFFFF;
    --theme-border: #E5E7EB;
    --theme-input-bg: #FAFAFA;
    --theme-radius: 16px;
    --theme-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --theme-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode Variables Override */
[data-theme="dark"] {
    --theme-bg-light: #111827;
    --theme-text-primary: #F3F4F6;
    --theme-text-secondary: #9CA3AF;
    --theme-primary: #3B82F6;
    /* Lighter blue for dark mode */
    --theme-primary-hover: #2563EB;
    --theme-card-bg: #1F2937;
    --theme-border: #374151;
    --theme-input-bg: #374151;
    --theme-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18);
    --theme-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Typography Enhancements */
body {
    background-color: var(--theme-bg-light);
    color: var(--theme-text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
    color: var(--theme-text-primary);
}

/* Modern Hero Global */
.hero-modern {
    padding: 5rem 0 4rem;
    position: relative;
    background-color: var(--theme-bg-light);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(30, 58, 138, 0.1);
    color: var(--theme-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-badge {
    background-color: rgba(59, 130, 246, 0.15);
}

.hero-title-large {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--theme-primary), #2563EB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-title-large {
    background: linear-gradient(to right, #60A5FA, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .hero-title-large {
        font-size: 2.5rem;
    }
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--theme-text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Modern Card Global */
.card-modern {
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    /* Use variable */
    border-radius: var(--theme-radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--theme-shadow);
    height: 100%;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--theme-shadow-hover);
}

.card-modern-img-wrapper a {
    position: absolute !important;
    inset: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.card-modern-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background-color: #000;
}

.card-modern-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.card-modern:hover .card-modern-img {
    transform: scale(1.05);
}

.card-modern-body {
    padding: 1.5rem;
}

.card-modern-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-modern-title a {
    color: var(--theme-text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.card-modern-title a:hover {
    color: var(--theme-primary);
}

/* Forms Modern */
.form-modern-control {
    border: 2px solid var(--theme-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    width: 100%;
    transition: all 0.2s;
    background-color: var(--theme-input-bg);
    color: var(--theme-text-primary);
}

.form-modern-control:focus {
    border-color: var(--theme-primary);
    background-color: var(--theme-card-bg);
    /* Slightly distinct on focus */
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

[data-theme="dark"] .form-modern-control:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}


/* Stats Modern */
.stat-modern-card {
    background: var(--theme-card-bg);
    padding: 2rem;
    border-radius: var(--theme-radius);
    text-align: center;
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
    height: 100%;
    transition: transform 0.3s ease, background-color 0.3s;
}

.stat-modern-card:hover {
    transform: translateY(-5px);
}

.stat-modern-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--theme-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-modern-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Post Reading Layout */
.post-reading-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-color: var(--theme-primary);
    display: flex;
    align-items: center;
    color: white;
}

.post-reading-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    mix-blend-mode: overlay;
}

/* Feature Box Modern */
.feature-modern {
    padding: 2rem;
    border-radius: var(--theme-radius);
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    /* Explicit border for dark mode depth */
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--theme-shadow);
}

/* Light mode specific gradient fallback if desired, or keep flat clean */
[data-theme="light"] .feature-modern {
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    border-color: transparent;
    /* Gradient acts as bg */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .feature-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}


.feature-modern-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(30, 58, 138, 0.1);
    color: var(--theme-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .feature-modern-icon {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

/* Filter Chips Modern */
.filter-container {
    padding: 0.5rem;
    background: var(--theme-card-bg);
    border-radius: 50px;
    display: inline-flex;
    gap: 0.5rem;
    box-shadow: var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.filter-chip {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--theme-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.filter-chip:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--theme-text-primary);
}

.filter-chip.active {
    background-color: var(--theme-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.25);
}

[data-theme="dark"] .filter-chip:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

[data-theme="dark"] .filter-chip.active {
    background-color: var(--theme-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}


/* General Dark Mode Utility Fixes */
[data-theme="dark"] .bg-light {
    background-color: #1F2937 !important;
    /* bg-gray-800 */
}

[data-theme="dark"] .bg-white {
    background-color: #111827 !important;
    /* bg-gray-900 */
}

[data-theme="dark"] .text-muted {
    color: #9CA3AF !important;
    /* text-gray-400 */
}

[data-theme="dark"] .text-dark {
    color: #F3F4F6 !important;
    /* text-gray-100 */
}

/* Contact Page Specifics */
[data-theme="dark"] .card-modern .bg-light {
    background-color: #1a202c !important;
    /* Slightly darker than card for contrast */
}

/* Accordion Dark Mode */
[data-theme="dark"] .accordion-button {
    background-color: var(--theme-card-bg);
    color: var(--theme-text-primary);
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--theme-primary);
}

[data-theme="dark"] .accordion-item {
    background-color: transparent;
    border-color: var(--theme-border);
}

/* Footer Dark Mode Compatibility */
[data-theme="dark"] footer.bg-light {
    background-color: #111827 !important;
    border-top: 1px solid var(--theme-border);
}

/* Table Dark Mode */

/* Footer Styles Override */
.footer h3 {
    color: #ffffff !important;
}