﻿/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    display: block;
}

/* Variables de colores */
:root {
    --azul-principal: #004280;
    --azul-oscuro: #003163;
    --naranja: #ee7103;
    --blanco: #ffffff;
    --negro: #0f0f0f;
    /* header altura */
    --header-h: calc(var(--logo-h, 54px) + (var(--header-y, 14px) * 2));
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f9f9f9;
    overflow-x: hidden;
}
/*Hero base*/
.hero {
    position: relative;
    z-index: 0;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: calc(var(--header-h) * -1);
    padding-top: var(--header-h);
}

/* Contenedor imágenes */
.hero-image-container {
    position: absolute;
    inset: 0;
    height: 120%;
    z-index: 0;
}

/* imágenes slider */
.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1s ease-in-out, transform 6s ease-in-out;
}

/* Imagen activa */
.hero-img.active {
    opacity: 1;
    transform: scale(1.08);
}

/* Overlay */
.overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 60%);
}

/* Contenido */
.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 10%;
    padding-right: 6%;
    max-width: 680px;
    pointer-events: none;
}

/* Permitir interacción en botón */
.hero-content a,
.hero-content button {
    pointer-events: auto;
}

.hero-content h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.1;
}

.hero-content h1 span {
    font-weight: 600;
    color: var(--naranja);
    display: block;
    font-size: clamp(1.4rem, 2.6vw, 2.5rem);
}

.hero-content p {
    margin-top: 14px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.9);
    max-width: 560px;
}

/* Animación */
.hero-content .reveal-text,
.btn-contact {
    opacity: 0;
    transform: translateY(18px);
}

/* Botón */
.btn-contact {
    display: inline-block;
    margin-top: 28px;
    padding: 14px 38px;
    text-decoration: none;
    background: transparent;
    border: 2px solid var(--naranja);
    color: var(--blanco);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-contact span {
    position: relative;
    z-index: 2;
}

.btn-bg {
    position: absolute;
    inset: 0;
    left: -100%;
    background: var(--naranja);
    z-index: 1;
    transition: left 0.4s ease;
}

.btn-contact:hover {
    box-shadow: 0 0 20px rgba(238, 113, 3, 0.4);
    color: #fff;
}

.btn-contact:hover .btn-bg {
    left: 0;
}

/* Flechas slider */
.hero-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    z-index: 10; 
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.hero-btn {
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    font-size: 26px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--naranja);
    transform: scale(1.1);
}

