/**
 * PortuLink - Estilos Customizados
 * Design System: Nova Identidade Visual
 * Tagline: "STREAMLINING TECHNOLOGY"
 */

:root {
    /* Cores Primárias - Nova Identidade Visual */
    --primary-blue: #2563eb;        /* Azul principal do logo */
    --primary-blue-dark: #1e40af;  /* Azul escuro para hover */
    --primary-blue-light: #3b82f6;  /* Azul claro para estados ativos */
    --primary-gray: #374151;        /* Cinza escuro do texto */
    --primary-gray-dark: #1f2937;  /* Cinza muito escuro */
    --primary-gray-light: #6b7280; /* Cinza claro */
    
    /* Cores Secundárias */
    --secondary-blue: #60a5fa;
    --accent-blue: #93c5fd;
    
    /* Neutros */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --text-gray-700: #374151;
    --text-gray-900: #111827;
    --text-dark: #1f2937;
    
    /* Cores de Suporte (mantidas para compatibilidade) */
    --primary-red: #ef4444;
    --primary-green: #10b981;
    --primary-yellow: #f59e0b;
    --primary-gold: #fbbf24;
    --primary-dark: #1a1a2e;
    
    /* Gradientes - Nova Identidade */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--secondary-blue) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 50%, rgba(59, 130, 246, 0.05) 100%);
    
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip to Content Link (Acessibilidade) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 0;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #FCD116;
    outline-offset: 2px;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Breadcrumbs */
.breadcrumb-nav {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    padding: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-gray-700);
    font-weight: 500;
}

