/* =========================================================
   HOME (scoped) — Variables + Layout base
   ========================================================= */

.page-home {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;

    /* ---------- Variables SOLO para Home (NO usar :root aquí) ---------- */
    --gfc-black: #0F172A;
    --gfc-gold: #E8B532;
    --gfc-gold-light: #F4D989;
    --gfc-gold-dark: #B88A26;
    --gfc-white: #FFFFFF;

    --gfc-gray-50: #F8FAFC;
    --gfc-gray-100: #F1F5F9;
    --gfc-gray-200: #E2E8F0;
    --gfc-gray-300: #CBD5E1;
    --gfc-gray-400: #94A3B8;
    --gfc-gray-500: #64748B;
    --gfc-gray-600: #475569;
    --gfc-gray-700: #334155;
    --gfc-gray-800: #1E293B;
    --gfc-gray-900: #0F172A;

    --gfc-border: #E2E8F0;
    --gfc-border-hover: #94A3B8;

    /* Si tu main.css no define success, esto evita que se vea negro */
    --gfc-success: #16a34a;

    /* ✅ CONTROL MAPA */
    --map-scale: 1;
    --map-pos-y: 50%;
    /* PC */
    --map-title-offset: 80px;
}

/* =========================================================
   PDF: eliminar slogans/kickers (Home)
   ========================================================= */

.page-home .gfc-slogan,
.page-home .gfc-kicker,
.page-home .page-header .slogan,
.page-home [class*="slogan"],
.page-home [class*="kicker"] {
    display: none !important;
}

/* =========================================================
   Hero
   ========================================================= */

.page-home .gfc-page-hero {
    background: var(--gfc-white);
    border: 1px solid var(--gfc-border);
    border-radius: 20px;
    padding: clamp(32px, 5vw, 60px);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.page-home .gfc-page-hero::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.page-home .gfc-page-hero>* {
    position: relative;
    z-index: 1;
}

.page-home .gfc-page-hero h1 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--gfc-gray-900);
    line-height: 1.2;
    text-transform: uppercase !important;
}

/* =========================================================
   CAROUSEL HOME – IMAGEN COMPLETA SIN LOGO DE FONDO
   ========================================================= */

.page-home .gfc-carousel-wrap {
    margin-top: 40px;
    margin-bottom: 50px;
}

.page-home .gfc-carousel {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--gfc-border);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
    background: var(--gfc-white);
}

/* SLIDE BASE */
.page-home .gfc-carousel-slide {
    min-height: clamp(380px, 48vw, 560px);
    padding: clamp(30px, 4vw, 60px);
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;

    /* Fondo base relleno */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Capa que muestra la imagen completa */
.page-home .gfc-carousel-slide::before {
    content: "";
    position: absolute;
    inset: 0;

    background: inherit;
    background-size: contain;
    /* muestra completa */
    background-position: center;
    background-repeat: no-repeat;

    z-index: 1;
    pointer-events: none;
}

/* Capa que oscurece y elimina visualmente el logo incrustado */
.page-home .gfc-carousel-slide::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 45%;
    height: 55%;

    background: linear-gradient(to top right,
            rgba(15, 23, 42, 0.98) 0%,
            rgba(15, 23, 42, 0.90) 40%,
            rgba(15, 23, 42, 0.0) 100%);

    z-index: 2;
    pointer-events: none;
}

/* Overlay de texto */
.page-home .gfc-carousel-overlay {
    position: relative;
    z-index: 3;
}

.page-home .gfc-carousel-overlay h2 {
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 15px;
    color: var(--gfc-white);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
}

.page-home .gfc-carousel-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 600px;
}

/* IMÁGENES */
.page-home .gfc-slide-1 {
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.5)), url('../img/1.png');
}

.page-home .gfc-slide-2 {
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.5)), url('../img/2.png');
}

.page-home .gfc-slide-3 {
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.5)), url('../img/3.png');
}

