/* ================= VARIABLES · PALETA ADI CAÑO NEGRO ================= */
/*
  FILOSOFÍA: Verde como alma, naranja como firma.
  El naranja aparece solo en puntos de identidad clave
  (borde header, acento activo, hover de links, stat numbers,
   borde footer, FAB). Todo lo demás es verde o neutro cálido.
*/
:root {
    /* ── Verdes (protagonistas) ── */
    --verde-principal: #163320;
    --verde-medio: #2A6038;
    --verde-secundario: #3D7A4E;
    --verde-claro: #53B53C;
    --verde-hover: #4E9A5A;
    --verde-oscuro: #0E2116;
    --verde-suave: #E8F2E9;

    /* ── Naranja (firma / acento puntual) ── */
    --naranja-acento: #D94F15;
    --naranja-hover: #B84010;
    --naranja-suave: #FCE9DF;

    /* ── Ámbar mínimo (manos del logo, uso muy restringido) ── */
    --ambar: #C8900E;

    /* ── Fondos ── */
    --fondo: #F3F1EB;
    --fondo-suave: #E9F0EA;
    --blanco: #FFFFFF;

    /* ── Texto ── */
    --texto: #151F16;
    --texto-suave: #3A4D3C;
    --texto-muted: #637065;

    /* ── Sombras ── */
    --sombra: 0 10px 28px rgba(14, 33, 22, 0.11);
    --sombra-hover: 0 18px 40px rgba(14, 33, 22, 0.19);
}

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Bootstrap Reboot usa selectores de elemento (especificidad 0,0,1) que
   ganan sobre el * universal (0,0,0). Estos overrides los neutralizan. */
ul,
ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--fondo);
    color: var(--texto);
    line-height: 1.6;
    padding-top: 90px;
    overflow-x: hidden;
}

/* Tipografía más orgánica para títulos (no tan "cuadrada" como Poppins) */
h1,
h2,
h3,
p,
span,
h4,
a,
small,
button {
    font-family: 'Fraunces', serif;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none !important;
}

ul {
    list-style: none;
}

.container {
    width: min(1200px, 90%);
    margin: auto;
}

/* ================= HERO ================= */
.hero {
    min-height: 100vh;
    background:
        linear-gradient(rgba(11, 28, 16, 0.25), rgba(11, 28, 16, 0.55)),
        url('../img/index/fondo.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 0 90px;
    color: white;
}

.hero-content {
    max-width: 760px;
    animation: fadeUp 1s ease;
}

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

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

.hero-tag {
    display: inline-block;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(10, 20, 12, 0.42);
    border: 1px solid rgba(113, 201, 138, 0.45);
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero h1 {
    font-size: 76px;
    line-height: 1.02;
    margin-bottom: 22px;
    font-weight: 800;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.60), 0 10px 30px rgba(0, 0, 0, 0.35);
    letter-spacing: -1px;
}

/* Naranja puntual en el span del h1: identidad del logo */
.hero h1 span {
    color: var(--naranja-acento);
}

.hero p span {
    color: #ffffff;
}

.description {
    max-width: 680px;
    font-size: 21px;
    color: #eef0ee;
    margin-bottom: 28px;
    font-weight: 400;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
}

.location {
    color: #ddeedd;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.location i {
    margin-right: 8px;
    color: var(--naranja-acento);
}

/* ================= TEXTOS GENERALES ================= */
.section-label {
    display: inline-block;
    color: var(--verde-claro);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 12px;
}

.section-label.center {
    display: block;
    text-align: center;
}

.section-title {
    text-align: center;
    font-size: 40px;
    color: var(--verde-principal);
    margin-bottom: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    color: var(--texto-suave);
    font-size: 17px;
    line-height: 1.8;
}

/* ================= ABOUT ================= */
.about-refuge {
    padding: 100px 0;
    background: var(--fondo);
}


.about-text h2 {
    font-size: 38px;
    color: var(--verde-principal);
    margin-bottom: 22px;
}

.about-text p {
    color: var(--texto-suave);
    font-size: 17px;
    margin-bottom: 18px;
    line-height: 1.8;
}

.about-image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.about-image img {
    border-radius: 24px;
    box-shadow: var(--sombra);
    transition: 0.4s ease;
    border: 1px solid var(--verde-oscuro);
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--sombra-hover);
}

