/* ==========================================================================
   PALETA DE COLORES E IDENTIDAD - QUERÉNDARO
   ========================================================================== */
:root {
    --querendaro-guinda: #691c32;
    --querendaro-guinda-dark: #4d1222;
    --querendaro-pink: #e91e63;
    /* Reemplazo de tono dorado/amarillo por rosa */
    --querendaro-pink-hover: #d81b60;
}

/* Clases auxiliares para reemplazar los amarillos de Bootstrap (bg-warning, text-warning, etc.) */
.bg-pink {
    background-color: var(--querendaro-pink) !important;
    color: #ffffff !important;
}

.text-pink {
    color: var(--querendaro-pink) !important;
}

.btn-pink {
    background-color: var(--querendaro-pink) !important;
    border-color: var(--querendaro-pink) !important;
    color: #ffffff !important;
}

.btn-pink:hover {
    background-color: var(--querendaro-pink-hover) !important;
    border-color: var(--querendaro-pink-hover) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   MICROINTERACCIONES GENERALES
   ========================================================================== */
.transform-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.transform-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

/* ==========================================================================
   SECCIÓN HERO / BANNER PRINCIPAL (VIDEO FULL COVER)
   ========================================================================== */
.hero-querendaro {
    position: relative;
    background-color: var(--querendaro-guinda);
    width: 100%;
    height: 450px;
    /* Altura fija para evitar colapso de contenedor */
    overflow: hidden;
}

.hero-video-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Ajuste de altura responsivo */
@media (max-width: 992px) {
    .hero-querendaro {
        height: 320px;
    }
}

@media (max-width: 576px) {
    .hero-querendaro {
        height: 220px;
    }
}

/* ==========================================================================
   EFECTO FLIP VERTICAL - MENÚ CIUDADANO
   ========================================================================== */
.flip-card-link {
    text-decoration: none !important;
    display: block;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px;
    perspective: 1000px;
    /* Habilita el efecto 3D */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 16px;
}

/* Activación de rotación vertical al hacer Hover */
.flip-card:hover .flip-card-inner {
    transform: rotateX(180deg);
}

/* Estilos comunes para ambas caras */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* CARA FRONTAL (BLANCA) */
.flip-card-front {
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.flip-icon {
    font-size: 3.5rem;
    color: #4a001f;
    margin-bottom: 15px;
}

.flip-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #4a001f;
    margin: 0;
    line-height: 1.1;
}

.flip-subtitle {
    font-size: 0.95rem;
    color: #333333;
    margin-top: 5px;
    font-weight: 500;
}

/* CARA TRASERA (GUINDA) */
.flip-card-back {
    background-color: #4a001f;
    /* Tono guinda oscuro de la captura */
    color: #ffffff;
    transform: rotateX(180deg);
    box-shadow: 0 10px 25px rgba(74, 0, 31, 0.3);
}

.flip-title-back {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}

.flip-subtitle-back {
    font-size: 0.95rem;
    color: #ffffff;
    opacity: 0.9;
    margin-top: 5px;
    margin-bottom: 20px;
    font-weight: 400;
}

.flip-icon-back {
    font-size: 3.5rem;
    color: #ffffff;
}

/* Responsivo para móviles */
@media (max-width: 576px) {
    .flip-card {
        height: 240px;
    }

    .flip-icon,
    .flip-icon-back {
        font-size: 2.5rem;
    }

    .flip-title,
    .flip-title-back {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   SECCIÓN EVENTOS & REDES SOCIALES (PARALLAX & EMBED)
   ========================================================================== */
.events-social-section {
    background-image: url('../img/paralax1.jpeg');
    background-attachment: fixed;
    /* Efecto Parallax en Scroll */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 550px;
}

/* Capa oscura superpuesta sobre el parallax */
.parallax-overlay {
    background: linear-gradient(135deg, rgba(74, 0, 31, 0.88) 0%, rgba(105, 28, 50, 0.82) 100%);
    z-index: 1;
}

/* TARJETA 1: INFORMACIÓN E INVITACIÓN */
.card-social-info {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    /* Efecto cristalino / Glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-social-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3) !important;
}

.btn-follow-fb {
    transition: all 0.3s ease;
}

.btn-follow-fb:hover {
    background-color: #ffffff !important;
    color: #4a001f !important;
    transform: scale(1.05);
}

/* TARJETA 2: EMBED FACEBOOK */
.card-facebook-embed {
    min-height: 500px;
    background-color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: transform 0.3s ease;
}

.card-facebook-embed:hover {
    transform: translateY(-5px);
}

.fb-page-wrapper {
    background-color: #f8f9fa;
}

/* Ajustes Responsivos para móviles (Desactiva Parallax en dispositivos que no lo soportan bien) */
@media (max-width: 991px) {
    .events-social-section {
        background-attachment: scroll;
    }

    .card-facebook-embed {
        min-height: 450px;
    }
}

/* ==========================================================================
   SECCIÓN ALGO DE QUERÉNDARO (TRANSICIÓN FLUIDA & YOUTUBE CARDS)
   ========================================================================== */
.algo-querendaro-section {
    /* Fondo con gradiente continuo para empatar con la sección de eventos */
    background: linear-gradient(180deg, rgba(74, 0, 31, 0.95) 0%, #4a001f 40%, #310a14 100%);
}

.video-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35) !important;
}

.video-card .ratio iframe {
    border: none;
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA LATERAL (INTERSECTION OBSERVER)
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.slide-from-left {
    transform: translateX(-80px);
}

.slide-from-right {
    transform: translateX(80px);
}

.fade-in {
    transform: translateY(20px);
}

/* Estado activo cuando entra a la vista */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}


/* ==========================================================================
   SECCIÓN VISITA QUERÉNDARO (TRANSICIÓN SUAVE & MAPA)
   ========================================================================== */
.visita-querendaro-section {
    /* Degradado suave continuo para empatar con la sección de arriba */
    background: linear-gradient(180deg, #f8f9fa 0%, rgba(74, 0, 31, 0.95) 15%, #4a001f 50%, #310a14 100%);
}

/* TARJETA DE INFORMACIÓN CON GLASSMORPHISM */
.card-visit-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-visit-info:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.35) !important;
}

/* TARJETA DEL MAPA */
.card-map-wrapper {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.card-map-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.35) !important;
}

.map-container iframe {
    filter: contrast(1.02);
}


/* ==========================================================================
   ESTILOS ESPECÍFICOS PARA LA PÁGINA ¿QUÉ HACER EN QUERÉNDARO?
   ========================================================================== */

/* Banner Principal de Bienvenida */
.hero-visit-section {
    background: linear-gradient(135deg,
            rgba(58, 0, 30, 0.92) 0%,
            rgba(106, 13, 49, 0.88) 50%,
            rgba(233, 30, 99, 0.85) 100%), url('../img/visit.png') center/cover no-repeat;
    position: relative;
    color: #ffffff;
}

/* Sombra de texto para maximizar la legibilidad sobre fondos complejos */
.hero-visit-section h2,
.hero-visit-section p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-visit-section p {
    color: #f8f9fa !important;
}

/* Imagen de apoyo en la hero section */
.hero-img-box {
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-img-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Tarjetas Turísticas */
.tourist-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tourist-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

.tourist-card-img-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
    background-color: #212529;
}

.tourist-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tourist-card:hover .tourist-card-img-wrapper img {
    transform: scale(1.08);
}

.tourist-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Contenedor de la imagen en las tarjetas de noticias */
.news-img-container {
    height: 200px;
    background: linear-gradient(135deg,
            rgba(33, 37, 41, 0.85) 0%,
            rgba(58, 0, 30, 0.90) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Efecto opcional de resplandor suave sobre el logo */
.news-img-container img {
    max-height: 100%;
    width: auto;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.hover-top:hover .news-img-container img {
    transform: scale(1.05);
}