/* Variables globales */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #059669;
    --info: #0891b2;
    --warning: #d97706;
    --danger: #dc2626;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Estilos generales */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--gray-200) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Asegurar que el navbar sticky funcione correctamente */
.sticky-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
}

/* Mejorar la transparencia y el efecto de blur */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: -1;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--gray-900) !important;
}

.nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Botones */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    padding: 0.5rem 1.5rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    background: #ffffff;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

/* Iconos en cards */
.bg-primary.bg-opacity-10 {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

.bg-success.bg-opacity-10 {
    background-color: rgba(5, 150, 105, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(8, 145, 178, 0.1) !important;
}

/* Formularios */
.form-control, .form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: var(--transition);
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Secciones */
section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--gray-50) !important;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

/* Footer */
footer {
    background-color: var(--gray-900) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Asegurar que el navbar sea visible en móviles */
    .navbar {
        background: rgba(255, 255, 255, 0.99) !important;
    }
    
    .navbar::before {
        background: rgba(255, 255, 255, 0.99);
    }
}

/* Asegurar que el navbar siempre esté visible en todos los dispositivos */
@media (min-width: 769px) {
    .navbar {
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    .navbar::before {
        background: rgba(255, 255, 255, 0.98);
    }
}

/* Mejorar la visibilidad del navbar en scroll */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.99) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled::before {
    background: rgba(255, 255, 255, 0.99);
}

/* Asegurar que el navbar siempre esté visible */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    transition: all 0.3s ease;
}

/* Mejorar la visibilidad en dispositivos móviles */
@media (max-width: 768px) {
    .navbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1030 !important;
        background: rgba(255, 255, 255, 0.99) !important;
    }
    
    .navbar::before {
        background: rgba(255, 255, 255, 0.99);
    }
    
    /* Asegurar que el menú desplegable esté visible */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.99);
        border-radius: 0.5rem;
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
        margin-top: 0.5rem;
        padding: 1rem;
    }
    
    .dropdown-menu {
        background: rgba(255, 255, 255, 0.99);
        border: 1px solid var(--gray-200);
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    }
}

/* Asegurar que el navbar esté siempre por encima de otros elementos */
.navbar,
.navbar * {
    z-index: 1030 !important;
}

/* Mejorar la visibilidad del dropdown */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

/* Asegurar que el navbar siempre esté visible - override de cualquier otro estilo */
header.sticky-top,
header.sticky-top .navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    background: rgba(255, 255, 255, 0.99) !important;
}

/* Forzar la visibilidad en todos los navegadores */
@supports (position: sticky) {
    header.sticky-top,
    header.sticky-top .navbar {
        position: sticky !important;
        top: 0 !important;
    }
}

/* Fallback para navegadores que no soportan sticky */
@supports not (position: sticky) {
    header.sticky-top,
    header.sticky-top .navbar {
        position: fixed !important;
        top: 0 !important;
        width: 100%;
    }
    
    body {
        padding-top: 80px; /* Ajustar según la altura del navbar */
    }
}

/* Animaciones sutiles */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover effects sutiles */
.card:hover .fa-2x {
    transform: scale(1.1);
    transition: var(--transition);
}

/* Sombras sutiles */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Bordes redondeados consistentes */
.rounded-3 {
    border-radius: var(--border-radius) !important;
}

/* Espaciado consistente */
.g-4 > * {
    padding: 1rem;
}

/* Colores de texto consistentes */
.text-muted {
    color: var(--gray-600) !important;
}

.text-dark {
    color: var(--gray-900) !important;
}

/* Estilos para las tarjetas de problemas */
.problem-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-200);
    position: relative;
    margin-top: 2rem;
}

.problem-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

.problem-icon {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos para las tarjetas de impacto */
.impact-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-200);
}

.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

.impact-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.impact-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0.5rem 0;
}

/* Estilos para las tarjetas de responsabilidad */
.responsibility-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-200);
    position: relative;
}

.responsibility-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

.responsibility-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos para el modal de registro completo */
.modal-xl {
    max-width: 90%;
}

.modal-header.bg-primary {
    border-bottom: none;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.form-label {
    font-weight: 500;
    color: var(--dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background-color: var(--light);
    border-color: var(--border-color);
    color: var(--muted);
}

/* Estilos para las secciones del formulario */
.modal-body h6 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Estilos para el checkbox de términos */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label a {
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}