/* ===== Variables de color ===== */
:root {
    --color-bg: #f5f7fb;
    --color-text: #1c2530;
    --color-muted: #6b7b93;
    --color-primary: #0d6efd;
    --color-primary-soft: #e5f0ff;
    --color-accent: #00bcd4;
    --color-card-bg: #ffffff;
}

/* ===== Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
}

/* ===== Navbar ===== */
.navbar {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.navbar-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b !important;
    padding-inline: 0.9rem !important;
}

.nav-link:hover { color: #1d4ed8 !important; }

.nav-link.active {
    color: #1d4ed8 !important;
    position: relative;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0.25rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4ed8, #22c1c3);
}

/* ===== HERO base ===== */
.hero-min {
    padding: 5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
}

/* ===== Trust lines ===== */
.trust-line,
.trust-subline {
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.trust-line { color: #555; }
.trust-subline { color: #777; }

.trust-line:hover,
.trust-subline:hover { text-decoration: underline; }

.trust-cta {
    color: #555;
    font-weight: 600;
}

/* ===== Price ===== */
.price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111;
}

.price-unit {
    font-size: 0.95rem;
    color: #666;
}

/* ===== HOME HERO (index.php) ===== */
.hero-min.hero-home{
    color: var(--color-text);
    padding: 6rem 0 4.5rem;
    background:
        radial-gradient(circle at 18% 25%, rgba(13,110,253,0.16), transparent 55%),
        radial-gradient(circle at 92% 20%, rgba(0,188,212,0.18), transparent 58%),
        radial-gradient(circle at 70% 95%, rgba(13,110,253,0.10), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.hero-min.hero-home .lead{
    color: #4b5b6c;
    max-width: 720px;
    font-size: 1.05rem;
    line-height: 1.65;
}

/* Pills del home */
.hero-min.hero-home .pill-light-primary{
    background: rgba(13,110,253,0.10);
    color: #0b5ed7;
    border: 1px solid rgba(13,110,253,0.14);
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

/* Tarjetita “Próximamente” */
.hero-home .hero-note{
    background: rgba(255,255,255,0.70);
    border: 1px solid rgba(148,163,184,0.22);
    border-radius: 22px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 22px 55px rgba(15,23,42,0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-home .hero-note small{
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== HERO Casa Libélula ===== */
.hero-min.hero-libelula{
    position: relative;
    color: #fff;
    padding: 4.5rem 0 3.5rem;

    background-image: url("/CasaLibelulasRe/assets/img/CasaLibelula.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-min.hero-libelula::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        linear-gradient(90deg,
            rgba(3, 27, 78, 0.58) 0%,
            rgba(0, 173, 202, 0.22) 100%
        ),
        rgba(0, 40, 80, 0.18);
    z-index:0;
}

.hero-min.hero-libelula > .container{
    position: relative;
    z-index: 1;
}

.hero-min.hero-libelula .lead{
    color: rgba(255,255,255,0.90);
    max-width: 640px;
}

.hero-min.hero-libelula .pill{
    background: rgba(255,255,255,0.14);
    color: #fff;
}

/* ===== Imagen derecha del hero ===== */
.hero-img-rounded{
    border-radius: 24px !important;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.25) !important;
    object-fit: cover;
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== Pills / tags ===== */
.pill {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pill-light-primary {
    background-color: var(--color-primary-soft);
    color: var(--color-primary);
}

/* ===== Cards ===== */
.card-section {
    border-radius: 22px;
    border: none;
    box-shadow: 0 22px 60px rgba(15,23,42,0.10);
    background-color: var(--color-card-bg);
    overflow: hidden;
    position: relative;
}

.card.card-section {
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.card.card-section:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 75px rgba(15,23,42,0.16);
}

/* Imágenes en cards del HOME */
.card-section .card-img-top{
    height: 280px;
    object-fit: cover;
    pointer-events: none;
}

/* ===== Tipos de título / textos ===== */
.section-title {
    font-weight: 600;
    letter-spacing: 0.02em;
}

h1, .display-6, .section-title {
    letter-spacing: 0.03em;
}

.price-highlight {
    font-size: 1.05rem;
    font-weight: 600;
}

/* ===== Botones ===== */
.btn {
    border-radius: 999px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 14px 30px rgba(13,110,253,0.22);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 18px 38px rgba(13,110,253,0.28);
}

/* Botón "Pagar y reservar" premium */
.btn-reserva {
    border-radius: 999px;
    padding-inline: 1.8rem;
    padding-block: 0.85rem;
    font-weight: 600;
    font-size: 0.98rem;
    background: linear-gradient(135deg, #2563eb, #22c1c3);
    border: none;
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, filter 0.15s ease-out;
}

.btn-reserva:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.4);
}

.btn-reserva:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

/* ===== Formularios ===== */
form .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-muted);
}

form .form-control,
form .form-select {
    border-radius: 0.9rem;
    border-color: rgba(148, 163, 184, 0.6);
}

form .form-control:focus,
form .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.18rem rgba(13, 110, 253, 0.2);
}

/* Flatpickr */
.flatpickr-calendar {
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    font-family: inherit;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #0d6efd;
    border-color: #0d6efd;
}
.flatpickr-day.today {
    border-color: #0d6efd;
}
.flatpickr-input[readonly] {
    background-color: #fff;
    cursor: pointer;
}

/* =====================================================
   ===== Carousel (CORREGIDO) – Premium + Mobile friendly
   (NO cambia tamaños de letra)
===================================================== */

/* Si usas el ancla <a id="galeria"></a>, esto evita que se esconda bajo navbar */
#galeria {
    scroll-margin-top: 90px;
}

/* Imagen: altura responsiva, sin saltos y sin deformar */
#libelulaGallery .carousel-item img {
    width: 100%;
    height: clamp(260px, 45vw, 520px);
    object-fit: cover;
    display: block;
    transform: translateZ(0);
}

/* Controles más “premium” */
#libelulaGallery .carousel-control-prev,
#libelulaGallery .carousel-control-next {
    width: 12%;
    opacity: 1;
}

#libelulaGallery .carousel-control-prev-icon,
#libelulaGallery .carousel-control-next-icon {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    background-size: 55% 55%;
}

#libelulaGallery .carousel-control-prev:hover .carousel-control-prev-icon,
#libelulaGallery .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

/* Indicadores: más pro + tocables */
#libelulaGallery .carousel-indicators {
    margin-bottom: 0.85rem;
}

#libelulaGallery .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin: 0 5px;
    opacity: 0.55;
    background-color: rgba(255,255,255,0.9);
}