.about-image-caption-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.image-credit {
    font-size: 13px;
    color: var(--texto-muted);
    text-align: right;
}

.photo-credit {
    font-size: 12px;
    color: var(--texto-muted);
    font-style: italic;
}

/* ================= STATS ================= */
.stats-section {
    padding: 90px 0;
    background: linear-gradient(180deg, var(--fondo-suave) 0%, var(--fondo) 100%);
}

.stats-grid {
    margin-top: 45px;
}

.stat-box {
    background: var(--blanco);
    padding: 35px 25px;
    border-radius: 24px;
    box-shadow: var(--sombra);
    text-align: center;
    transition: 0.3s ease;
    border-top: 3px solid var(--verde-claro);
}

.stat-box:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-hover);
    /* Naranja solo en hover del stat: toque de energía */
    border-top-color: var(--naranja-acento);
}

.stat-box h3 {
    font-size: 44px;
    color: var(--verde-principal);
    margin-bottom: 8px;
    font-weight: 800;
}

.stat-box p {
    color: var(--texto-suave);
    font-size: 16px;
    font-weight: 500;
}

/* ================= EXPLORE SECTION ================= */
.explore-section {
    padding: 100px 0;
    background: var(--blanco);
}

.cards {
    margin-top: 50px;
}

.card-item {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: 0.35s ease;
    border: 0.1px solid var(--verde-claro) !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--sombra-hover);
    border-color: rgba(42, 96, 56, 0.18);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: 0.45s ease;
}

.card-item:hover .card-image img {
    transform: scale(1.06);
}

.card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--verde-claro);
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(42, 96, 56, 0.18);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content h3 {
    color: var(--verde-principal);
    font-size: 22px;
    margin-bottom: 10px;
}

.card-content p {
    color: var(--texto-suave);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Naranja solo en el link de la tarjeta: llamada a la acción */
.card-link {
    color: var(--naranja-acento);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s ease;
    font-size: 14px;
    margin-top: auto;
}

.card-item:hover .card-link {
    color: var(--naranja-hover);
    gap: 12px;
}

/* ================= BOTONES ================= */
/* Botón primario = verde oscuro (dominante) */
.btn-primary {
    background: var(--verde-principal);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 6px 18px rgba(22, 51, 32, 0.22);
    display: inline-block;
}

.btn-primary:hover {
    background: var(--verde-medio);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(22, 51, 32, 0.28);
    color: white;
}

/* Botón CTA = naranja (firma visual, uso puntual) */
.btn-cta {
    background: var(--naranja-acento);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 6px 18px rgba(217, 79, 21, 0.22);
    display: inline-block;
}

.btn-cta:hover {
    background: var(--naranja-hover);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: var(--verde-medio);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--verde-secundario);
    transform: translateY(-2px);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--verde-principal);
    padding: 13px 27px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid var(--verde-secundario);
    cursor: pointer;
    transition: 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background: var(--verde-suave);
    border-color: var(--verde-medio);
    transform: translateY(-2px);
}

/* ================= INPUTS / FORMULARIOS ================= */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(22, 51, 32, 0.16);
    background: var(--blanco);
    color: var(--texto);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: 0.25s ease;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--verde-secundario);
    box-shadow: 0 0 0 3px rgba(61, 122, 78, 0.12);
}

input::placeholder,
textarea::placeholder {
    color: var(--texto-muted);
}

/* ================= FINAL / BANNER SECTION ================= */
.banner-section {
    background: linear-gradient(180deg, var(--fondo-suave) 0%, var(--fondo) 100%);
    padding: 90px 0;
}

.banner-content {
    max-width: 850px;
    margin: auto;
    text-align: center;
}