.page-home .gfc-slide-4 {
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.5)), url('../img/4.png');
}

/* Indicadores */
.page-home .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--gfc-white);
    background: transparent;
    margin: 0 6px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.page-home .carousel-indicators button.active {
    background: var(--gfc-white);
    border-color: var(--gfc-white);
    opacity: 1;
}

/* Controles */
.page-home .carousel-control-prev,
.page-home .carousel-control-next {
    width: auto;
    background: none !important;
    border: none !important;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.page-home .carousel-control-prev-icon,
.page-home .carousel-control-next-icon {
    background-image: none !important;
    font-size: 2.8rem;
    color: var(--gfc-white);
    font-weight: 300;
}

.page-home .carousel-control-prev-icon::before {
    content: "‹";
}

.page-home .carousel-control-next-icon::before {
    content: "›";
}

.page-home .gfc-carousel:hover .carousel-control-prev,
.page-home .gfc-carousel:hover .carousel-control-next {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .page-home .gfc-carousel-slide {
        min-height: 300px;
    }

    .page-home .carousel-control-prev,
    .page-home .carousel-control-next {
        display: none;
    }
}

@media (max-width: 576px) {
    .page-home .gfc-carousel-slide {
        min-height: 260px;
    }
}

/* =========================================================
   MAP HERO (ABOUT SECTION) — Manteniendo tus variables de control
   ========================================================= */

.page-home .gfc-about-section {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    isolation: isolate;
    background-color: var(--gfc-gray-900);
    min-height: clamp(280px, 26vw, 520px);
    padding: 0 !important;
}

.page-home .gfc-about-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.page-home .gfc-about-bg::before {
    content: "";
    position: absolute;
    inset: 0;

    background-image: url('/static/img/map.png');
    background-repeat: no-repeat;
    background-position: 50% var(--map-pos-y);

    /* ✅ no recorta (lo dejamos como tú lo tenías) */
    background-size: cover;

    /* ✅ zoom */
    transform: translate3d(0, 0, 0) scale(var(--map-scale));
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
}

.page-home .gfc-about-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
            rgba(15, 23, 42, 0.50) 0%,
            rgba(15, 23, 42, 0.78) 70%,
            rgba(15, 23, 42, 0.88) 100%);
    z-index: 2;
}

/* Oculta cualquier logo “map” */
.page-home .gfc-map-logo,
.page-home .map-logo,
.page-home [class*="map"][class*="logo"] {
    display: none !important;
}

.page-home .gfc-about-header,
.page-home .gfc-about-section .container {
    position: relative;
    z-index: 4;
}

.page-home .gfc-about-header {
    text-align: center;
    padding: clamp(26px, 4vw, 46px);
    margin: 0;
    transform: translateY(var(--map-title-offset));
}

.page-home .gfc-about-header h2.h3 {
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    color: var(--gfc-white);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.page-home .gfc-divider {
    width: 80px;
    height: 3px;
    background: var(--gfc-white);
    border-radius: 2px;
    margin: 10px auto 0;
}

/* =========================================================
   About items (si los usas)
   ========================================================= */

.page-home .gfc-about-item {
    position: relative;
    z-index: 4;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.page-home .gfc-about-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.page-home .gfc-about-item h3.h5 {
    color: var(--gfc-white) !important;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gfc-white);
    padding-bottom: 10px;
    display: inline-block;
}

.page-home .gfc-about-item p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 400;
}

/* =========================================================
   Botones (Home)
   ========================================================= */

