/* ==========================================================================
   ESTILOS GENERALES Y VARIABLES (ESTILO MILITAR PREMIUM)
   ========================================================================== */

:root {
    /* Paleta de colores inspirada en el Ejército de Bolivia */
    --color-bg-dark: #0c0e0b;       /* Negro suave para fondo principal */
    --color-olive-dark: #161f14;    /* Verde militar muy oscuro */
    --color-olive-medium: #243320;  /* Verde militar intermedio */
    --color-olive-light: #3d5238;   /* Verde oliva para acentos y bordes */
    --color-khaki: #c5b68a;         /* Caqui elegante */
    --color-khaki-dark: #8c7e53;    /* Caqui oscuro para fondos */
    --color-gold: #d4af37;          /* Dorado militar */
    --color-gold-aged: #b2933d;     /* Dorado envejecido para marcos solemnes */
    --color-gold-light: #f3e5ab;    /* Dorado muy claro */
    --color-white-bone: #f5f3ec;    /* Blanco hueso para alta legibilidad */
    --color-text-muted: #a6b0a2;    /* Texto secundario oliva grisáceo */
    
    /* Colores Bandera de Bolivia (Toques muy sutiles y elegantes) */
    --bolivia-red: #d52b1e;
    --bolivia-yellow: #f9e300;
    --bolivia-green: #007a33;
    
    /* Fuentes y Sombras */
    --font-title: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.6), 0 5px 15px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 15px rgba(178, 147, 61, 0.2);
    --border-gold-fine: 1px solid rgba(178, 147, 61, 0.4);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

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

body {
    background-color: var(--color-bg-dark);
    color: var(--color-white-bone);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Textura Militar de Fondo (Efecto tela/lona militar) */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        radial-gradient(rgba(22, 31, 20, 0.15) 1px, transparent 0),
        radial-gradient(rgba(197, 182, 138, 0.05) 1px, transparent 0);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    opacity: 0.65;
    pointer-events: none;
    z-index: 10;
}

/* Contenedor Común */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.max-width-md {
    max-width: 800px;
}

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

.hidden {
    display: none !important;
}

/* ==========================================================================
   COMPONENTES COMUNES (BADGES, DIVISORES, BOTONES)
   ========================================================================== */

/* Distintivo de sección */
.section-badge, .hero-badge, .final-badge {
    display: inline-block;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-khaki);
    border: 1px solid var(--color-khaki-dark);
    padding: 0.4rem 1.2rem;
    background: rgba(22, 31, 20, 0.8);
    margin-bottom: 1.5rem;
    border-radius: 2px;
    box-shadow: var(--shadow-gold);
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-white-bone);
    text-transform: uppercase;
    line-height: 1.3;
}

/* Divisor Dorado Solemne */
.divider-gold {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold-aged), transparent);
    width: 250px;
    margin: 1.5rem 0;
    position: relative;
}

.divider-gold::after {
    content: "★";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-gold);
    background-color: var(--color-bg-dark);
    padding: 0 10px;
    font-size: 0.9rem;
}

.divider-gold.center {
    margin-left: auto;
    margin-right: auto;
}

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-khaki-dark), var(--color-olive-medium));
    color: var(--color-white-bone);
    border: 1px solid var(--color-gold-aged);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(197, 182, 138, 0.4);
    border-color: var(--color-gold);
    color: #fff;
}

.btn-secondary {
    background: rgba(22, 31, 20, 0.5);
    color: var(--color-khaki);
    border: 1px solid var(--color-olive-light);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(61, 82, 56, 0.4);
    border-color: var(--color-khaki);
    color: var(--color-white-bone);
    transform: translateY(-3px);
}

.btn-icon {
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   RIBETE TRICOLOR DE BOLIVIA
   ========================================================================== */
.bolivia-ribbon {
    display: flex;
    width: 100%;
    height: 4px;
}
.bolivia-ribbon span {
    flex: 1;
    height: 100%;
}
.bolivia-ribbon .red { background-color: var(--bolivia-red); }
.bolivia-ribbon .yellow { background-color: var(--bolivia-yellow); }
.bolivia-ribbon .green { background-color: var(--bolivia-green); }

/* ==========================================================================
   CONTROL DE AUDIO FLOTANTE
   ========================================================================== */
.audio-control-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

.btn-audio-float {
    background: rgba(12, 14, 11, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-gold-aged);
    color: var(--color-khaki);
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.btn-audio-float:hover {
    background: var(--color-olive-dark);
    border-color: var(--color-gold);
    color: var(--color-white-bone);
    transform: scale(1.05);
}

.btn-audio-float svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at 70% 30%, var(--color-olive-dark) 0%, var(--color-bg-dark) 80%);
    padding-bottom: 2rem;
    overflow: hidden;
}