body {
    font-family: var(--font-inter);
    color: var(--text-gray-700);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    line-height: 1.6;
    background-attachment: fixed;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Header Fixo */
header {
    z-index: 1030;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.nav-link {
    color: var(--text-gray-700) !important;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.nav-link:hover {
    color: var(--primary-blue) !important;
    transform: translateY(-2px);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

/* Classes utilitárias */
.text-blue-600 {
    color: var(--primary-blue) !important;
}

.text-primary-blue {
    color: var(--primary-blue) !important;
}

.text-primary-gray {
    color: var(--primary-gray) !important;
}

.text-gray-700 {
    color: var(--text-gray-700) !important;
}

.text-gray-900 {
    color: var(--text-gray-900) !important;
}

.bg-blue-600 {
    background: var(--gradient-primary) !important;
}

.bg-blue-500 {
    background: var(--gradient-primary) !important;
}

.btn-blue-500 {
    background: var(--gradient-primary);
    color: white;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

.btn-blue-500::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-blue-500:hover::before {
    width: 300px;
    height: 300px;
}

.btn-blue-500:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(206, 17, 38, 0.5);
    filter: brightness(1.1);
}

.btn-blue-500:active {
    transform: translateY(0) scale(0.98);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    min-height: calc(100vh - 72px);
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(4, 106, 56, 0.15) 0%, rgba(206, 17, 38, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(252, 209, 22, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-30px) translateX(30px);
    }
}

.text-4xl {
    font-size: 2.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .md-text-6xl {
        font-size: 3.75rem;
        line-height: 1.1;
    }
    
    .text-4xl {
        font-size: 3rem;
    }
}

@media (max-width: 375px) {
    .text-4xl {
        font-size: 1.875rem;
    }
    
    .hero-section {
        padding: 2rem 0 !important;
    }
}

.min-vh-75 {
    min-height: 75vh;
}

.hover-scale-105 {
    transition: transform 0.2s ease;
}

.hover-scale-105:hover {
    transform: scale(1.05);
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: white;
}

.hover-shadow-lg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-shadow-lg:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2) !important;
    transform: translateY(-8px);
}

/* Cards de Serviço com efeito hover aprimorado */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white !important;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.service-card:hover .card-body > div:first-child > div {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.service-card .card-body > div:first-child > div {
    transition: all 0.3s ease;
}

/* Cards de Portfólio */
.portfolio-card {
    overflow: hidden;
    position: relative;
}

.portfolio-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.portfolio-card .card-img-top {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .card-img-top {
    transform: scale(1.15);
}

.portfolio-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.bg-gradient-blue {
    background: var(--gradient-primary);
}

/* Skeleton Loading */
.skeleton-card {
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 50%;
    margin: 0 auto;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-text {
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin: 0 auto;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-text-small {
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-top: 8px;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
}

.empty-state i {
    opacity: 0.5;
}

/* Formulário */
.form-control {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-gray-900);
    margin-bottom: 0.5rem;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-secondary {
    border: 1px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Toast */
.toast {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsividade */
@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Animações suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Section titles */
section h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    margin-bottom: 0 !important;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Melhorias gerais de espaçamento */
section {
    position: relative;
}

section.py-5 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Scroll suave melhorado */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Links */
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* Badge */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    color: white;
}

footer a {
    transition: all 0.2s ease;
}

footer a:hover {
    color: var(--primary-blue-light) !important;
    transform: translateX(5px);
}

footer h5 {
    color: var(--primary-blue-light);
}

/* Seção de destaque com gradiente */
.bg-blue-600 {
    background: var(--gradient-primary) !important;
    position: relative;
    overflow: hidden;
}

.bg-blue-600::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* Hero Section com Carrossel */
.hero-section {
    position: relative;
}

.hero-slide {
    position: relative;
    min-height: 75vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-slide > .container {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.hero-slide a, .hero-slide button {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.hero-slide .btn {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

.hero-illustration {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Serviços Section */
.services-header .badge {
    display: block !important;
    margin-bottom: 1rem !important;
}

.services-header h2 {
    display: block !important;
    clear: both !important;
}

/* Página de Serviços */
.service-item {
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.empty-state-icon {
    opacity: 0.5;
}

#serviceSearch {
    border-radius: 25px;
    border: 2px solid #e9ecef;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

#serviceSearch:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Indicadores Section */
.indicator-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(248,249,250,0.1) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    margin-bottom: 1rem;
}

/* Depoimentos */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Contato Destaque */
.contact-illustration {
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background-color: rgba(255,255,255,0.3);
    margin: 0 5px;
}

.carousel-indicators .active {
    background-color: #fff;
    border-color: #fff;
}

/* Progress Bar Custom */
.progress {
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(255,255,255,0.2);
}

/* Header Profissional */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.logo-container {
    width: auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-gradient {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    color: #FFD700 !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-blue-dark) !important;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    color: var(--primary-blue);
    transform: translateX(5px);
}

.btn-gradient-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    background: var(--gradient-secondary);
    color: white;
}

/* Search Button */
.btn-outline-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.navbar-toggler {
    border: 2px solid rgba(37, 99, 235, 0.2);
}

/* Garantir que apareça em mobile - Bootstrap já controla, mas reforçando */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Footer Premium */
.footer-premium {
    margin-top: 5rem;
}

.newsletter-section {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary) !important;
}

.newsletter-section::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.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.newsletter-form .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.newsletter-form .form-control {
    border: none;
    background: rgba(255,255,255,0.95);
    color: #1a1a2e;
    font-weight: 500;
}

.newsletter-form .form-control:focus {
    background: white;
    color: #1a1a2e;
}

.newsletter-form .btn-light {
    border: none;
    background: white !important;
    color: var(--primary-blue) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form .btn-light:hover {
    background: rgba(255,255,255,0.9) !important;
    color: var(--primary-blue-dark) !important;
    transform: translateX(5px);
}

.footer-brand .footer-logo {
    width: auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brand .footer-logo img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.footer-brand .footer-logo img[src=""] {
    display: none;
}

/* Logo no footer - sem filtro para evitar retângulo branco */
.footer-logo-img {
    /* Remover filtro completamente - usar imagem original */
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1;
    transition: opacity 0.3s ease;
    background: transparent;
}

.footer-logo-img:hover {
    opacity: 0.9;
}

/* Garantir que o fallback não apareça quando o logo carregar */
#footer-logo-fallback {
    display: none !important;
}

#footer-logo-container:has(.footer-logo-img[src]) #footer-logo-fallback {
    display: none !important;
}

/* Se precisar de logo branco no futuro, criar versão específica do logo */
/* ou usar: filter: brightness(0) invert(1) grayscale(100%); */

.footer-badges .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-blue) !important;
    transform: translateX(5px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-links .social-link {
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links .social-link:hover {
    color: var(--primary-blue) !important;
    transform: translateY(-3px);
}

.bottom-footer {
    position: relative;
}

.bottom-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 60vh;
        background-attachment: scroll;
    }

    .display-4 {
        font-size: 2.5rem !important;
    }

    .hero-illustration svg,
    .hero-illustration i {
        font-size: 10rem !important;
    }

    .indicator-icon {
        width: 60px;
        height: 60px;
    }

    .indicator-icon i {
        font-size: 2rem !important;
    }

    /* Header Mobile */
    .logo-container {
        width: 40px;
        height: 40px;
    }

    .navbar-brand .fs-4 {
        font-size: 1.5rem !important;
    }

    .social-links {
        display: none;
    }

    .btn-gradient-primary span {
        display: none;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }

    /* Footer Mobile */
    .newsletter-section {
        text-align: center;
    }

    .newsletter-form .input-group {
        flex-direction: column;
    }

    .newsletter-form .form-control {
        border-radius: 25px 25px 0 0 !important;
        border-bottom: none;
    }

    .newsletter-form .btn {
        border-radius: 0 0 25px 25px !important;
        width: 100%;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-badges {
        justify-content: center;
    }

    .social-links {
        text-align: center;
        margin-top: 1rem;
    }

    .bottom-footer .row {
        text-align: center;
    }
}

/* ============================================
   DARK MODE - Modo Escuro
   ============================================ */

.theme-dark {
    /* Cores de fundo */
    --bg-white: #0f172a;
    --bg-light: #1e293b;
    --text-gray-700: #cbd5e1;
    --text-gray-900: #f1f5f9;
    
    /* Cores de borda */
    --border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark body {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-gray-700);
}

/* Header no modo escuro */
.theme-dark header {
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-dark .bg-gradient-primary {
    background: linear-gradient(135deg, rgba(4, 106, 56, 0.8) 0%, rgba(206, 17, 38, 0.8) 100%);
}

.theme-dark .nav-link {
    color: var(--text-gray-700) !important;
}

.theme-dark .nav-link:hover {
    color: var(--primary-yellow) !important;
}

/* Breadcrumbs no modo escuro */
.theme-dark .breadcrumb-nav {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-dark .breadcrumb-item a {
    color: var(--primary-yellow);
}

.theme-dark .breadcrumb-item.active {
    color: var(--text-gray-700);
}

/* Cards no modo escuro */
.theme-dark .card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-gray-700);
}

.theme-dark .card-header {
    background: rgba(15, 23, 42, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Formulários no modo escuro */
.theme-dark .form-control {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-gray-700);
}

.theme-dark .form-control:focus {
    background: #1e293b;
    border-color: var(--primary-yellow);
    color: var(--text-gray-700);
    box-shadow: 0 0 0 0.2rem rgba(252, 209, 22, 0.25);
}

.theme-dark .form-label {
    color: var(--text-gray-700);
}

.theme-dark .form-text {
    color: rgba(203, 213, 225, 0.7);
}

/* Botões no modo escuro */
.theme-dark .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-gray-700);
}

.theme-dark .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-gray-900);
}

/* Hero Section no modo escuro */
.theme-dark .hero-section {
    background: linear-gradient(135deg, rgba(4, 106, 56, 0.2) 0%, rgba(206, 17, 38, 0.2) 50%, rgba(252, 209, 22, 0.1) 100%);
}

.theme-dark .hero-slide {
    background: linear-gradient(135deg, rgba(4, 106, 56, 0.95) 0%, rgba(206, 17, 38, 0.95) 100%);
}

/* Seções no modo escuro */
.theme-dark section {
    background: transparent;
}

.theme-dark .text-gray-900 {
    color: var(--text-gray-900) !important;
}

.theme-dark .text-gray-700 {
    color: var(--text-gray-700) !important;
}

.theme-dark .text-muted {
    color: rgba(203, 213, 225, 0.6) !important;
}

/* Tabelas no modo escuro */
.theme-dark .table {
    color: var(--text-gray-700);
}

.theme-dark .table thead th {
    background: rgba(15, 23, 42, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: var(--text-gray-900);
}

.theme-dark .table tbody tr {
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Alertas no modo escuro */
.theme-dark .alert {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-gray-700);
}

.theme-dark .alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.theme-dark .alert-success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
}

.theme-dark .alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Footer no modo escuro */
.theme-dark .footer-premium {
    background: linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
}

.theme-dark .main-footer {
    background: linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
}

.theme-dark .newsletter-section {
    background: linear-gradient(135deg, rgba(4, 106, 56, 0.9) 0%, rgba(206, 17, 38, 0.9) 100%);
}

/* Dropdown no modo escuro */
.theme-dark .dropdown-menu {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.theme-dark .dropdown-item {
    color: var(--text-gray-700);
}

.theme-dark .dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
}

/* Badges no modo escuro */
.theme-dark .badge {
    color: white;
}

/* Links no modo escuro */
.theme-dark a {
    color: var(--primary-yellow);
}

.theme-dark a:hover {
    color: var(--primary-gold);
}

/* Inputs de busca e outros elementos */
.theme-dark input[type="search"],
.theme-dark input[type="text"],
.theme-dark textarea {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-gray-700);
}

.theme-dark input[type="search"]:focus,
.theme-dark input[type="text"]:focus,
.theme-dark textarea:focus {
    background: #1e293b;
    border-color: var(--primary-yellow);
    color: var(--text-gray-700);
}

/* Transições suaves */
.theme-dark * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   BOTÕES FLUTUANTES (Tema + To Top)
   ============================================ */

.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(4, 106, 56, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1000;
}

.floating-btn-theme {
    opacity: 1;
    transform: scale(1);
}

.floating-btn-top {
    opacity: 0;
    transform: scale(0.8);
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.floating-btn:hover::before {
    width: 300px;
    height: 300px;
}

.floating-btn:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
    background: var(--gradient-secondary);
}

.floating-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.floating-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.floating-btn:hover i {
    transform: rotate(15deg);
}

/* Modo escuro nos botões flutuantes */
.theme-dark .floating-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 0.9) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.theme-dark .floating-btn:hover {
    box-shadow: 0 8px 25px rgba(252, 209, 22, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* ============================================
   LAZY LOADING
   ============================================ */
img.lazy,
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: #f0f0f0;
    min-height: 200px;
}

img.lazy-loaded,
img.loaded {
    opacity: 1;
}

.lazy-bg,
[data-bg-image] {
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease;
}

.lazy-bg-loaded {
    opacity: 1;
}

/* Placeholder enquanto carrega */
img.lazy {
    position: relative;
}

img.lazy::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: -1;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   TABLE SORTING & EXPORT
   ============================================ */
table th.sortable {
    user-select: none;
    position: relative;
}

table th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

table th.sortable .sort-icon {
    font-size: 0.8rem;
    transition: opacity 0.2s ease;
}

table th.sortable.sort-asc,
table th.sortable.sort-desc {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

.theme-dark table th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.theme-dark table th.sortable.sort-asc,
.theme-dark table th.sortable.sort-desc {
    background-color: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
}

.table-export-buttons {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* ============================================
   BULK ACTIONS
   ============================================ */
.bulk-actions-bar {
    border: 2px solid var(--primary-blue);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-actions-bar .selected-count {
    font-size: 1.2rem;
}

.theme-dark .bulk-actions-bar {
    background: #1e293b !important;
    border-color: #FCD116;
    color: #cbd5e1;
}

.item-checkbox {
    cursor: pointer;
}

#selectAll {
    cursor: pointer;
}
