/*
Theme Name: IIDD Landing Theme
Theme URI: https://www.turismoandaluz.com/
Description: Custom WordPress theme for the Sports facilities landing page. Fully responsive and administrable.
Version: 1.0.0
Author: Antigravity
Author URI: https://gitlab.turismoandaluz.com/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: idto-landing
*/

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@1,800;1,900&family=Montserrat:ital,wght@0,300;0,400;0,700;1,600;1,700&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #006241;
    --default-pink: #c2185b;
    --default-purple: #7b1fa2;
    --default-red: #b71c1c;
    --default-blue: #1a237e;
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-body);
    background-color: #000;
    overflow-x: hidden;
}

/* Contenedor Hero Principal */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    isolation: isolate;
}

/* Imagen de fondo limpia */
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Capa de multiplicación verde corporativa */
.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--primary-green);
    mix-blend-mode: multiply;
    opacity: 0.10;
    z-index: 1;
}

/* Contenido Principal */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1050px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Logotipo / Cabecera */
.header-container {
    width: 100%;
    max-width: 580px;
    margin-bottom: 3.5rem;
    text-align: center;
    animation: fadeDown 0.8s ease-out both;
}

.logo-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    /* mix-blend-mode: screen ayuda si el logo es blanco sobre negro */
    mix-blend-mode: screen;
}

/* Títulos en caso de que no haya imagen (Fallback de Texto Estilizado) */
.fallback-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-style: italic;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.1;
}

.fallback-subtitle {
    font-family: var(--font-body);
    font-weight: 700;
    font-style: normal;
    color: #fff;
    font-size: clamp(0.75rem, 1.8vw, 1.05rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fallback-subtitle::before, .fallback-subtitle::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

/* Cuadrícula de Botones */
.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem 2.8rem;
    width: 100%;
    max-width: 900px;
    margin-bottom: 3.5rem;
    animation: fadeIn 0.9s ease-out 0.2s both;
}

/* Estilo Base de los Botones */
.landing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    padding: 1.8rem 1rem;
    min-height: 95px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    border: none;
    font: inherit;
    width: 100%;
}

/* Configuración Asimétrica de las Esquinas (Curvas) */
/* Columna Izquierda (Botones 1 y 3) */
.button-grid > .landing-btn:nth-child(odd) {
    border-radius: 45px 45px 45px 0px;
}

/* Columna Derecha (Botones 2 y 4) */
.button-grid > .landing-btn:nth-child(even) {
    border-radius: 45px 45px 0px 45px;
}

/* Efecto del Texto en Negrita, Cursiva y con Marcador */
.btn-label-wrapper {
    font-family: var(--font-heading);
    font-weight: 900;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    display: inline-block;
    padding: 0 4px;
}

/* El Marcador / Highlighter */
.btn-label-wrapper::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -2px;
    right: -2px;
    height: 48%; /* cubre la mitad inferior del texto */
    background-color: var(--btn-accent, var(--default-pink));
    z-index: -1;
    transform: skewX(-12deg); /* Alineación perfecta con el estilo cursiva */
    transition: height 0.2s ease, opacity 0.2s ease;
}

/* Interacción Hover */
.landing-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    background-color: #fbfbfb;
}

.landing-btn:hover .btn-label-wrapper::before {
    height: 60%; /* El resaltado se agranda ligeramente */
}

/* Sección de Advertencias */
.info-section {
    text-align: center;
    width: 100%;
    max-width: 820px;
    color: #ffffff;
    animation: fadeUp 0.8s ease-out 0.4s both;
}

.info-primary {
    font-family: var(--font-body);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
}

