/* ========================================
   Modern Theme - Light & Dark Mode Support
   Following best practices from Medium, Dev.to, Hashnode
   ======================================== */

:root {
    /* Light Theme Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-html: #eaeaea;
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    /* Border Colors */
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Interactive States */
    --hover-bg: #f1f5f9;
    --active-bg: #e2e8f0;
    
    /* Navbar */
    --navbar-bg: #576be2;
    --navbar-border: rgba(87, 107, 226, 0.3);
    --navbar-text: #ffffff;
    
    /* Footer */
    --footer-bg: #0f172a;
    --footer-text: #cbd5e1;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary: #99c3ff;
    --primary-hover: #b3d4ff;
    --secondary: #c4b5fd;
    --accent: #f9a8d4;
    
    /* Backgrounds - Customizados */
    --bg-primary: #1f1f1f;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #353535;
    --bg-elevated: #252525;
    
    /* Text Colors - Customizados */
    --text-primary: #bfbfbf;
    --text-secondary: #bfbfbf;
    --text-tertiary: #999999;
    --title-primary: #dadce0;
    --title-secondary: #dadce0;
    
    /* Border Colors */
    --border-primary: #323232;
    --border-secondary: #323232;
    
    /* Shadows - Mais intensas no dark mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.7);
    
    /* Interactive States */
    --hover-bg: #2f2f2f;
    --active-bg: #3a3a3a;
    
    /* Navbar */
    --navbar-bg: #576be2;
    --navbar-border: rgba(87, 107, 226, 0.3);
    
    /* Footer */
    --footer-bg: #171717;
    --footer-text: #cbd5e1;
}

/* ========================================
   Base Styles
   ======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: #eaeaea;
}

body {
    background-color: #ffffff;
    color: var(--text-primary);
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 16px;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
    color: #bfbfbf;
    background-color: #1f1f1f;
}

[data-theme="dark"] html {
    background-color: #1f1f1f;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

* {
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Exceção crítica: Font Awesome 6 precisa de suas próprias fontes */
.fa,
.fas,
.far,
.fal,
.fat,
.fad,
.fab,
.fa-solid,
.fa-regular,
.fa-light,
.fa-thin,
.fa-duotone,
.fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

/* Font Awesome 6 específico para ícones sólidos */
.fa-solid,
.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Font Awesome 6 específico para ícones regulares */
.fa-regular,
.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Font Awesome 6 específico para marcas */
.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Compatibilidade com Font Awesome 4 (classes antigas .fa) */
.fa:not(.fa-solid):not(.fa-regular):not(.fa-brands) {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #dadce0;
}

[data-theme="dark"] .card-header h5,
[data-theme="dark"] .card-title {
    color: #dadce0;
}

/* Links dentro de títulos devem seguir a cor dos títulos */
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
    color: inherit !important;
    text-decoration: none;
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover {
    color: var(--primary) !important;
    text-decoration: none;
}

[data-theme="dark"] h1 a:hover,
[data-theme="dark"] h2 a:hover,
[data-theme="dark"] h3 a:hover,
[data-theme="dark"] h4 a:hover,
[data-theme="dark"] h5 a:hover,
[data-theme="dark"] h6 a:hover {
    color: #99c3ff !important;
}

h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.3;
    text-transform: none;
}

h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-top: 20px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

[data-theme="dark"] p {
    color: #bfbfbf;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 400;
}