/* Luz de fondo tricolor difuminada muy sutil */
.hero-section::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 122, 51, 0.05) 0%, rgba(249, 227, 0, 0.02) 40%, rgba(213, 43, 30, 0.03) 70%, transparent 100%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    padding-top: 4rem;
    padding-bottom: 2rem;
    z-index: 2;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    margin-bottom: 1.2rem;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1.1;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--color-white-bone) 50%, var(--color-khaki) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-gold-aged);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-description strong {
    color: var(--color-white-bone);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    align-items: center;
}

/* Marco Militar Solemne para Imagen Principal */
.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -30px; /* Sube la imagen del logo un poco arriba */
}

.frame-gold {
    position: relative;
    width: 320px;
    max-width: 90vw;
    aspect-ratio: 1 / 1;
    padding: 0;
    background: rgba(22, 31, 20, 0.45);
    border: 3px solid var(--color-gold-aged);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-premium), var(--shadow-gold);
    transition: var(--transition-smooth);
}

.frame-gold .hero-img {
    display: block;
    width: 100%;
    height: 100%;
    clip-path: circle(50% at 50% 50%);
    object-fit: cover;
    object-position: center;
    filter: none;
    transition: var(--transition-smooth);
    border: none;
}

.frame-gold:hover .hero-img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* Esquinas de diploma militar (Ocultas para el diseño con logo circular) */
.frame-corners {
    display: none;
}
.frame-corners span {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 2px solid var(--color-gold-aged);
    pointer-events: none;
}
.frame-corners .top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.frame-corners .top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.frame-corners .bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.frame-corners .bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

/* Indicador de scroll animado */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

/* ==========================================================================
   2. SECCIÓN DE HONOR
   ========================================================================== */
.section {
    padding: 6rem 0;
    position: relative;
    border-bottom: 1px solid rgba(61, 82, 56, 0.15);
}

.honor-section {
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, rgba(22, 31, 20, 0.3) 100%);
}

.honor-text {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.honor-text strong {
    color: var(--color-khaki);
    font-weight: 500;
}

/* ==========================================================================
   3. SECCIÓN BÍBLICA
   ========================================================================== */
.biblical-section {
    background: radial-gradient(circle, var(--color-olive-dark) 0%, var(--color-bg-dark) 100%);
    position: relative;
}

/* Cuadrante Bíblico Solemne */
.bible-card {
    background: linear-gradient(135deg, rgba(36, 51, 32, 0.6), rgba(22, 31, 20, 0.8));
    border: 1px solid rgba(197, 182, 138, 0.3);
    border-radius: 4px;
    padding: 3rem;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-premium), var(--shadow-gold);
    overflow: hidden;
}

.bible-card::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(197, 182, 138, 0.15);
    pointer-events: none;
}

.quote-icon {
    color: var(--color-gold-aged);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.bible-quote {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 600;
    line-height: 1.5;
    color: var(--color-white-bone);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.bible-author {
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-khaki);
    font-weight: 600;
}

/* ==========================================================================
   4. SECCIÓN DE DATOS DEL EVENTO
   ========================================================================== */
.event-details-section {
    background: var(--color-bg-dark);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

/* Tarjeta Militar de Detalles */
.detail-card {
    background: rgba(22, 31, 20, 0.4);
    border: 1px solid rgba(61, 82, 56, 0.4);
    padding: 2.5rem 1.8rem;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: var(--transition-smooth);
}

.detail-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-gold-aged);
    box-shadow: var(--shadow-premium), var(--shadow-gold);
    background: rgba(36, 51, 32, 0.4);
}

.detail-card:hover::before {
    background: linear-gradient(90deg, var(--bolivia-red), var(--bolivia-yellow), var(--bolivia-green));
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(61, 82, 56, 0.3);
    border: 1px solid var(--color-olive-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-khaki);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.detail-card:hover .card-icon {
    color: var(--color-white-bone);
    background: var(--color-olive-medium);
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(197, 182, 138, 0.3);
}

.card-icon svg {
    width: 26px;
    height: 26px;
}

.detail-card h3 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-khaki);
    margin-bottom: 0.8rem;
}

