/* =========================================
   VARIABLES GLOBALES & THEME
   ========================================= */
:root {
    /* Color corporativo AJE */
    --primary: #cc0026;      /* Red AJE */
    --primary-dark: #99001c; /* Red Hover */
    --secondary: #333333;    /* Gris Oscuro */
    --accent: #ffcc00;       /* Amarillo / Dorado (mantengo por si acaso) */
    
    --bg-light: #f8f9fc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

/* =========================================
   COMPONENTS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(204, 0, 38, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 38, 0.4);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: #fff;
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    background-color: rgba(204, 0, 38, 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.badge-yellow {
    background-color: rgba(255, 204, 0, 0.15);
    color: #b38f00;
}

/* =========================================
   NAVBAR (CORPORATIVO ROJO)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--primary); /* Fondo Rojo corporativo */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    padding: 0.25rem 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 110px; /* Aumentado de 80px */
    transition: var(--transition);
}

.navbar.scrolled .nav-content {
    height: 85px; /* Aumentado de 65px */
}

.logo-img {
    height: 80px; /* Aumentado un poco más para acompañar al menú */
    /* Obliga al logo a ser blanco absoluto */
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 600;
    font-size: 1.1rem; /* Aumentado */
    color: #ffffff; /* Texto Blanco */
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-links .btn-primary.glass {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: none;
}
.nav-links .btn-primary.glass:hover {
    background: #fff;
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff; /* Hamburguesa blanca */
    cursor: pointer;
}

/* =========================================
   HERO Y OTRAS SECCIONES
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px; /* Incrementado para compensar navbar */
    overflow: hidden;
}

.hero-bg-blur {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(204,0,38,0.08) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    width: 100%;
    height: 0.2em;
    background-color: var(--accent);
    z-index: -1;
    opacity: 0.5;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* LAYOUT DE PÁGINAS INDIVIDUALES */
.page-header {
    background-color: var(--bg-white);
    padding: 12rem 0 4rem; /* Incrementado de 10rem to 12rem */
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section {
    padding: 8rem 0; /* Incrementado de 6rem a 8rem para no solapar con navbar */
}

.bg-light {
    background-color: #fff;
}

/* Resto se mantiene de la versión inicial */
.junta-grid { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.junta-sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; width: 100%; }
.card { background: var(--bg-white); border-radius: var(--radius-md); padding: 2.5rem 1.5rem; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid rgba(0,0,0,0.03); text-align: center; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.container-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.contacto-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; text-align: center;}
.contacto-card { position: relative; padding: 4rem 2rem; border-radius: var(--radius-lg); overflow: hidden; background-color: var(--primary); color: #fff; z-index: 1; }
.card-bg-overlay { opacity: 0.2; }
.card-content h3 { color: #fff; font-size: 2rem; margin-bottom: 0.5rem; }
.location-icon { font-size: 2.5rem; margin-bottom: 1.5rem; opacity: 0.9; }

.footer { background: #111827; color: #9ca3af; padding: 4rem 0 2rem; }
.footer p { font-size: 0.9rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; text-align: center;}
.footer-logo img { filter: brightness(0) invert(1) opacity(0.8); }

.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.is-visible { opacity: 1; transform: translate(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; }

@media (max-width: 992px) { .container-split { grid-template-columns: 1fr; } .contacto-split { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links { position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px); background: var(--primary); flex-direction: column; justify-content: center; }
    .nav-links.active { left: 0; }
    .navbar.scrolled .nav-links { top: 65px; height: calc(100vh - 65px); }
}

/* Skeleton Loader Moderno */
.skeleton {
    background: #e2e8f0;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 8px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
    position: relative;
    overflow: hidden;
}
@keyframes shine {
    to { background-position-x: -200%; }
}
.skeleton-card { background: #fff; padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid #e2e8f0; }
.skeleton-img { width: 100%; height: 180px; margin-bottom: 1rem; }
.skeleton-title { height: 1.5rem; margin-bottom: 1rem; width: 90%; }
.skeleton-text { height: 1rem; margin-bottom: 0.5rem; width: 100%; }
.skeleton-meta { height: 0.8rem; width: 40%; margin-bottom: 1.5rem; }
.skeleton-btn { height: 2.5rem; width: 100%; }

/* Botón flotante de Administrador */
.admin-float-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255,255,255,0.1);
}
.admin-float-btn:hover {
    background: var(--primary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(204, 0, 38, 0.4);
    color: #fff;
}
.admin-float-btn i { font-size: 1.1rem; }