.page-home .btn-dark {
    background: var(--gfc-gray-900);
    border: 1px solid var(--gfc-gray-900);
    border-radius: 8px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gfc-white);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-home .btn-dark:hover {
    background: var(--gfc-black);
    border-color: var(--gfc-black);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-home .btn-outline-dark {
    background: transparent;
    border: 1px solid var(--gfc-white);
    border-radius: 8px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gfc-white);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-home .btn-outline-dark:hover {
    background: var(--gfc-white);
    border-color: var(--gfc-white);
    color: var(--gfc-gray-900);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   Cards normales
   ========================================================= */

.page-home .gfc-card {
    background: var(--gfc-white);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--gfc-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.page-home .gfc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    border-color: var(--gfc-border-hover);
}

.page-home .gfc-card h2,
.page-home .gfc-card h3,
.page-home .gfc-card h4,
.page-home .gfc-card h5 {
    color: var(--gfc-gray-800) !important;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-home .gfc-card h2::after,
.page-home .gfc-card h3::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background: var(--gfc-gray-800);
    margin-top: 10px;
}

/* =========================================================
   How We Work Cards
   ========================================================= */

.page-home .gfc-how-work-card {
    background: var(--gfc-white);
    border-radius: 15px;
    padding: 35px 25px;
    border: 1px solid var(--gfc-border);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-home .gfc-how-work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
    border-color: var(--gfc-border-hover);
}

.page-home .gfc-how-work-icon {
    width: 70px;
    height: 70px;
    background: var(--gfc-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    border: 1px solid var(--gfc-gray-300);
    transition: all 0.3s ease;
}

.page-home .gfc-how-work-card:hover .gfc-how-work-icon {
    background: var(--gfc-gray-200);
    transform: scale(1.05);
}

.page-home .gfc-how-work-icon i {
    font-size: 2rem;
    color: var(--gfc-gray-700);
    transition: all 0.3s ease;
}

.page-home .gfc-how-work-card h4.h5 {
    font-weight: 700;
    color: var(--gfc-gray-800);
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gfc-gray-200);
}

.page-home .gfc-how-work-card p {
    color: var(--gfc-gray-600) !important;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-home .gfc-how-work-features {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--gfc-gray-200);
}

.page-home .gfc-how-work-features .small {
    font-size: 0.9rem;
    color: var(--gfc-gray-700);
    font-weight: 500;
}

.page-home .gfc-how-work-features i.bi-check-circle-fill {
    font-size: 0.9rem;
    color: var(--gfc-success) !important;
}

.page-home .btn-outline-dark.btn-lg {
    border: 1px solid var(--gfc-gray-800);
    color: var(--gfc-gray-800);
    background: transparent;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-home .btn-outline-dark.btn-lg:hover {
    background: var(--gfc-gray-800);
    border-color: var(--gfc-gray-800);
    color: var(--gfc-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

/* =========================================================
   Utilitarios (scoped)
   ========================================================= */

.page-home .max-w-600 {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-home .text-gray-600 {
    color: var(--gfc-gray-600) !important;
}

.page-home .border {
    border: 1px solid var(--gfc-border) !important;
}

/* =========================================================
   Animaciones
   ========================================================= */

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

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

.page-home .gfc-reveal {
    animation: gfcFadeUp 0.8s ease-out both;
}

/* =========================================================
   Responsive — Carrusel + Mapa (manteniendo tus variables)
   ========================================================= */

@media (max-width: 1200px) {
    .page-home .gfc-carousel-slide {
        min-height: clamp(340px, 52vw, 520px);
    }

    .page-home {
        --map-scale: 1.08;
    }
}

@media (max-width: 992px) {
    .page-home .gfc-carousel-slide {
        min-height: clamp(320px, 56vw, 480px);
    }

    .page-home .gfc-card {
        padding: 30px;
    }

    .page-home .gfc-about-item {
        padding: 25px;
    }

    .page-home {
        --map-scale: 1.05;
        --map-pos-y: 52%;
    }

    .page-home .gfc-about-section {
        min-height: clamp(260px, 34vw, 420px);
        border-radius: 18px;
    }
}

@media (max-width: 768px) {
    .page-home .gfc-page-hero {
        padding: 25px;
        margin-top: 10px;
    }

    .page-home .gfc-carousel-slide {
        min-height: 280px;
        padding: 30px 20px;
    }

    .page-home .gfc-carousel-overlay h2 {
        font-size: 1.5rem;
    }

    .page-home .gfc-carousel-overlay p {
        font-size: 1rem;
    }

    .page-home .gfc-card {
        padding: 25px;
    }

    .page-home .gfc-about-item {
        padding: 20px;
        margin-bottom: 15px;
    }

    .page-home {
        --map-scale: 1.03;
        --map-pos-y: 54%;
    }

    .page-home .gfc-about-section {
        min-height: 260px;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    .page-home .gfc-page-hero {
        padding: 20px;
    }

    .page-home .gfc-page-hero h1 {
        font-size: 2rem;
    }

    .page-home .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .page-home .gfc-card {
        padding: 20px;
    }

    .page-home .gfc-how-work-card {
        padding: 25px 20px;
    }

    .page-home .gfc-how-work-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .page-home .gfc-how-work-icon i {
        font-size: 1.8rem;
    }

    .page-home .gfc-how-work-card h4.h5 {
        font-size: 1.1rem;
    }

    .page-home {
        --map-scale: 1.02;
        --map-pos-y: 56%;
    }

    .page-home .gfc-about-section {
        min-height: 240px;
        border-radius: 14px;
    }
}


/* =========================================================
   SAFARI / macOS (WebKit) – Ajustes sin perder responsividad
   Pegar al FINAL del CSS
   ========================================================= */

/* 1) Suavizado tipográfico y no “auto-zoom” de texto */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2) Backdrop-filter: asegúrate de tener el prefijo en TODAS las capas que lo usan */
.page-home .gfc-about-item,
.page-home .gfc-card,
.page-home .gfc-page-hero {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 3) CAROUSEL: Safari a veces falla con `background: inherit` en ::before.
      Solución: usar una variable por slide y reutilizarla. */
.page-home .gfc-carousel-slide {
    /* base */
    background-image: var(--slide-bg);
}

/* Reemplaza el `background: inherit;` por esto */
.page-home .gfc-carousel-slide::before {
    background-image: var(--slide-bg);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    /* WebKit transform hints (reduce “flicker”/blurry) */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Define la variable por slide (y quita el background-image directo si lo tenías) */
.page-home .gfc-slide-1 {
    --slide-bg: linear-gradient(rgba(15, 23, 42, .7), rgba(15, 23, 42, .5)), url('../img/1.png');
}

.page-home .gfc-slide-2 {
    --slide-bg: linear-gradient(rgba(15, 23, 42, .7), rgba(15, 23, 42, .5)), url('../img/2.png');
}

.page-home .gfc-slide-3 {
    --slide-bg: linear-gradient(rgba(15, 23, 42, .7), rgba(15, 23, 42, .5)), url('../img/3.png');
}

.page-home .gfc-slide-4 {
    --slide-bg: linear-gradient(rgba(15, 23, 42, .7), rgba(15, 23, 42, .5)), url('../img/4.png');
}

/* 4) MAP: ayuda a Safari a renderizar el zoom sin parpadeos */
.page-home .gfc-about-bg::before {
    -webkit-transform: translate3d(0, 0, 0) scale(var(--map-scale));
    transform: translate3d(0, 0, 0) scale(var(--map-scale));
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 5) Reglas específicas WebKit (solo Safari/iOS/mac) */
@supports (-webkit-touch-callout: none) {

    /* Mantén el look igual, solo afinamos detalles visuales */
    .page-home .gfc-carousel {
        -webkit-mask-image: -webkit-radial-gradient(white, black);
        mask-image: radial-gradient(white, black);
        /* evita bordes raros en radius */
    }

    /* Evita que Safari “sobresuavice” el texto sobre fondos */
    .page-home .gfc-carousel-overlay h2,
    .page-home .gfc-carousel-overlay p {
        -webkit-font-smoothing: antialiased;
    }
}