/* css/styles.css */

/* --- Variables y Reset --- */
:root {
    /* Branding Colors */
    --primary-color: #003366;    /* Azul Oscuro (Logo) */
    --secondary-color: #0055A4;  /* Azul Claro */
    --accent-color: #E6B800;     /* Dorado/Amarillo (CTA) */
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f3f4f6;
    --bg-dark: #111827;
    --white: #ffffff;

    /* UI Config */
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --header-height: 120px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --text-color: #f3f4f6;
    --text-light: #9ca3af;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --bg-dark: #020617;
    --white: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===========================
   Accesibilidad: Focus visible
   =========================== */
:focus { outline: none; }
:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
    border-radius: 8px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--primary-color); }
[data-theme="dark"] h2 { color: var(--secondary-color); }

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section { padding: 4rem 0; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--primary-color); color: var(--white); }
.text-center { text-align: center; }
.max-w-800 { max-width: 800px; margin: 0 auto; }
.hidden { display: none !important; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-heading);
    /* Mejora: evita selección accidental en taps */
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-primary:hover { background-color: var(--secondary-color); transform: translateY(-2px); }

.btn-accent {
    background-color: var(--secondary-color);
    color: #000;
}
.btn-accent:hover { background-color: var(--primary-color); transform: translateY(-2px); }

.btn-outline-light {
    border: 2px solid #ffffff;
    color: #ffffff;
    background: transparent;
}
.btn-outline-light:hover { background: #ffffff; color: var(--primary-color); }

.btn-block { display: block; width: 100%; }

/* --- Header & Nav --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
[data-theme="dark"] .header { background: rgba(15, 23, 42, 0.9); }

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo normal (modo claro) */
.logo-img{
  height:120px;
  width: auto;
  display: block;
  transition: filter 0.25s ease;
}

/* Logo en blanco en modo oscuro */
[data-theme="dark"] .logo-img{
  filter: brightness(0) invert(1);
}

.nav-list { display: flex; gap: 2rem; }
.nav-link { font-weight: 500; font-size: 0.95rem; }
.nav-link:hover, .nav-link.active { color: var(--secondary-color); }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hamburger, .close-menu { display: none; }

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 120%; /* Extra height for parallax */
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: translateY(0);

    /* ✅ Mejora: ahora el background viene de CSS (ya no inline en HTML) */
    background-image: url("https://images.unsplash.com/photo-1600596542815-60c37c6525fa?auto=format&fit=crop&w=1600&q=80");
}

/* Opcional: mejor rendimiento en parallax (si usas JS para moverlo) */
.parallax-bg { will-change: transform; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,51,102,0.9) 0%, rgba(0,85,164,0.7) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-content h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9; }

.badge-hero {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Shape Divider */
.custom-shape-divider-bottom-1689 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.custom-shape-divider-bottom-1689 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.custom-shape-divider-bottom-1689 .shape-fill { fill: var(--bg-color); }

/* --- Filters Section --- */
.filters-section {
    margin-top: -3rem; /* Overlap hero */
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
}

.filters-wrapper {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-color);
    font-family: inherit;
}

/* Mejora: selects en dark mode */
[data-theme="dark"] .filter-group select {
    border-color: rgba(255,255,255,0.12);
}

/* --- Properties Grid --- */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
}

.property-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