small {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

[data-theme="dark"] a {
    color: #99c3ff;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

[data-theme="dark"] a:hover {
    color: #b3d4ff;
}

/* ========================================
   Navbar - Modern Design
   ======================================== */

.navbar {
    background-color: var(--navbar-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--navbar-border);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar {
    background-color: #576be2 !important;
    border-bottom: 1px solid rgba(87, 107, 226, 0.3);
}

[data-theme="dark"] .navbar {
    background-color: #576be2 !important;
    border-bottom: 1px solid rgba(87, 107, 226, 0.3);
}

.navbar-brand {
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 700;
    font-size: 1.625rem;
    color: var(--text-primary) !important;
    transition: opacity 0.2s ease;
    letter-spacing: -0.01em;
}

.navbar-brand {
    color: #ffffff !important;
}

[data-theme="dark"] .navbar-brand {
    color: #ffffff !important;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-nav {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
}

.navbar-nav li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    margin: 0 0.5rem;
    padding-left: 0 !important;
}

.navbar-nav li::before,
.navbar-nav li::after {
    content: none !important;
    display: none !important;
}

.navbar-nav li::marker {
    content: none !important;
    display: none !important;
}

.navbar ul,
.navbar ul.navbar-nav {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.navbar ul li,
.navbar-nav > li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding-left: 0 !important;
}

/* Remove bullets de TODAS as listas dentro do navbar */
.navbar * {
    list-style: none !important;
}

.navbar li {
    list-style: none !important;
    list-style-type: none !important;
}

.navbar-nav a {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.navbar-nav a {
    color: #ffffff !important;
}

[data-theme="dark"] .navbar-nav a {
    color: #ffffff !important;
}

.navbar-nav a:hover,
.navbar-nav .active a {
    color: var(--primary) !important;
    background-color: var(--hover-bg);
}

.navbar-nav a:hover,
.navbar-nav .active a {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .navbar-nav a:hover,
[data-theme="dark"] .navbar-nav .active a {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar Icon Colors */
.navbar-icon {
    color: #ffffff !important;
}

[data-theme="dark"] .navbar-icon {
    color: #ffffff !important;
}

/* Navbar Logo */
.navbar-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .navbar-logo {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .navbar-logo:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Garantir que todos os links do navbar sejam brancos no tema light */
.navbar a {
    color: #ffffff !important;
}

.navbar .navbar-brand strong {
    color: #ffffff !important;
}

[data-theme="dark"] .navbar a {
    color: #ffffff !important;
}

[data-theme="dark"] .navbar .navbar-brand strong {
    color: #ffffff !important;
}

/* ========================================
   Theme Toggle Switch
   ======================================== */

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-switch {
    display: inline-block;
    height: 32px;
    position: relative;
    width: 58px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: rgba(255, 255, 255, 0.3);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.3s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
    background-color: #ffffff;
    bottom: 3px;
    content: "☀️";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: 0.3s;
    width: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: rgba(255, 255, 255, 0.25);
}

input:checked + .slider:before {
    transform: translateX(26px);
    content: "🌙";
}

/* Dark theme - mantém o mesmo estilo */
[data-theme="dark"] .slider {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .slider:before {
    background-color: #ffffff;
}

[data-theme="dark"] input:checked + .slider {
    background-color: rgba(255, 255, 255, 0.25);
}

/* ========================================
   Cards - Modern Design
   ======================================== */

.card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background-color: #252525;
    border-color: #323232;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

[data-theme="dark"] .card:hover {
    border-color: #99c3ff;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-primary);
    padding: 1.25rem 1.5rem;
}

[data-theme="dark"] .card-header {
    border-bottom: 1px solid #323232;
}

.card-header h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.4;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: 1rem 1.5rem;
}

[data-theme="dark"] .card-footer {
    background-color: #2a2a2a;
    border-top: 1px solid #323232;
}

.card-img-top {
    border-radius: 0;
    transition: transform 0.3s ease;
}

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

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.375rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

[data-theme="dark"] .card-text {
    color: #bfbfbf;
}

/* ========================================
   Buttons - Modern Design
   ======================================== */

.btn {
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif !important;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.025em;
    text-transform: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-primary {
    background-color: #99c3ff;
    color: #1f1f1f;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .btn-primary:hover {
    background-color: #b3d4ff;
    color: #1f1f1f;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary {
    color: #bfbfbf;
}

.btn-secondary:hover {
    background-color: var(--hover-bg);
}

/* ========================================
   Footer - Modern Design
   ======================================== */

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-primary);
}

[data-theme="dark"] .footer {
    background-color: #171717;
    border-top: 1px solid #323232;
}

.footer h3 {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.footer p {
    color: var(--footer-text);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.footer a {
    color: var(--footer-text);
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--primary);
}

[data-theme="dark"] .footer a:hover {
    color: #99c3ff;
}

/* ========================================
   Forms - Modern Design
   ======================================== */

.form-control {
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif !important;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .form-control {
    background-color: #2a2a2a;
    border-color: #323232;
    color: #ffffff;
}

.form-control:focus {
    background-color: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

[data-theme="dark"] .form-control:focus {
    background-color: #2f2f2f;
    border-color: #99c3ff;
    box-shadow: 0 0 0 3px rgba(153, 195, 255, 0.2);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.input-group-text {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

[data-theme="dark"] .input-group-text {
    color: #bfbfbf;
}

/* ========================================
   Lists
   ======================================== */

.list-unstyled li a {
    color: var(--text-secondary);
    padding: 0.625rem 0;
    display: block;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

[data-theme="dark"] .list-unstyled li a {
    color: #bfbfbf;
}

.list-unstyled li a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

[data-theme="dark"] .list-unstyled li a:hover {
    color: #99c3ff;
}

/* ========================================
   Utility Classes
   ======================================== */

.text-muted {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .text-muted {
    color: #999999 !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--bg-secondary) !important;
}

/* ========================================
   Container Width - 1400px
   ======================================== */

.container {
    max-width: 1400px !important;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1400px !important;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    body {
        font-size: 15px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.375rem;
    }
    
    .navbar-nav a {
        font-size: 0.875rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* ========================================
   Scrollbar Styling
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========================================
   Selection
   ======================================== */

::selection {
    background-color: var(--primary);
    color: white;
}

::-moz-selection {
    background-color: var(--primary);
    color: white;
}

/* ========================================
   Animations
   ======================================== */

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========================================
   Content Container
   ======================================== */

.container-fluid {
    background-color: transparent;
    transition: background-color 0.3s ease;
}

/* ========================================
   Embed Responsive (Videos)
   ======================================== */

.embed-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* ========================================
   Accessibility
   ======================================== */

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

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========================================
   Alerts - Modern Design
   ======================================== */

.alert {
    border-radius: 0.75rem;
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--primary);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(153, 195, 255, 0.15);
    border-color: rgba(153, 195, 255, 0.3);
    color: #99c3ff;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.alert-warning {
    background-color: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.2);
    color: #ea580c;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* ========================================
   Badges - Modern Design
   ======================================== */

.badge {
    padding: 0.5rem 0.875rem;
    border-radius: 1.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

[data-theme="dark"] .badge-primary {
    background-color: #99c3ff;
    color: #1f1f1f;
}

.badge-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .badge-secondary {
    color: #bfbfbf;
}

/* ========================================
   Tables - Modern Design
   ======================================== */

.table {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

[data-theme="dark"] .table {
    color: #bfbfbf;
}

.table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.075em;
    padding: 1rem 0.75rem;
}

[data-theme="dark"] .table thead th {
    color: #bfbfbf;
}

.table td {
    font-size: 0.9375rem;
    padding: 0.875rem 0.75rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-primary);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--hover-bg);
}

.table td {
    border-color: var(--border-primary);
}

/* ========================================
   Pagination - Modern Design
   ======================================== */

.pagination {
    display: flex;
    list-style: none;
    border-radius: 0.5rem;
}

.pagination .page-item {
    margin: 0 0.25rem;
}

.pagination .page-link {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .pagination .page-link {
    color: #bfbfbf;
}

.pagination .page-link:hover {
    background-color: var(--hover-bg);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .pagination .page-link:hover {
    border-color: #99c3ff;
    color: #99c3ff;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #99c3ff;
    border-color: #99c3ff;
    color: #1f1f1f;
}

/* ========================================
   Modern Pagination Design
   ======================================== */

/* Wrapper da paginação */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
    margin: 2rem 0 0 0;
    list-style: none;
    flex-wrap: wrap;
}

/* Itens da paginação */
.pagination li {
    list-style: none;
    margin: 0;
}

/* Links da paginação */
.pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Hover nos links */
.pagination li a:hover {
    background-color: var(--hover-bg);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Página ativa */
.pagination li.active a {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    cursor: default;
    pointer-events: none;
}

/* Botões de navegação (Primeiro, Anterior, Próximo, Último) */
.pagination li.prev a,
.pagination li.next a,
.pagination li:first-child a,
.pagination li:last-child a {
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Disabled state */
.pagination li.disabled a {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dark Theme */
[data-theme="dark"] .pagination li a {
    color: #bfbfbf;
    background-color: #252525;
    border-color: #323232;
}

[data-theme="dark"] .pagination li a:hover {
    background-color: #2f2f2f;
    border-color: #99c3ff;
    color: #99c3ff;
}

[data-theme="dark"] .pagination li.active a {
    background-color: #99c3ff;
    border-color: #99c3ff;
    color: #1f1f1f;
}

/* Responsivo */
@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
        padding: 1.5rem 0;
    }
    
    .pagination li a {
        min-width: 36px;
        height: 36px;
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    /* Esconder números intermediários em mobile */
    .pagination li:not(.active):not(.prev):not(.next):not(:first-child):not(:last-child) {
        display: none;
    }
    
    /* Mostrar apenas alguns números ao redor da página ativa */
    .pagination li.active,
    .pagination li.active + li,
    .pagination li.active + li + li {
        display: list-item;
    }
}

/* Animação de entrada */
.pagination li {
    animation: fadeInUp 0.3s ease-out backwards;
}

.pagination li:nth-child(1) { animation-delay: 0.05s; }
.pagination li:nth-child(2) { animation-delay: 0.1s; }
.pagination li:nth-child(3) { animation-delay: 0.15s; }
.pagination li:nth-child(4) { animation-delay: 0.2s; }
.pagination li:nth-child(5) { animation-delay: 0.25s; }
.pagination li:nth-child(6) { animation-delay: 0.3s; }

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

/* Estilo para paginação alinhada à direita (legacy) */
.pagination.pull-right {
    justify-content: flex-end;
}

/* Remove margens extras do Bootstrap */
.pagination.no-margin {
    margin: 2rem 0 0 0 !important;
}

/* ========================================
   Breadcrumb - Modern Design
   ======================================== */

.breadcrumb {
    background-color: transparent;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .breadcrumb-item {
    color: #bfbfbf;
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #bfbfbf;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-tertiary);
}

.breadcrumb-item a {
    color: var(--primary);
}

[data-theme="dark"] .breadcrumb-item a {
    color: #99c3ff;
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
}

[data-theme="dark"] .breadcrumb-item a:hover {
    color: #b3d4ff;
}

/* ========================================
   Modal - Modern Design
   ======================================== */

.modal-content {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    border-radius: 1rem 1rem 0 0;
}

.modal-title {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-title {
    color: #bfbfbf;
}

.modal-body {
    color: var(--text-secondary);
}

[data-theme="dark"] .modal-body {
    color: #bfbfbf;
}

.modal-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    border-radius: 0 0 1rem 1rem;
}

.close {
    color: var(--text-primary);
    opacity: 0.5;
}

[data-theme="dark"] .close {
    color: #bfbfbf;
}

.close:hover {
    color: var(--text-primary);
    opacity: 1;
}

[data-theme="dark"] .close:hover {
    color: #bfbfbf;
}

/* ========================================
   Tooltips - Modern Design
   ======================================== */

.tooltip-inner {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Loading States
   ======================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.spinner {
    border: 3px solid var(--border-primary);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Progress Bars
   ======================================== */

.progress {
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    height: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary);
    border-radius: 0.5rem;
    transition: width 0.3s ease;
}

/* ========================================
   Image Styles
   ======================================== */

img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.img-thumbnail {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

/* ========================================
   Code Blocks
   ======================================== */

code {
    background-color: var(--bg-secondary);
    color: var(--primary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', Courier, monospace;
}

pre {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: var(--text-primary);
}

[data-theme="dark"] pre code {
    color: #bfbfbf;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .navbar,
    .footer,
    .theme-switch-wrapper,
    .btn {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* ========================================
   Helper Classes
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.shadow-strong {
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Video Container
   ======================================== */

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   Social Icons
   ======================================== */

.footer a[title]:hover {
    opacity: 0.8;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.footer .fa-facebook:hover {
    color: #1877f2 !important;
}

.footer .fa-instagram:hover {
    color: #e4405f !important;
}

.footer .fa-youtube-play:hover {
    color: #ff0000 !important;
}

.footer .fa-envelope:hover {
    color: var(--primary) !important;
}

[data-theme="dark"] .footer .fa-envelope:hover {
    color: #99c3ff !important;
}

/* ========================================
   Enhanced Icons in Lists
   ======================================== */

.list-unstyled li a i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

.card-header h5 i {
    opacity: 0.9;
}

[data-theme="dark"] .card-header h5 i {
    opacity: 1;
    color: #99c3ff;
}

/* ========================================
   Button Grid Gaps
   ======================================== */

.d-grid {
    display: grid;
}

.gap-2 {
    gap: 0.5rem;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

[data-theme="dark"] .btn-outline-primary {
    border-color: #99c3ff;
    color: #99c3ff;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: #99c3ff;
    border-color: #99c3ff;
    color: #1f1f1f;
}

/* ========================================
   Card Footer Enhancements
   ======================================== */

.card-footer small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-footer .fa {
    opacity: 0.7;
}

[data-theme="dark"] .card-footer {
    background-color: rgba(51, 65, 85, 0.3);
}

/* ========================================
   Text Muted Colors
   ======================================== */

.text-danger {
    color: #dc2626 !important;
}

[data-theme="dark"] .text-danger {
    color: #f87171 !important;
}

/* ========================================
   Bootstrap Border Utilities Override (Dark Theme)
   ======================================== */

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-left,
[data-theme="dark"] .border-right,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: #323232 !important;
}

[data-theme="dark"] hr {
    border-color: #323232 !important;
}

/* Sobrescrever cores de borda padrão do Bootstrap no dark theme */
[data-theme="dark"] .border-primary {
    border-color: #99c3ff !important;
}

[data-theme="dark"] .border-secondary {
    border-color: #323232 !important;
}

[data-theme="dark"] .border-light {
    border-color: #323232 !important;
}

[data-theme="dark"] .border-dark {
    border-color: #1f1f1f !important;
}

/* Sobrescrever bordas de todos os componentes Bootstrap */
[data-theme="dark"] .card,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .nav-tabs,
[data-theme="dark"] .nav-tabs .nav-link,
[data-theme="dark"] .navbar,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer,
[data-theme="dark"] .form-control,
[data-theme="dark"] .input-group-text,
[data-theme="dark"] .table,
[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: #323232 !important;
}

/* Exceções - elementos que devem manter cores específicas */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-outline-primary {
    border-color: #99c3ff !important;
}

[data-theme="dark"] .card:hover {
    border-color: #99c3ff !important;
}

[data-theme="dark"] .form-control:focus {
    border-color: #99c3ff !important;
}

[data-theme="dark"] .pagination .page-link:hover {
    border-color: #99c3ff !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    border-color: #99c3ff !important;
} 