/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-font: 'Poppins', sans-serif;
    --primary-color: #005A9C;
    --secondary-color: #F8F9FA;
    --dark-color: #212529;
    --light-color: #FFFFFF;
    --grey-text: #6c757d;
    --accent-color: #e67e22;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--primary-font); color: var(--dark-color); background-color: var(--light-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* --- COMPONENTES REUTILIZABLES --- */
.btn { padding: 12px 28px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; display: inline-block; }
.btn-primary { background-color: var(--primary-color); color: var(--light-color); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 90, 156, 0.4); }

/* --- NAVEGACIÓN --- */
.main-header { position: sticky; top: 0; z-index: 100; background-color: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid #e9ecef; }
.main-nav { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.nav-logo { font-weight: 700; font-size: 1.8rem; color: var(--dark-color); text-decoration: none; }
.nav-menu { display: flex; align-items: center; list-style: none; gap: 2.5rem; }
.nav-menu a { text-decoration: none; color: var(--grey-text); font-weight: 600; transition: color 0.2s ease; }
.nav-menu a:not(.btn):hover { color: var(--primary-color); }
.hamburger { display: none; cursor: pointer; background: none; border: none; z-index: 1001; }
.bar { display: block; width: 28px; height: 3px; margin: 6px 0; background-color: var(--dark-color); border-radius: 3px; transition: all 0.3s ease-in-out; }

/* --- HERO SECTION --- */
.hero-section { height: 100vh; background: linear-gradient(rgba(248, 249, 250, 0.2), rgba(248, 249, 250, 0.2)), url('https://images.unsplash.com/photo-1556955112-28cde3817b0a?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover; display: flex; justify-content: center; align-items: center; text-align: center; color: var(--dark-color); padding: 1rem; }
.hero-content { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(20px); padding: 3rem 4rem; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.agent-photo-container { width: 150px; height: 150px; border-radius: 50%; border: 6px solid var(--light-color); box-shadow: 0 0 20px rgba(0,0,0,0.1); margin: -105px auto 1.5rem auto; overflow: hidden; position: relative; }
.agent-photo-container img { width: 100%; height: 100%; object-fit: cover; }
.hero-content h1 { font-size: 2.8rem; margin-bottom: 0.5rem; line-height: 1.2; }
.hero-content p { font-size: 1.2rem; color: var(--grey-text); }

/* --- CARRUSEL DE FOTOS --- */
.photo-banner-section { padding: 4rem 0; background-color: var(--secondary-color); overflow: hidden; }
.photo-banner-container { position: relative; max-width: 1200px; margin: 0 auto; }
.banner-images { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% / 4.5) - 1rem); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 1rem; -ms-overflow-style: none; scrollbar-width: none; }
.banner-images::-webkit-scrollbar { display: none; }
.banner-images img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--border-radius); scroll-snap-align: start; }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); background-color: var(--light-color); border: 1px solid #ddd; border-radius: 50%; width: 50px; height: 50px; font-size: 2rem; font-weight: 300; cursor: pointer; z-index: 10; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.2s ease; }
.arrow:hover { background-color: var(--primary-color); color: var(--light-color); border-color: var(--primary-color); }
.left-arrow { left: 20px; }
.right-arrow { right: 20px; }

/* --- OTRAS SECCIONES --- */
.about-section, .gallery-section, .contact-section { padding: 6rem 0; }
.about-section h2, .gallery-section h2, .contact-section h2 { font-size: 2.8rem; margin-bottom: 1rem; text-align: center; }
.about-content { display: flex; align-items: center; gap: 4rem; text-align: left; margin-top: 3rem; }
.about-text { flex: 1.2; }
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: var(--border-radius); box-shadow: var(--shadow); }

/* --- GALERÍA --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.gallery-item { display: flex; flex-direction: column; background-color: var(--light-color); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.4s ease; }
.gallery-item:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.card-image-container { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; }
.gallery-item:hover .card-nav-arrow { opacity: 1; } /* Muestra flechas del carrusel interno al pasar el mouse */
.card-slider { display: flex; height: 100%; transition: transform 0.4s ease-in-out; }
.card-slider img { width: 100%; height: 100%; object-fit: cover; flex-shrink: 0; }
.card-nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.5); color: white; border: none; border-radius: 50%; width: 35px; height: 35px; font-size: 1.5rem; cursor: pointer; z-index: 2; opacity: 0; transition: opacity 0.3s ease; }
.card-nav-arrow.prev { left: 10px; }
.card-nav-arrow.next { right: 10px; }
.card-tags { position: absolute; top: 1rem; left: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; z-index: 1; }
.tag { padding: 0.3rem 0.8rem; border-radius: 50px; font-size: 0.75rem; font-weight: 700; color: var(--light-color); text-transform: uppercase; letter-spacing: 0.5px; }
.tag-transaccion { background-color: var(--primary-color); }
.tag-ubicacion { background-color: var(--accent-color); }
.card-content { padding: 1.5rem; text-align: left; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.25rem; }
.card-code { font-size: 0.8rem; color: var(--grey-text); margin-bottom: 1rem; font-style: italic; }
.card-description { font-size: 0.9rem; color: var(--grey-text); flex-grow: 1; margin-bottom: 1rem; }
.card-stats { display: flex; gap: 1.5rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #eee; color: var(--grey-text); }
.card-stats span { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.card-stats svg { stroke: var(--grey-text); }

/* --- CONTACTO Y REDES --- */
.contact-section { background-color: var(--secondary-color); border-top: 1px solid #e9ecef; padding: 6rem 0; text-align: center; }
.social-icons { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.social-icons a { display: flex; justify-content: center; align-items: center; width: 55px; height: 55px; background-color: var(--light-color); border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: all 0.3s ease-out; }
.social-icons a:hover { transform: translateY(-5px) scale(1.1); box-shadow: 0 8px 20px rgba(0, 90, 156, 0.2); }
.social-icons svg { width: 26px; height: 26px; fill: var(--dark-color); transition: fill 0.3s ease; }
.social-icons a:hover svg { fill: var(--primary-color); }

/* --- FOOTER --- */
.main-footer { background-color: var(--dark-color); color: #adb5bd; text-align: center; padding: 2.5rem; }
.main-footer a { color: var(--light-color); text-decoration: none; font-weight: 600; }

/* --- DISEÑO RESPONSIVO --- */
@media (max-width: 992px) {
    .banner-images { grid-auto-columns: calc((100% / 2.5) - 1rem); }
    .about-content { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
    .nav-menu { position: fixed; left: 100%; top: 0; flex-direction: column; justify-content: center; background-color: var(--light-color); width: 100%; height: 100dvh; transition: left 0.4s ease-in-out; }
    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 1.5rem 0; }
    .hamburger { display: block; }
    .hamburger.active { position: fixed; right: 2rem; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .banner-images { grid-auto-columns: calc(100% - 3rem); }
    .arrow { display: none; }
    .hero-content { padding: 2rem; width: 90%; }
    .hero-content h1, .about-section h2, .gallery-section h2, .contact-section h2 { font-size: 2.2rem; }
    .about-content { gap: 2rem; }
}