/* ✅ Mejora: deja hover y agrega focus para teclado */
.property-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.property-card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card-image {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .card-image img { transform: scale(1.1); }

.card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge.venta { background: var(--primary-color); color: #fff; }
.badge.renta { background: var(--secondary-color); color: #fff; }
.badge.destacado { background: var(--accent-color); color: #000; }

.card-content { padding: 1.5rem; }
.card-price { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 0.5rem; }
[data-theme="dark"] .card-price { color: var(--accent-color); }
.card-title { font-size: 1.1rem; margin-bottom: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-location { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }
.card-features { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-light); border-top: 1px solid #eee; padding-top: 1rem; }

/* --- Slider Destacadas --- */
.section-featured { overflow: hidden; }
.slider-container { position: relative; display: flex; align-items: center; }
.slider-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 1rem;
    scrollbar-width: none; /* Firefox */
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track .property-card { min-width: 320px; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 5;
    color: var(--primary-color);
}
.prev { left: 0; }
.next { right: 0; }

/* ✅ Mejora UX móvil: scroll-snap */
@media (max-width: 768px) {
    .slider-track {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-padding: 1rem;
    }
    .slider-track .property-card {
        scroll-snap-align: start;
    }
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.icon-box {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* --- About & Metrics --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.badge-secondary { color: var(--secondary-color); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.metric-item { text-align: center; }
.counter { font-size: 2.5rem; font-weight: 800; color: var(--primary-color); display: block; }
[data-theme="dark"] .counter { color: #ffffff; }


.about-image { position: relative; border-radius: var(--border-radius); overflow: hidden; }
.about-image img { width: 100%; border-radius: var(--border-radius); }
.image-overlay-card {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
}
.image-overlay-card i { color: var(--secondary-color); font-size: 2rem; }

/* --- Testimonials --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.testimonial-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
}
[data-theme="dark"] .testimonial-card { background: var(--bg-light); }
.stars { color: var(--accent-color); margin-bottom: 1rem; }
.author { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.author img { width: 50px; height: 50px; border-radius: 50%; }

/* --- FAQ --- */
.accordion { margin-top: 2rem; }
.accordion-item { border-bottom: 1px solid #e5e7eb; }
.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-light);
}
.accordion-content p { padding-bottom: 1.5rem; }

/* --- Contacto --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.contact-info { color: #fff; }
.contact-info h2 { color: #fff; }
.info-item { display: flex; gap: 1rem; margin: 2rem 0; }
.info-item i { color: var(--secondary-color); font-size: 1.5rem; }

.contact-form-wrapper {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    color: var(--text-color);
}
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; }

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-color);
}
input:focus, textarea:focus { outline: 2px solid var(--secondary-color); border-color: transparent; }

/* ✅ Mejora: inputs en dark mode (borde más suave) */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    border-color: rgba(255,255,255,0.12);
}

/* --- Footer --- */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding-top: 4rem;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #1e293b;
}
.footer-col h4 { color: #fff; margin-bottom: 1.5rem; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding: 1.5rem 0; font-size: 0.9rem; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a { color: #fff; font-size: 1.2rem; }

.footer-logo{
  display: block;
  margin-top: 12px;
  height: 150px;  /* ajusta tamaño */
  width: auto;
  opacity: 0.95;
  
}

/* --- Modales --- */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--border-radius);
    position: relative;
    padding: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease;

    /* ✅ Mejora: scroll suave dentro del modal */
    overscroll-behavior: contain;
}
.modal-backdrop.active .modal-content { transform: scale(1); }

.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
}

/* Estilos internos del modal de detalles */
.modal-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; }
.modal-img-container img { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }
.modal-details { padding: 2rem; }
.modal-price { font-size: 2rem; color: var(--primary-color); font-weight: 700; margin: 1rem 0; }
.modal-amenities { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.modal-amenity { display: flex; align-items: center; gap: 0.5rem; color: var(--text-light); }

/* --- Toast (mejorado) --- */
.toast{
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(140px);
  background: #10b981; /* default = éxito */
  color: #fff;
  padding: 1rem 1.4rem;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease, background 0.25s ease;
}

/* Tipos */
.toast.toast-success { background: #10b981; }
.toast.toast-error   { background: #ef4444; }
.toast.toast-warn    { background: #f59e0b; color: #111827; }

/* En dark mode, mejora contraste */
[data-theme="dark"] .toast{
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

.toast.show{
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

button:disabled,
.btn:disabled{
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* --- Animaciones Scroll Reveal --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 992px) {
    .modal-grid { grid-template-columns: 1fr; }
    .modal-img-container { height: 300px; }
    .about-container { grid-template-columns: 1fr; text-align: center; }
    .metrics-grid { justify-content: center; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger, .close-menu { display: block; }

  .nav-menu{
    position: fixed;
    inset: 0 0 0 auto;         /* top/right/bottom */
    width: min(86vw, 380px);
    height: 100dvh;
    background: var(--bg-color);
    padding: 4rem 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1100;

    /* ✅ clave: fuera de pantalla sin crear overflow */
    transform: translateX(110%);
    transition: transform 0.35s ease;

    /* evita que el panel cause scroll lateral */
    max-width: 100vw;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.active{
    transform: translateX(0);
  }

  .nav-list{
    flex-direction: column;
    gap: 1.5rem;
  }

  .close-menu{
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
  }

  .hamburger{
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;

  /* color por defecto (modo claro) */
  color: var(--text-color);
}

/* Modo oscuro → hamburguesa blanca */
[data-theme="dark"] .hamburger{
  color: #ffffff;
}

/* Asegura que el ícono herede el color */
.hamburger i{
  color: inherit;
}
}


/* ================================
   FIX GLOBAL: nada de scroll lateral
   ================================ */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* o 'clip' si tu navegador lo soporta */
}

/* Evita que elementos internos se salgan */
* {
  max-width: 100%;
}

/* ================================
   FIX 1: Shape divider NO debe crecer
   ================================ */
.custom-shape-divider-bottom-1689 {
  overflow: hidden;
  width: 100%;
}

.custom-shape-divider-bottom-1689 svg {
  width: 100% !important;    /* quita el calc(100% + 1.3px) */
  max-width: 100% !important;
  display: block;
}

/* ================================
   FIX 2: Off-canvas menu sin crear overflow
   (reemplaza right:-100% por transform)
   ================================ */
@media (max-width: 768px) {
  .nav-menu {
    right: 0 !important;
    transform: translateX(110%);
    max-width: 100vw;
  }
  .nav-menu.active {
    transform: translateX(0);
  }
}

/* ================================
   FIX 3: Header SIEMPRE dentro del viewport
   ================================ */
.header {
  width: 100vw;
  left: 0;
  right: 0;
}

@media (max-width: 768px) {
  .logo span { display: none; } /* evita empujar el menú */
  #btn-agendar {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

/* =========================================
   FIX FOOTER: que NADA se salga en móvil
   ========================================= */

/* Permite cortes de palabras y evita "líneas eternas" */
.footer, .footer * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* También aplica a links (por si hay texto largo) */
.footer a {
  display: inline-block;
  max-width: 100%;
}

/* En móvil: el grid del footer debe ser 1 columna */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Para que no quede todo apretado */
  .footer-col {
    min-width: 0; /* IMPORTANTÍSIMO en grid para evitar overflow */
  }
}

/* Si el problema está en el footer-bottom por el texto largo */
.footer-bottom p {
  padding: 0 1rem;
  text-align: center;
}

/* ==================================================
   WIDE LAYOUT: mejor para monitores grandes (2K/4K)
   ================================================== */

/* 1) Container base más ancho */
.container {
  max-width: 1440px; /* antes 1200 */
}

/* 2) En pantallas grandes, aún más ancho pero con padding bonito */
@media (min-width: 1600px) {
  .container {
    max-width: 1680px;
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* 3) En ultra-wide (21:9 o 4K), expande más pero sin exagerar */
@media (min-width: 1920px) {
  .container {
    max-width: 1840px;
  }
}

/* =========================================
   HERO FULL SCREEN REAL (100% viewport visible)
   ========================================= */

/* 1) Evita problemas de 100vh en navegadores */
:root{
  --vh: 1vh;
}

/* 2) Hero ocupa EXACTAMENTE la pantalla completa */
.hero{
  height: calc(var(--vh, 1vh) * 100);
  min-height: unset !important;     /* quita el min-height que lo altera */
  padding-top: 0 !important;        /* no empujes el contenido */
  display: flex;
  align-items: center;
}

/* 3) Como el header es fijo, damos espacio con margin-top y restamos altura real */
.hero{
  margin-top: var(--header-height);
  height: calc((var(--vh, 1vh) * 100) - var(--header-height));
}

/* 4) Fondo que cubra correctamente */
.hero-bg{
  height: 100% !important;
  top: 0;
}

/* 5) Contenido centrado vertical y no “caído” */
.hero-content{
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* (Opcional) En desktop grandes, centra mejor visualmente */
@media (min-width: 1024px){
  .hero-content{
    max-width: 1100px;
  }
}

/* =========================================
   FILTROS: que no se vean "pegados" al borde
   y no corten el hero visualmente
   ========================================= */
@media (min-width: 1024px){
  .filters-section{
    margin-top: -4rem; /* un poquito más para look premium */
  }

  .filters-wrapper{
    padding: 2.2rem;
    gap: 1.75rem;
  }
}
@media (min-width: 1024px){
  .hero-overlay{
    background: radial-gradient(1200px 700px at 30% 30%, rgba(0,85,164,0.35), rgba(0,51,102,0.92)),
                linear-gradient(135deg, rgba(0,51,102,0.85), rgba(0,85,164,0.55));
  }
}

.hero { position: relative; overflow: hidden; }
#hero-three { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-content { position: relative; z-index: 2; }

/* ==============================
   VALUES GRID (4 imágenes)
   ============================== */

.values-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.value-card{
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.value-card:hover{
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.value-img{
  width: 100%;
  height: 210px;
  overflow: hidden;
  position: relative;
}

.value-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.value-card:hover .value-img img{
  transform: scale(1.08);
}

.value-content{
  padding: 1.5rem;
}

.value-content h3{
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

[data-theme="dark"] .value-content h3{
  color: var(--secondary-color);
}

.value-content p{
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1100px){
  .values-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px){
  .values-grid{
    grid-template-columns: 1fr;
  }
  .value-img{
    height: 220px;
  }
}