/* Responsive tablet */
@media (max-width: 768px) {

    .hero {
        min-height: auto;
        height: 75vh;
        align-items: flex-end;
    }

    .hero-image-container {
        height: 100%;
    }

    .hero-content {
        padding: 20px;
        padding-bottom: 30px;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content h1 span {
        font-size: 1.2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .btn-contact {
        width: 100%;
        text-align: center;
        padding: 14px;
    }

    /* Flechas */
    .hero-controls {
        top: 56%;
        padding: 0 10px;
    }

    .hero-btn {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }

    /* Zoom */
    .hero-img.active {
        transform: scale(1.03);
    }
}

/* RESPONSIVE MOBILE */
@media (max-width: 480px) {
    .hero-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .hero {
        height: 70vh;
    }

    /* Overlay mejorado */
    .overlay {
        background: linear-gradient( 180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.85) 100% );
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    /* Flechas siempre visibles */
    .hero-controls {
        top: 45%;
        padding: 0 8px;
    }

    .hero-btn {
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(6px); 
    }
}
/* Sección Mabinsa */
.mabinsa-section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.mabinsa-header {
    text-align: center;
    margin-bottom: 60px;
}

.mabinsa-header h2 {
    font-weight: 800;
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    color: var(--azul-oscuro);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.mabinsa-header p {
    font-weight: 500;
    font-size: 1.05rem;
    color: #111;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.highlight {
    color: var(--naranja);
}

/* Cards grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.property-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    background: #000;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.property-card:hover .property-image {
    transform: scale(1.08);
}

.property-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient(to top, rgba(0, 49, 99, 0.92) 8%, rgba(0,0,0,0) 70%);
    color: var(--blanco);
}

.property-overlay h3 {
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0 0 6px 0;
}

.property-overlay p {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 16px;
    opacity: 0.92;
}

.property-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    background-color: var(--naranja);
    color: var(--blanco);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

/* Botón cards */
.btn-mabinsa {
    align-self: flex-start;
    padding: 10px 22px;
    background-color: transparent;
    color: var(--blanco);
    border: 2px solid rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.btn-mabinsa:hover {
    background-color: var(--blanco);
    color: var(--azul-oscuro);
}

/* CTA destacado */
.featured-btn {
    background-color: var(--naranja);
    border-color: var(--naranja);
}

.featured-btn:hover {
    background-color: var(--azul-oscuro);
    border-color: var(--azul-oscuro);
    color: var(--blanco);
}

/* Banner */
.mabinsa-banner {
    position: relative;
    width: 100%;
    padding: 110px 0;
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-principal) 100%);
    color: var(--blanco);
    text-align: center;
    margin: 60px 0;
    overflow: hidden;
}

.mabinsa-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 520px;
    height: 520px;
    background: rgba(238, 113, 8, 0.06);
    border-radius: 50%;
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.banner-subtitle {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--naranja);
    display: block;
    margin-bottom: 20px;
}

.banner-content h2 {
    font-weight: 800;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    line-height: 1.25;
    margin-bottom: 40px;
}

.accent-text {
    color: var(--naranja);
}

.banner-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--blanco, #fff);
    display: block;
    opacity: 1; 
}

.stat-item.visible .stat-number {
    visibility: visible; /* Se hace visible cuando la animación se activa */
}

.stat-desc {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.85;
}

.stat-divider {
    width: 2px;
    height: 50px;
    background-color: var(--naranja);
    opacity: 0.5;
}

/* Agentes */
.agents-section {
    padding: 60px 5% 100px;
    background-color: #f9f9f9;
}

.agents-container {
    display: flex;
    justify-content: center;
    gap: 42px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}

.agent-card {
    width: 350px;
    background: var(--blanco);
    border-radius: 20px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 66, 128, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.agent-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 49, 99, 0.15);
}

.agent-image-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 18px;
}

.agent-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(18%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.agent-card:hover .agent-photo {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.agent-role {
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--naranja);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.agent-info h3 {
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--azul-oscuro);
    margin: 0 0 18px 0;
}

.agent-contact {
    border-top: 1px solid #eee;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-link {
    font-weight: 600;
    font-size: 0.92rem;
    color: #666;
    text-decoration: none;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .contact-link:hover {
        color: var(--azul-principal);
    }

/* SCROLL REVEAL - BASE
   (GSAP usa estas clases) */
.reveal,
.reveal--scale,
.reveal--left,
.reveal--right {
    opacity: 0;
    will-change: transform, opacity;
}

.reveal {
    transform: translateY(30px);
}

.reveal--scale {
    transform: translateY(18px) scale(0.92);
}

.reveal--left {
    transform: translateX(-40px);
}

.reveal--right {
    transform: translateX(40px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-content {
        padding-left: 7%;
        padding-right: 7%;
    }

    .property-card {
        height: 410px;
    }

    .banner-stats {
        flex-direction: column;
        gap: 18px;
    }

    .stat-divider {
        display: none;
    }

    .agent-card {
        width: 100%;
        max-width: 330px;
    }
}
/*Efecto*/
.reveal,
.reveal--scale {
    transform-origin: 50% 80%;
}
.hero-img {
    transform-origin: center top; 
}

/*Bandera de Costa Rica*/
.bandera-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 40px; 
    position: relative;
    z-index: 1;
}

/* Imagen bandera */
.bandera {
    width: 100%;
    max-width: 700px; 
    height: auto;
    object-fit: contain;
    opacity: 0.85;
    filter: saturate(1.1);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .bandera {
        max-width: 90%;
        opacity: 0.9;
    }
}