.info-secondary {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.78rem, 1.5vw, 0.95rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.info-secondary a {
    color: #ffffff;
    text-decoration: underline;
    transition: color 0.2s;
}

.info-secondary a:hover {
    color: #d1ffd6;
}

/* Pie de Página (Footer) */
.landing-footer {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    animation: fadeIn 1s ease-out 0.6s both;
}

.footer-left {
    color: #ffffff;
    font-family: var(--font-body);
    font-size: clamp(0.72rem, 1.4vw, 0.85rem);
    line-height: 1.6;
}

.footer-facility-name {
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    height: 48px; /* Ajuste premium del tamaño del logotipo */
    width: auto;
    object-fit: contain;
    mix-blend-mode: screen; /* Filtra fondos negros si los hay */
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ajustes Responsive y Media Queries */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1.2rem 1.5rem 1.2rem;
    }
    
    .header-container {
        margin-bottom: 2.5rem;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 420px;
        margin-bottom: 2.5rem;
    }
    
    /* En móvil, mantenemos las esquinas redondeadas asimétricas para dar personalidad */
    .button-grid > .landing-btn:nth-child(odd) {
        border-radius: 35px 35px 35px 0px;
    }
    
    .button-grid > .landing-btn:nth-child(even) {
        border-radius: 35px 35px 0px 35px;
    }
    
    .landing-btn {
        padding: 1.5rem 1rem;
        min-height: 80px;
    }
    
    .landing-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.8rem;
        margin-top: 2rem;
    }
    
    .footer-right {
        justify-content: center;
    }
    
    .footer-logo {
        height: 40px;
    }
}

/* Modal de carruseles WP Carousel */
body.idto-modal-open {
    overflow: hidden;
}

.idto-carousel-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.idto-carousel-modal[hidden] {
    display: none;
}

.idto-carousel-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.idto-carousel-modal__panel {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 1.5rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.idto-carousel-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    color: #111;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.idto-carousel-modal__content {
    width: 100%;
}

/* Modal de vídeos self-hosted */
.idto-video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.idto-video-modal[hidden] {
    display: none;
}

.idto-video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.idto-video-modal__panel {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #000000;
    border-radius: 16px;
    padding: 2.5rem 1rem 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.idto-video-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.idto-video-modal__content {
    width: 100%;
}

.idto-video-modal__player {
    display: block;
    width: 100%;
    max-height: 80vh;
    background: #000000;
}

/* Widget flotante Niki (asistente virtual) */
.idto-niki-widget {
    position: fixed;
    right: 0;
    bottom: 100px;
    z-index: 100;
    pointer-events: none;
}

.idto-niki-widget__toggle {
    position: relative;
    display: block;
    overflow: hidden;
    width: 210px;
    height: 420px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.idto-niki-widget.is-expanded .idto-niki-widget__toggle {
    width: min(680px, 88vw);
    height: min(840px, 58vh);
}

.idto-niki-widget__view {
    position: absolute;
    right: 0;
    bottom: 0;
    line-height: 0;
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.idto-niki-widget__view img {
    display: block;
    width: auto;
    height: 420px;
    max-width: none;
    object-fit: contain;
    object-position: right bottom;
    user-select: none;
    -webkit-user-drag: none;
}

.idto-niki-widget.is-expanded .idto-niki-widget__view img {
    height: min(840px, 58vh);
}

.idto-niki-widget__view--collapsed {
    opacity: 1;
    transform: translateX(0);
}

.idto-niki-widget__view--expanded {
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
}

.idto-niki-widget.is-expanded .idto-niki-widget__view--collapsed {
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
}

.idto-niki-widget.is-expanded .idto-niki-widget__view--expanded {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.idto-niki-widget__toggle:hover .idto-niki-widget__view--collapsed,
.idto-niki-widget__toggle:focus-visible .idto-niki-widget__view--collapsed {
    transform: translateX(-4px);
}

.idto-niki-widget.is-expanded .idto-niki-widget__toggle:hover .idto-niki-widget__view--expanded,
.idto-niki-widget.is-expanded .idto-niki-widget__toggle:focus-visible .idto-niki-widget__view--expanded {
    transform: translateX(-2px);
}

.idto-niki-widget__toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .idto-niki-widget {
        bottom: 80px;
    }

    .idto-niki-widget__view--expanded {
        display: none;
    }

    .idto-niki-widget__toggle {
        width: 156px;
        height: 310px;
    }

    .idto-niki-widget.is-expanded .idto-niki-widget__toggle {
        width: min(520px, 90vw);
        height: min(640px, 52vh);
    }

    .idto-niki-widget__view img {
        height: 310px;
    }

    .idto-niki-widget.is-expanded .idto-niki-widget__view img {
        height: min(640px, 52vh);
    }
}