#libelulaGallery .carousel-indicators .active {
    opacity: 1;
    transform: scale(1.15);
}

/* Mobile: controles grandes y área para dedo */
@media (max-width: 768px) {
    #libelulaGallery .carousel-control-prev,
    #libelulaGallery .carousel-control-next {
        width: 18%;
    }

    #libelulaGallery .carousel-control-prev-icon,
    #libelulaGallery .carousel-control-next-icon {
        width: 52px;
        height: 52px;
        background-size: 52% 52%;
    }

    #libelulaGallery .carousel-indicators [data-bs-target] {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    #libelulaGallery .carousel-item {
        transition: none !important;
    }
}

/* ===== Animación suave ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.7s ease-out forwards;
}
.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Layout móvil (sin tocar tamaños de letras) ===== */
@media (max-width: 991.98px) {
    .hero-min.hero-libelula {
        text-align: center;
        padding-top: 3.5rem;
    }

    .hero-min.hero-libelula .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .card-section { border-radius: 16px; }
}

@media (max-width: 575.98px) {
    #form-reserva .form-control,
    #form-reserva .form-select { font-size: 0.9rem; }

    .btn-reserva { width: 100%; }
}

/* ===== Footer ===== */
footer {
    font-size: 0.85rem;
    border-top: 1px solid rgba(148,163,184,0.18);
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
}

/* ===== HOME HERO: centrado pro sin tocar font-sizes ===== */
.hero-home .hero-home-wrap{
    max-width: 980px;       /* evita que quede “abierto” en pantallas grandes */
    margin: 0 auto;
}

/* que los botones no queden raros en móvil */
.hero-home .hero-cta .btn{
    white-space: nowrap;    /* evita que se partan palabras */
}

/* quita “márgenes” internos de .pill para que gap-2 sea el que mande */
.hero-home .pill{
    margin-right: 0;
    margin-bottom: 0;
}

/* mejor scroll al tocar anchors (por si luego usas #galeria, etc.) */
html { scroll-behavior: smooth; }

/* mobile: botones más cómodos sin cambiar tamaño de letra */
@media (max-width: 575.98px){
    .hero-home .hero-cta .btn{
        width: 100%;
        max-width: 340px;
        justify-content: center;
    }
}

/* FIX: Centrado real del texto del hero (home_desc) */
.hero-home .hero-home-wrap .lead{
    max-width: 760px;   /* ajusta si quieres: 680-820 */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    text-wrap: balance; /* si el navegador lo soporta, equilibra las líneas */
}

/* fallback por si algún navegador ignora balance */
@supports not (text-wrap: balance) {
    .hero-home .hero-home-wrap .lead{
        overflow-wrap: anywhere;
    }
}

/* ===== FIX Cards en móvil (imagen no se alarga raro) ===== */
.card-section .card-img-top{
    width: 100%;
    height: auto;              /* deja que el alto lo controle el ratio */
    aspect-ratio: 16 / 9;      /* proporción pro */
    object-fit: cover;
    display: block;
}

/* Desktop/tablet: si quieres más alto que 16:9 */
@media (min-width: 992px){
    .card-section .card-img-top{
        aspect-ratio: 16 / 7;  /* más “cinematográfico” en desktop */
    }
}

/* Fallback por si algún navegador no soporta aspect-ratio */
@supports not (aspect-ratio: 16 / 9){
    .card-section .card-img-top{
        height: 220px;
    }
    @media (min-width: 992px){
        .card-section .card-img-top{
            height: 280px;
        }
    }
}
