/* Variables de color - Identidad Metodista Libre */
:root {
    --brand-primary: #002D72;
    --brand-accent: #D4AF37;
    --brand-light: #F8F9FA;
    --brand-dark: #001a40;
    --text-primary: #212529;
    --text-muted: #6c757d;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navbar */
.bg-primary {
    background-color: var(--brand-primary) !important;
}

.navbar-brand {
    font-size: 1.1rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.25rem;
}

/* Botón accent */
.btn-accent {
    background: var(--brand-accent);
    color: #111;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: #c09d2d;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    color: #fff;
    padding: 4rem 0;
    border-bottom: 4px solid var(--brand-accent);
    position: relative;
    overflow: hidden;
}

.hero::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"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .lead {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Cards */
.card-ghost {
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: white;
}

.card-ghost:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Badges */
.badge-accent {
    background: var(--brand-accent);
    color: #111;
    font-weight: 600;
}

/* Section title */
.section-title {
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--brand-accent);
}

/* Imágenes */
img.rounded-xl {
    border-radius: 1rem;
    object-fit: cover;
}

/* Lazy loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Grids responsive */
.grid-3 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Dropdown mejorado en móvil */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--brand-light);
    color: var(--brand-primary);
    padding-left: 1.5rem;
}

.dropdown-item i {
    width: 20px;
}

/* Forms mejorados */
.form-control:focus,
.form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

/* Alerts personalizados */
.alert {
    border-radius: 0.75rem;
    border: none;
}

.alert-success {
    background-color: #d1f2eb;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive - Móvil primero */
@media (max-width: 768px) {
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    .navbar-brand span {
        font-size: 0.95rem;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Utilidades adicionales */
.text-accent {
    color: var(--brand-accent) !important;
}

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

.border-accent {
    border-color: var(--brand-accent) !important;
}

/* Loader */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--brand-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sticky navbar mejorado */
.sticky-top {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none;
    }
}