.banner-tag {
    color: var(--verde-claro) !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 18px;
}

.banner-content h2 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 18px;
    color: var(--verde-principal);
    font-weight: 800;
}

.banner-content p {
    font-size: 18px;
    color: var(--texto-suave);
    max-width: 720px;
    margin: auto;
    line-height: 1.8;
}

/* ================= FAB ================= */
.fab-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
}

/* FAB principal en verde oscuro, no naranja */
.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 22px;
    background: rgba(20, 40, 20, 0.95);
    border: 1.5px solid rgba(217, 79, 21, 0.8);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(217, 79, 21, 0.15);
    transition: all 0.3s ease;
}

.fab-main:hover {
    background: rgba(30, 55, 30, 0.98);
    box-shadow: 0 0 25px rgba(217, 79, 21, 0.3);
    transform: translateY(-2px);
}

.fab-main i {
    transition: 0.3s ease;
}

.fab-container.open .fab-main i {
    transform: rotate(45deg);
}

.fab-options {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: 0.3s ease;
}

.fab-container.open .fab-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fab-option {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: 0.3s ease;
}

.fab-option:hover {
    transform: scale(1.12);
}

.fab-option.whatsapp {
    background: white;
    color: #25d366;
    border: 2px solid #25d366;
}

.fab-option.whatsapp:hover {
    background: #25d366;
    color: #ffffff;
}

.fab-option.map {
    background: white;
    color: var(--naranja-acento);
    border: 2px solid var(--naranja-acento);
}

.fab-option.map:hover {
    background: var(--naranja-acento);
    color: #ffffff;
}

.fab-option.help {
    background: white;
    color: var(--verde-principal);
    border: 2px solid var(--verde-principal);
}

.fab-option.help:hover {
    background: var(--verde-principal);
    color: #ffffff;
}

/* ================= MODAL AYUDA ================= */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 28, 16, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 2000;
}

.help-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.help-content {
    background: white;
    width: min(600px, 90%);
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(11, 28, 16, 0.32);
    /* Naranja solo en el borde top del modal: guiño de identidad */
    border-top: 4px solid var(--naranja-acento);
    animation: fadeUp 0.4s ease;
}

.help-content h2 {
    margin-bottom: 20px;
    color: var(--verde-principal);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--texto-muted);
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--naranja-acento);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.faq-item h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--verde-principal);
}

.faq-item p {
    font-size: 14px;
    color: var(--texto-suave);
}

/* ================= PESTAÑA IA VERTICAL ================= */
.chat-ia-tab {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 999;
}

/* ================= PESTAÑA IA VERTICAL ================= */
.chat-ia-toggle {
    width: 20px;
    height: 380px;
    border: 1.5px solid rgba(217, 79, 21, 0.8);
    border-right: none;
    border-radius: 18px 0 0 18px;
    background: rgba(20, 40, 20, 0.95);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: -5px 0 14px rgba(0,0,0,0.55), 0 0 20px rgba(217, 79, 21, 0.22);
}

.chat-ia-toggle:hover {
    background: rgba(30, 55, 30, 0.98);
    box-shadow: 0 0 25px rgba(217, 79, 21, 0.3);
}

.chat-ia-link {
    width: 0;
    height: 500px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(20, 40, 20, 0.95);
    color: white;

    border-top: 1.5px solid rgba(217, 79, 21, 0.8);
    border-left: 1.5px solid rgba(217, 79, 21, 0.8);
    border-bottom: 1.5px solid rgba(217, 79, 21, 0.8);

    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;

    box-shadow: 0 0 18px rgba(217, 79, 21, 0.15);
    transition: all 0.3s ease;
}

.chat-ia-link:hover {
    background: rgba(30, 55, 30, 0.98);
    color: white;
}

.chat-ia-toggle i {
    font-size: 13px;
    transition: 0.3s ease;
}

.chat-ia-link span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.chat-ia-tab.open .chat-ia-link {
    width: 28px;
    opacity: 1;
    pointer-events: auto;
}

