/* ===== ESTILOS BÁSICOS DE PRUEBA ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* Variables para tipografía fluida */
    --fluid-min-width: 320;
    --fluid-max-width: 1920;
    --fluid-min-size: 16;
    --fluid-max-size: 18;
    --fluid-screen: 100vw;
    --fluid-bp: calc(
        (var(--fluid-screen) - var(--fluid-min-width) / 16 * 1rem) /
        (var(--fluid-max-width) - var(--fluid-min-width))
    );
}

@media screen and (min-width: 320px) {
    :root {
        --fluid-screen: calc(var(--fluid-min-width) * 1px);
    }
}

@media screen and (min-width: 1920px) {
    :root {
        --fluid-screen: calc(var(--fluid-max-width) * 1px);
    }
}

/* ===== SCROLL SUAVE ===== */
html {
    scroll-behavior: smooth;
}

/* ===== AJUSTE PARA NAVEGACIÓN CON ANCLAJES ===== */
section[id] {
    scroll-margin-top: 120px; /* Ajusta según la altura del navbar */
}

/* ===== AJUSTE PARA HEADER FIJO ===== */
.main-content {
    padding-top: 120px; /* Espacio para el header fijo - aumentado para móviles */
    min-height: calc(100vh - 120px); /* Altura mínima considerando el header */
}

/* Ajuste específico para la página de inicio */
.hero-section {
    margin-top: -120px; /* Compensar el padding-top del main-content */
    padding-top: 120px; /* Agregar padding para el contenido */
}

/* Ajuste para otras páginas que no son la home */
.page-content {
    padding-top: 20px; /* Espacio adicional para páginas internas */
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.navbar {
    background: rgba(52, 58, 64, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    z-index: 1050; /* Asegurar que esté por encima del contenido */
}

.logo-container {
    background: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.logo-img {
    border-radius: 50%;
    object-fit: cover;
}

.brand-text {
    color: white;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: 0.3s ease;
    position: relative;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
}

/* Estilos básicos para el hero */
.hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}

/* Estilos para las tarjetas */
.stat-card, .feature-card, .municipality-card, .process-card, .service-card, .stat-detail-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover, .feature-card:hover, .municipality-card:hover, 
.process-card:hover, .service-card:hover, .stat-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Proceso paso a paso */
.process-card {
    padding: 2rem;
    position: relative;
}

.number-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.process-icon {
    margin-top: 1rem;
}

/* Servicios */
.service-card {
    border: none;
    overflow: hidden;
}

.service-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.3s ease;
}

.service-card:hover .service-icon::before {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Estadísticas detalladas */
.stat-detail-card {
    padding: 2rem;
    text-align: center;
}

.stat-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.stat-icon-large::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.3s ease;
}

.stat-detail-card:hover .stat-icon-large::before {
    transform: rotate(45deg) translate(50%, 50%);
}

.stat-number-large {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
}

.stat-label-large {
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-description {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Testimonios */
.testimonial-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.testimonial-rating {
    font-size: 1.1rem;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.6;
    min-height: 80px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.author-info h6 {
    margin-bottom: 0.25rem;
}

/* Información de contacto */
.contact-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 2rem;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.contact-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.3s ease;
}

.contact-card:hover .contact-icon::before {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Iconos con gradientes */
.stat-icon, .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.bg-primary-gradient { background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); }
.bg-success-gradient { background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%); }
.bg-warning-gradient { background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%); }
.bg-info-gradient { background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%); }

/* Botones con efectos */
.btn {
    font-weight: 600;
    border-radius: 0.5rem;
    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Animaciones básicas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-up-delay-1 {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.animate-fade-in-up-delay-3 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out 0.3s both;
}

/* Utilidades */
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.bg-danger-gradient {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets y pantallas medianas */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .display-3 {
        font-size: clamp(2rem, calc(2rem + 1.5vw), 3.5rem);
    }
    
    .display-4 {
        font-size: clamp(1.5rem, calc(1.5rem + 1vw), 2.5rem);
    }
    
    .display-5 {
        font-size: clamp(1.25rem, calc(1.25rem + 0.75vw), 2rem);
    }
    
    .display-6 {
        font-size: clamp(1rem, calc(1rem + 0.5vw), 1.5rem);
    }
    
    /* Ajustes para móviles */
    .navbar-brand .brand-text span {
        font-size: 1.5rem !important;
    }
    
    .navbar-brand .brand-text small {
        font-size: 0.75rem;
    }
    
    .logo-container {
        padding: 6px;
    }
    
    .logo-img {
        height: 40px !important;
    }
    
    /* Mejorar el navbar en móviles */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-collapse {
        background: rgba(52, 58, 64, 0.98);
        margin-top: 10px;
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 6px;
        margin: 2px 0;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }
    
    /* Ajustar padding del contenido principal */
    .main-content {
        padding-top: 140px;
        min-height: calc(100vh - 140px);
    }
    
    .hero-section {
        margin-top: -140px;
        padding-top: 140px;
    }
    
    section[id] {
        scroll-margin-top: 140px;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .display-3 {
        font-size: clamp(1.5rem, calc(1.5rem + 1vw), 2.5rem);
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-height: 44px; /* Mínimo para touch */
    }
    
    /* Ajustes adicionales para pantallas muy pequeñas */
    .navbar-brand .brand-text span {
        font-size: 1.25rem !important;
    }
    
    .navbar-brand .brand-text small {
        font-size: 0.7rem;
    }
    
    .logo-container {
        padding: 4px;
    }
    
    .logo-img {
        height: 35px !important;
    }
    
    /* Mejorar aún más el navbar en móviles pequeños */
    .navbar {
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: 5px;
        padding: 0.75rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Ajustar padding del contenido principal */
    .main-content {
        padding-top: 160px;
        min-height: calc(100vh - 160px);
    }
    
    .hero-section {
        margin-top: -160px;
        padding-top: 160px;
    }
    
    section[id] {
        scroll-margin-top: 160px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 375px) {
    .main-content {
        padding-top: 180px;
        min-height: calc(100vh - 180px);
    }
    
    .hero-section {
        margin-top: -180px;
        padding-top: 180px;
    }
    
    .navbar-brand .brand-text span {
        font-size: 1rem !important;
    }
    
    .navbar-brand .brand-text small {
        font-size: 0.6rem;
    }
    
    .logo-container {
        padding: 3px;
    }
    
    .logo-img {
        height: 30px !important;
    }
    
    section[id] {
        scroll-margin-top: 180px;
    }
} 