/* ============================================================
   RESPONSIVE.CSS — Media queries para móviles y tablets
   Grupo Vastil — Inmobiliaria Premium
   ============================================================ */

/* ── PANTALLAS GRANDES Y ULTRA-ANCHO ── */
@media (min-width: 1600px) {
  .topbar, #main-navigation, .hero, .about-strip, .perks, .properties, .locations, .testimonials, .cta-banner {
    padding-left: 12%;
    padding-right: 12%;
  }
  /* Footer: padding handled internally per section */
  .footer-topbar,
  .footer-grid,
  .footer-trust,
  .footer-bottom {
    padding-left: 12%;
    padding-right: 12%;
  }
}

/* ── TABLETS Y PANTALLAS MEDIANAS (MAX 1024px) ── */
@media (max-width: 1024px) {
  #main-navigation {
    top: 0; /* En tablet y móvil se mantiene fijo top 0 */
    position: fixed;
    background: var(--dark-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 20px 5%;
  }
  body.scrolled #main-navigation {
    padding: 15px 5%;
  }
  .topbar {
    display: none; /* Ocultar topbar en tablets para evitar saltos de cabecera */
  }
  
  .about-strip {
    gap: 48px;
    padding: 100px 5%;
  }
  .about-visual {
    height: 440px;
  }
  
  /* Stagger columns en 1 sola columna para evitar textos comprimidos */
  .features-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .perks {
    padding: 80px 5%;
  }
  .perks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .properties {
    padding: 100px 5%;
  }
  .prop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .prop-grid[data-visible="1"] {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .locations {
    gap: 48px;
    padding: 80px 5%;
  }
  .locations-regions {
    gap: 12px;
  }
  
  .testimonials {
    padding: 100px 5%;
  }
  .testi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .cta-banner {
    gap: 40px;
    padding: 100px 5%;
  }
  
  footer {
    padding: 0 0 40px;
  }
  .footer-topbar {
    padding: 14px 5%;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding: 56px 5% 48px;
  }
  .footer-trust {
    padding: 20px 5%;
  }
  .footer-bottom {
    padding: 0 5%;
  }
  
  /* Contact action buttons tablet */
  .contact-action-btn {
    padding: 16px 20px;
  }

  /* Modal tablet: mantiene dos columnas, un poco más estrecho */
  .prop-modal-content {
    width: 95%;
    grid-template-columns: 42% 58%;
  }
}

