/* Estilos personalizados para Bernal TV */

/* Variables de color */
:root {
    --bernal-blue: #324390;
    --bernal-gray: #84848B;
    --white: #ffffff;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Ajustes para embeds responsivos */
.fb-post,
.fb-video,
.instagram-media {
    max-width: 100% !important;
    width: 100% !important;
}

/* Asegurar que los embeds de Instagram sean responsivos */
.instagram-media {
    min-width: 100% !important;
    width: 100% !important;
}

/* Lazy loading para embeds */
[data-lazy="true"] {
    opacity: 0;
    transition: opacity 0.3s;
}

[data-lazy="true"].loaded {
    opacity: 1;
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .fb-post,
    .fb-video {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .instagram-media {
        min-width: 100% !important;
        width: 100% !important;
    }
}

/* Mejoras de accesibilidad */
a:focus,
button:focus {
    outline: 2px solid var(--bernal-blue);
    outline-offset: 2px;
}

/* Animaciones suaves */
.transition {
    transition: all 0.3s ease;
}

/* Ajustes de contraste para accesibilidad */
.text-bernal-gray {
    color: var(--bernal-gray);
}

.bg-bernal-blue {
    background-color: var(--bernal-blue);
}

.text-bernal-blue {
    color: var(--bernal-blue);
}

/* Espaciado para header fijo */
body {
    padding-top: 0;
}

/* Ajustes para formularios */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--bernal-blue);
}

/* Mejoras de touch targets en móvil */
@media (max-width: 768px) {
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Estilos para el menú móvil */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.show {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

/* Ajustes para aspect ratio de videos */
.aspect-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.aspect-video > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Asegurar que los iframes de Facebook sean responsivos */
.aspect-video iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* Mejoras de rendimiento */
img {
    max-width: 100%;
    height: auto;
}

/* Loading state para embeds */
.embed-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hero Section con imagen de fondo y overlay */
.hero-section {
    min-height: 550px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: 650px;
    }
}

.hero-section .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Asegurar que el texto del hero sea legible */

.hero-section p {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* CTA principal destacado */
.hero-section a[href*="facebook"] {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.hero-section a[href*="facebook"]:hover {
    transform: translateY(-2px);
    background-color: #2a3a8f !important;
    box-shadow: 0 10px 25px rgba(52, 73, 178, 0.4);
}