.chat-ia-tab.open .chat-ia-toggle {
    background: var(--naranja-acento);
}

.chat-ia-tab.open .chat-ia-toggle i {
    transform: rotate(180deg);
}

@keyframes spinLoader {
    to {
        transform: rotate(360deg);
    }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
    /* Ocultar FAB cuando el menú está abierto */
    body:has(#menuNav.show) .fab-container {
        display: none !important;
    }
}

@media (max-width: 1100px) {
    .hero {
        padding: 0 40px;
    }

    .hero h1 {
        font-size: 58px;
    }

    .about-container {
        gap: 35px;
    }
}

@media (max-width: 900px) {
    body {
        padding-top: 0;
    }

    .hero {
        padding: 120px 28px 60px;
        text-align: center;
        justify-content: center;
        min-height: 100vh;
    }

    .hero-content {
        max-width: 100%;
    }

    .description {
        margin-inline: auto;
    }

    .banner-content h2 {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    body {
        padding-top: 0;
    }

    .hero h1 {
        font-size: 42px;
    }

    .description {
        font-size: 17px;
    }

    .section-title,
    .about-text h2,
    .banner-content h2 {
        font-size: 30px;
    }

    .card-image img {
        height: 220px;
    }

    .banner-content p {
        font-size: 17px;
    }

    .hero-tag,
    .banner-tag {
        font-size: 13px;
    }
}

/* ── 768px: iPad Mini, iPad Air, Surface Pro 7 portrait ── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 50px;
    }

    .about-container {
        gap: 28px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* ── 480px: Surface Duo, Samsung A51/71, Galaxy S20 Ultra ── */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 36px;
    }

    .description {
        font-size: 16px;
    }

    .about-text h2 {
        font-size: 28px;
    }

    .stat-box h3 {
        font-size: 36px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

/* ── 390px: iPhone 12 Pro, iPhone 14 Pro Max, Pixel 7 ── */
@media (max-width: 390px) {
    .hero {
        padding: 110px 24px 50px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .section-title,
    .about-text h2,
    .banner-content h2 {
        font-size: 24px;
    }

    .section-subtitle,
    .about-text p {
        font-size: 15px;
    }

    .card-image img {
        height: 190px;
    }
}

/* ── 344px: Galaxy Z Fold 5 (plegado), pantallas muy estrechas ── */
@media (max-width: 344px) {
    .hero {
        padding: 100px 20px 40px;
    }

    .hero h1 {
        font-size: 26px;
        line-height: 1.2;
    }

    .description {
        font-size: 14px;
    }

    .hero-tag,
    .banner-tag {
        font-size: 11px;
        padding: 5px 12px;
        letter-spacing: 1px;
    }

    .location {
        font-size: 13px;
    }

    .section-title,
    .about-text h2,
    .banner-content h2 {
        font-size: 20px;
    }

    .stat-box h3 {
        font-size: 30px;
    }

    .banner-content p,
    .about-text p {
        font-size: 14px;
    }

    .card-image img {
        height: 170px;
    }
}

/* ── Bandera preview responsive ── */
@media (max-width: 900px) {
    .bandera-preview-section {
        padding: 70px 0;
    }

    .bandera-logro-row {
        margin-top: 36px;
        margin-bottom: 36px;
    }

    .bandera-info-title {
        font-size: 22px;
    }

    .byear-num {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .bandera-logro-card {
        padding: 32px 22px;
    }

    .bandera-flag-icon {
        font-size: 40px;
    }

    .bstar {
        font-size: 28px;
    }

    .bandera-feature-card {
        padding: 24px 20px;
    }
}

/* ── Pantallas cortas: Nest Hub (1024×600), Nest Hub Max (1280×800) ── */
@media (max-height: 700px) and (min-width: 900px) {
    .hero {
        min-height: 100dvh;
        padding: 90px 40px 30px;
    }

    .hero h1 {
        font-size: 48px;
        margin-bottom: 10px;
    }

    .description {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .hero-tag {
        margin-bottom: 12px;
    }
}