/* ── MÓVILES (MAX 768px) ── */
@media (max-width: 768px) {

  /* ── NAV ── */
  #main-navigation {
    top: 0;
    padding: 18px 6%;
    background: var(--dark-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-glass);
  }
  body.scrolled #main-navigation {
    padding: 14px 6%;
  }
  #main-navigation .logo img {
    height: 30px;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    height: 100vh;
    background: var(--dark-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-glass);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 60px 36px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }
  .nav-links.active {
    transform: translateX(0);
  }
  .nav-links a {
    color: var(--white) !important;
    font-size: 14px;
  }
  .nav-cta {
    display: none;
  }
  .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* ── HERO ── */
  .hero {
    padding: 110px 6% 72px;
    height: auto;
    min-height: 100svh;
    display: flex;
    align-items: center;
  }
  .slide-calama1     { background-image: url('../img/hero/hero-calama.webp') !important; }
  .slide-providencia { background-image: url('../img/hero/hero-providencia.webp') !important; }
  .slide-chiloe      { background-image: url('../img/hero/hero-chiloe.webp') !important; }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
    margin-top: 0;
  }
  .hero-title {
    font-size: clamp(26px, 7vw, 40px);
    line-height: 1.2;
    margin-bottom: 16px;
  }
  .hero-desc {
    font-size: 14px;
    margin: 0 auto 24px;
    max-width: 320px;
  }
  .hero-btns {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  .hero-stats {
    padding-left: 0;
    border-left: none;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 28px;
  }
  .hero-stat {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    min-width: 80px;
  }
  .hero-stat-num { font-size: 32px; }
  .hero-stat-label { font-size: 9px; }
  .hero-scroll { display: none; }
  .hero-nav {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* ── ABOUT ── */
  .about-strip {
    grid-template-columns: 1fr;
    padding: 72px 6%;
    gap: 40px;
    text-align: center;
  }
  .section-label {
    justify-content: center;
  }
  .features-list {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 14px;
    margin-top: 24px;
  }
  .features-list li {
    font-size: 13px;
  }
  .about-visual {
    height: 320px;
    order: -1;
  }
  .about-img-main {
    width: 100%;
    height: 100%;
  }
  .about-img-accent {
    bottom: -16px;
    right: 10px;
    width: 140px;
    padding: 20px 14px;
  }
  .about-years { font-size: 44px; }

  /* ── PERKS ── */
  .perks {
    padding: 72px 6%;
  }
  .perks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .perk-card {
    padding: 24px 18px;
    text-align: center;
  }
  .perk-icon {
    margin-left: auto;
    margin-right: auto;
    width: 44px;
    height: 44px;
  }
  .perk-card h3 { font-size: 14px; }
  .perk-card p  { font-size: 13px; }

  /* ── PROPERTIES ── */
  .properties {
    padding: 72px 6%;
  }
  .section-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 32px;
  }
  .prop-filters {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .prop-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .prop-grid[data-visible="1"],
  .prop-grid[data-visible="2"] {
    grid-template-columns: 1fr;
  }
  .prop-card.featured { grid-column: span 1; }
  .prop-card.featured .prop-img { height: 260px; }
  .prop-img { height: 220px; }
  .prop-info { padding: 20px; }
  .prop-name { font-size: 17px; }
  .prop-specs { gap: 8px; }
  .prop-spec-val { font-size: 15px; }
  .prop-spec-label {
    white-space: normal;
    font-size: 9px;
    line-height: 1.3;
  }
  .prop-badge {
    font-size: 8px;
    padding: 5px 10px;
    max-width: 140px;
    white-space: normal;
    line-height: 1.3;
  }

  /* ── LOCATIONS ── */
  .locations {
    grid-template-columns: 1fr;
    padding: 64px 6%;
    gap: 36px;
    text-align: center;
  }
  .location-list { text-align: left; }
  .locations-regions {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .region-card { transform: none !important; }

  /* ── TESTIMONIALS ── */
  .testimonials { padding: 72px 6%; }
  .testi-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .testi-card {
    padding: 28px 24px;
  }
  .testi-text { font-size: 14px; }

  /* ── CTA BANNER ── */
  .cta-banner {
    grid-template-columns: 1fr;
    padding: 72px 6%;
    gap: 40px;
    text-align: center;
  }
  .cta-contact-direct {
    align-items: stretch;
  }
  .direct-item {
    justify-content: center;
  }
  .contact-form-container {
    padding: 28px 20px;
  }
  .contact-form-container h3 { font-size: 22px; }
  .contact-direct-intro { text-align: left; }
  .contact-action-btn {
    padding: 14px 16px;
    gap: 12px;
    width: 100%;
  }
  .contact-action-text strong { font-size: 14px; }
  .contact-action-text span   { font-size: 12px; }
  .contact-footer-note        { font-size: 12px; }

  /* ── MODAL PROPIEDAD ── */
  .prop-modal-content {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;
    overflow: hidden;
  }
  .prop-modal-scroll {
    height: 100%;
    overflow-y: auto;
  }
  .modal-gallery { height: 240px; }
  .prop-modal-close { top: 12px; right: 12px; }
  .modal-body { padding: 20px 18px 0; }
  .modal-contact-section { padding: 20px 18px 40px; }
  .modal-title-row {
    flex-direction: column;
    gap: 10px;
  }
  .modal-price { text-align: left; }
  .modal-grid-specs {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .modal-features-list { grid-template-columns: 1fr; }
  .modal-contact-actions { gap: 10px; }
  .modal-contact-btn { padding: 14px 14px; gap: 10px; }
  .modal-contact-btn-text strong { font-size: 13px; }
  .modal-contact-btn-text span   { font-size: 11px; }

  /* ── FOOTER ── */
  footer { padding: 0 0 28px; }

  /* Topbar footer: ocultar email en móvil, solo tel y horario */
  .footer-topbar {
    padding: 12px 6%;
  }
  .footer-topbar-inner {
    justify-content: center;
    gap: 10px;
  }
  .footer-topbar-item--email {
    display: none;
  }
  .footer-topbar-sep:nth-child(4) {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
    padding: 0;
  }

  /* Acordeón visual: cada col separada por borde */
  .footer-col,
  .footer-brand {
    padding: 28px 6%;
    border-bottom: 1px solid var(--border-glass);
  }
  .footer-brand { padding-top: 40px; }

  .footer-brand img {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 16px;
  }
  .footer-brand .footer-tagline {
    max-width: 300px;
    margin: 0 auto 20px;
    font-size: 13px;
  }
  .footer-socials { justify-content: center; }

  .footer-col h4 {
    margin-bottom: 16px;
    font-size: 11px;
  }
  .footer-links li { margin-bottom: 10px; }
  .footer-links a  { font-size: 14px; }

  .footer-contact-item {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .newsletter-desc { font-size: 12px; margin-bottom: 14px; }
  .footer-col .newsletter-form { margin-top: 0; }
  .footer-col .newsletter-form input { font-size: 14px; padding: 12px 14px; }

  .footer-zones { justify-content: center; margin-top: 16px; }

  .footer-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 24px 6%;
    margin-bottom: 28px;
  }
  .footer-trust-item { font-size: 13px; }
  .footer-trust-sep  { display: none; }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 0 6%;
  }
  .footer-legal a { margin: 0 10px; }

  /* ── WHATSAPP WIDGET ── */
  .whatsapp-widget {
    bottom: 20px;
    right: 16px;
  }
  .whatsapp-btn {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
}

/* ── PANTALLAS MUY PEQUEÑAS (MAX 480px) ── */
@media (max-width: 480px) {

  /* Hero más compacto */
  .hero {
    padding: 100px 5% 64px;
  }
  .hero-title {
    font-size: clamp(24px, 7.5vw, 34px);
  }
  .hero-stats {
    justify-content: space-between;
    gap: 12px;
  }
  .hero-stat { min-width: 70px; }

  /* About: features en 1 columna en pantallas muy estrechas */
  .features-list {
    grid-template-columns: 1fr;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Perks: 1 columna en 480px- */
  .perks-grid {
    grid-template-columns: 1fr;
  }

  /* Footer trust: centrar */
  .footer-trust {
    align-items: center;
  }

  /* WhatsApp window */
  .whatsapp-window {
    width: calc(100vw - 32px);
    max-width: 300px;
  }
}

/* ── TOUCH TARGET REFINEMENTS MÓVIL ── */
@media (max-width: 768px) {

  /* Hero buttons: más anchos y altura cómoda para pulgar */
  .hero-btns {
    gap: 14px;
  }
  .btn-gold,
  .btn-outline {
    min-height: 52px;
    padding: 14px 28px;
    font-size: 11px;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Filtros de propiedades: full-width scroll horizontal */
  .prop-filters {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 4px;
    justify-content: flex-start;
  }
  .prop-filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 10px 20px;
    font-size: 11px;
  }

  /* Botón detalles propiedad — más fácil de tocar */
  .prop-btn-details {
    min-height: 48px;
    font-size: 11px;
    margin-top: 16px;
  }

  /* Contact action buttons — apilados full width */
  .contact-direct-actions {
    flex-direction: column;
  }
  .contact-action-btn {
    width: 100%;
    min-height: 68px;
    padding: 16px 18px;
    gap: 14px;
  }
  .contact-action-text strong { font-size: 15px; }
  .contact-action-text span   { font-size: 12px; }

  /* Modal contact buttons */
  .modal-contact-btn {
    min-height: 60px;
    padding: 14px 16px;
    gap: 12px;
  }

  /* WhatsApp send button */
  .whatsapp-send {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .whatsapp-input-container select {
    font-size: 13px;
    min-height: 44px;
  }

  /* Formulario contacto */
  .cform-btn {
    width: 100%;
    min-height: 52px;
    font-size: 14px;
    justify-content: center;
  }

  /* Nav links — área táctil generosa */
  .nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Online badge responsive */
  .online-badge {
    font-size: 10px;
    padding: 5px 12px;
  }
}