.detail-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-white-bone);
    margin-bottom: 0.4rem;
}

.detail-sub {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.card-link {
    margin-top: auto;
    padding-top: 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-gold-aged);
    letter-spacing: 1px;
    transition: var(--transition-smooth);
}

.card-link:hover {
    color: var(--color-white-bone);
}

/* ==========================================================================
   5. SECCIÓN DE GALERÍA
   ========================================================================== */
.gallery-section {
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, rgba(22, 31, 20, 0.2) 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

.gallery-frame {
    position: relative;
    border: 1px solid rgba(61, 82, 56, 0.5);
    padding: 8px;
    background: rgba(22, 31, 20, 0.3);
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    overflow: hidden;
    height: 320px;
    transition: var(--transition-smooth);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: sepia(0.2) contrast(1.02) brightness(0.9);
    transition: var(--transition-smooth);
}

.gallery-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: linear-gradient(to top, rgba(12, 14, 11, 0.9) 0%, rgba(12, 14, 11, 0.4) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0.85;
    transition: var(--transition-smooth);
}

.gallery-caption {
    font-family: var(--font-title);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-khaki);
    text-align: center;
    font-weight: 600;
}

/* Efecto hover en galería */
.gallery-frame:hover {
    transform: scale(1.02);
    border-color: var(--color-gold-aged);
    box-shadow: var(--shadow-premium), var(--shadow-gold);
}

.gallery-frame:hover .gallery-img {
    filter: sepia(0) contrast(1.05) brightness(1);
    transform: scale(1.05);
}

.gallery-frame:hover .gallery-overlay {
    background: linear-gradient(to top, rgba(22, 31, 20, 0.95) 0%, rgba(22, 31, 20, 0.6) 60%, transparent 100%);
}

.gallery-frame:hover .gallery-caption {
    color: var(--color-white-bone);
}

/* ==========================================================================
   6. SECCIÓN MENSAJE FAMILIAR
   ========================================================================== */
.family-section {
    background: radial-gradient(circle, rgba(36, 51, 32, 0.3) 0%, var(--color-bg-dark) 100%);
}

.family-card {
    background: rgba(12, 14, 11, 0.6);
    border: 1px solid rgba(197, 182, 138, 0.2);
    border-radius: 4px;
    padding: 4rem 3rem;
    box-shadow: var(--shadow-premium);
    position: relative;
}

.family-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(197, 182, 138, 0.08);
    pointer-events: none;
}

.family-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin: 1.5rem 0 2rem;
}

.family-text strong {
    color: var(--color-white-bone);
}

.family-footer {
    font-family: var(--font-title);
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--color-gold-aged);
    font-weight: 600;
}

/* ==========================================================================
   7. SECCIÓN FINAL / FOOTER
   ========================================================================== */
.final-section {
    background: linear-gradient(to top, var(--color-bg-dark) 0%, var(--color-olive-dark) 100%);
    padding-top: 5rem;
    position: relative;
}

.final-badge {
    margin-bottom: 1.5rem;
}

.final-division {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--color-white-bone);
    margin-bottom: 0.5rem;
}

.final-motto {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--color-khaki);
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

.btn-confirm {
    padding: 1.1rem 3.5rem;
    font-size: 1rem;
}

.footer-bottom {
    margin-top: 6rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(61, 82, 56, 0.2);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.designer-tag {
    font-family: var(--font-title);
    font-size: 0.75rem;
    color: var(--color-khaki-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 1rem;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.animate-pulse {
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(197, 182, 138, 0.4);
    }
    70% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(197, 182, 138, 0);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(197, 182, 138, 0);
    }
}

/* Transiciones de Carga/Scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: showUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.delay-1 {
    animation-delay: 0.3s;
}

@keyframes showUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clases que se activarán vía JS al hacer scroll */
.fade-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVIDAD
   ========================================================================== */

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        padding-top: 3rem;
    }
    
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .frame-gold .hero-img {
        max-width: none;
        height: 100%;
    }
    
    .details-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.35rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .frame-gold .hero-img {
        max-width: none;
        height: 100%;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .bible-card {
        padding: 2rem 1.2rem;
    }
    
    .bible-quote {
        font-size: 1.35rem;
    }
    
    .family-card {
        padding: 2.5rem 1.5rem;
    }
    
    .final-division {
        font-size: 1.8rem;
    }
    
    .audio-control-floating {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
