/* ==========================================================================
   RESPONSIVE.CSS — Vanessa Santiago Imóveis
   Breakpoints: 1200 | 992 | 768 | 576 | 375 | 320
   Depends on style.css custom properties and base rules
   ========================================================================== */

/* ==========================================================================
   MOBILE MENU OVERLAY
   ========================================================================== */

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  z-index: 1050;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-panel.open {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-menu-header .logo-img {
  max-height: 40px;
  width: auto;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark, #181922);
  border-radius: 50%;
  transition: background 0.2s;
}

.mobile-menu-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-nav {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
}

.mobile-menu-nav li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mobile-menu-nav a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-dark, #181922);
  text-decoration: none;
  min-height: 48px;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
  background: rgba(0, 0, 0, 0.03);
  color: var(--primary-color, #F69B9A);
}

.mobile-menu-nav a i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.mobile-menu-cta {
  padding: 1.5rem;
}

.mobile-menu-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  min-height: 48px;
  transition: opacity 0.2s, transform 0.1s;
}

.mobile-menu-cta a:active {
  transform: scale(0.98);
}

/* Hamburger toggler override for mobile */
.navbar-toggler .toggler-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white, #ffffff);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggler .toggler-line + .toggler-line {
  margin-top: 6px;
}

.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(2) {
  opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Start white (transparent header over dark hero); pink when scrolled */
.site-header.scrolled .navbar-toggler .toggler-line {
  background: var(--color-primary-gold, #F69B9A);
}

/* ==========================================================================
   1200px — Reduce hero title, tighten card grid
   ========================================================================== */

@media (max-width: 1200px) {

  /* Hero */
  .hero-title,
  .hero-section h1 {
    font-size: 4rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  /* Property cards grid */
  .property-grid,
  .properties-grid,
  .imoveis-grid {
    gap: 1.25rem;
  }

  /* Sections */
  .section-title {
    font-size: 2.25rem;
  }

  /* Footer padding */
  .footer-top {
    padding: 3rem 0;
  }

  /* Search bar */
  .search-bar-overlay,
  .hero-search {
    max-width: 960px;
  }

  /* Container width */
  .container {
    max-width: 1140px;
  }
}

/* ==========================================================================
   992px — Tablet landscape: 2-col grid, mobile nav, hero 3rem
   ========================================================================== */

@media (max-width: 992px) {

  /* ── Header ── */
  .navbar-expand-lg .navbar-collapse {
    display: none !important;
  }

  .navbar-toggler {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1045;
  }

  .navbar-toggler:focus {
    outline: 2px solid var(--primary-color, #F69B9A);
    outline-offset: 2px;
  }

  .header-cta {
    display: none;
  }

  .site-header .navbar .container {
    justify-content: space-between;
  }

  /* ── Hero ── */
  .hero-title,
  .hero-section h1 {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-section {
    min-height: 80vh;
  }

  /* ── Property cards — 2 columns ── */
  .property-grid,
  .properties-grid,
  .imoveis-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .property-card {
    max-width: 100%;
  }

  /* ── Search bar ── */
  .search-bar-overlay,
  .hero-search {
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }

  .search-bar-overlay .search-fields,
  .hero-search .search-fields {
    flex-wrap: wrap;
  }

  /* ── Section paddings ── */
  .section-padding {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  /* ── Footer: 2 columns ── */
  .site-footer .row {
    row-gap: 2rem;
  }

  .footer-top {
    padding: 2.5rem 0;
  }

  .footer-bottom p {
    font-size: 0.85rem;
  }

  /* ── Property detail ── */
  .property-detail-gallery {
    margin-bottom: 2rem;
  }

  .property-detail-sidebar {
    margin-top: 2rem;
  }

  /* ── WhatsApp float ── */
  .whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  /* ── Admin ── */
  .admin-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 1045;
    transition: left 0.3s ease;
  }

  .admin-sidebar.active {
    left: 0;
  }

  .admin-content {
    margin-left: 0 !important;
  }

  .admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.5);
  }

  .admin-overlay.active {
    display: block;
  }

  .admin-header .btn-toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   768px — Tablet portrait: single col, stacked search, full-width hero
   ========================================================================== */

@media (max-width: 768px) {

  /* ── Base / Typography ── */
  .hero-title,
  .hero-section h1 {
    font-size: 2.5rem;
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.35rem; }

  /* ── Sections ── */
  .section-padding {
    padding: 2.5rem 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  /* ── Hero ── */
  .hero-section {
    min-height: 70vh;
    text-align: center;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-buttons .btn,
  .hero-buttons a {
    width: 100%;
    max-width: 320px;
    text-align: center;
    min-height: 48px;
  }

  /* ── Search bar — stack fields ── */
  .search-bar-overlay,
  .hero-search {
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    top: auto;
    transform: none;
    padding: 1rem;
    border-radius: 12px;
  }

  .search-bar-overlay .search-fields,
  .hero-search .search-fields {
    flex-direction: column;
    width: 100%;
  }

  .search-bar-overlay .search-fields > *,
  .hero-search .search-fields > * {
    width: 100%;
    min-height: 48px;
  }

  .search-bar-overlay .btn-search,
  .hero-search .btn-search {
    width: 100%;
    min-height: 48px;
  }

  /* ── Property cards — single column ── */
  .property-grid,
  .properties-grid,
  .imoveis-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .property-card {
    display: flex;
    flex-direction: column;
  }

  .property-card .card-image,
  .property-card .property-image {
    aspect-ratio: 16 / 10;
  }

  .property-card .card-body,
  .property-card .property-info {
    padding: 1rem;
  }

  /* ── Property detail page ── */
  .property-detail-gallery {
    margin-bottom: 1.5rem;
  }

  .property-detail-gallery .gallery-main {
    border-radius: 8px;
    overflow: hidden;
  }

  .property-detail-gallery .gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .property-detail-gallery .gallery-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
  }

  .property-detail-sidebar {
    margin-top: 1.5rem;
    position: static;
  }

  .property-detail-sidebar .sidebar-card {
    position: static;
  }

  .property-detail-info {
    padding: 0 0.5rem;
  }

  /* ── Footer — stacked & centered ── */
  .site-footer {
    padding-top: 0;
  }

  .site-footer .col-lg-4,
  .site-footer .col-lg-2,
  .site-footer .col-lg-3,
  .site-footer .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .footer-top {
    padding: 2.5rem 0 1rem;
    text-align: center;
  }

  .footer-top [class*="col-"] {
    margin-bottom: 2rem;
  }

  .footer-top [class*="col-"]:last-child {
    margin-bottom: 0;
  }

  .footer-top .footer-logo {
    display: block;
    margin: 0 auto 16px;
  }

  .footer-desc {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-social a {
    width: 44px;
    height: 44px;
  }

  .footer-title {
    text-align: center;
  }

  .footer-links,
  .footer-contact {
    text-align: center;
  }

  .footer-links li,
  .footer-contact li {
    justify-content: center;
  }

  .footer-links li a {
    font-size: 0.9rem;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-bottom {
    text-align: center;
    padding: 1rem 0;
  }

  .footer-bottom .text-md-start,
  .footer-bottom .text-md-end {
    text-align: center !important;
  }

  /* ── About / Contact ── */
  .about-content,
  .contact-content {
    padding: 1rem 0;
  }

  .contact-form .form-group {
    margin-bottom: 1rem;
  }

  /* ── Admin ── */
  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.35rem;
  }

  .admin-cards-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .admin-form .form-row {
    flex-direction: column;
  }

  .admin-form .form-row > * {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* ── WhatsApp float ── */
  .whatsapp-float a {
    width: 52px;
    height: 52px;
  }

  /* ── Generic utilities ── */
  .mb-lg-0 { margin-bottom: 1rem !important; }
  .mb-md-0 { margin-bottom: 0 !important; }
  .text-md-start { text-align: left !important; }
  .text-md-end { text-align: right !important; }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ==========================================================================
   576px — Full mobile: smaller fonts, stacked, sticky contact bar
   ========================================================================== */

@media (max-width: 576px) {

  /* ── Typography ── */
  .hero-title,
  .hero-section h1 {
    font-size: 2rem;
  }

  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }

  p, li, span, a {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* ── Hero ── */
  .hero-section {
    min-height: 65vh;
    padding-top: 80px;
  }

  .hero-content {
    padding: 0 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* ── Buttons — touch targets ── */
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-header-contact,
  .btn-search,
  a.btn {
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  /* ── Property cards — smaller ── */
  .property-card {
    border-radius: 10px;
    overflow: hidden;
  }

  .property-card .card-body,
  .property-card .property-info {
    padding: 0.85rem;
  }

  .property-card .card-title,
  .property-card .property-title {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }

  .property-card .card-price,
  .property-card .property-price {
    font-size: 1.15rem;
  }

  .property-card .card-location,
  .property-card .property-location {
    font-size: 0.8rem;
  }

  .property-card .card-features,
  .property-card .property-features {
    font-size: 0.8rem;
    gap: 0.75rem;
  }

  /* ── Search ── */
  .search-bar-overlay,
  .hero-search {
    padding: 0.85rem;
    border-radius: 10px;
    margin: 0 0.5rem;
  }

  .search-bar-overlay label,
  .hero-search label {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
  }

  .search-bar-overlay input,
  .search-bar-overlay select,
  .hero-search input,
  .hero-search select {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    min-height: 44px;
    border-radius: 6px;
  }

  /* ── Section ── */
  .section-padding {
    padding: 2rem 0;
  }

  /* ── Footer — single column ── */
  .site-footer {
    padding-top: 0;
  }

  .site-footer .col-lg-4,
  .site-footer .col-lg-2,
  .site-footer .col-lg-3,
  .site-footer .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .footer-top {
    padding: 2.25rem 0 0.5rem;
    text-align: center;
  }

  .footer-top [class*="col-"] {
    margin-bottom: 1.75rem;
  }

  .footer-top [class*="col-"]:last-child {
    margin-bottom: 0;
  }

  .footer-desc {
    font-size: 0.85rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
  }

  .footer-social {
    justify-content: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0;
  }

  .footer-social a {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .footer-title {
    font-size: 1rem;
    margin-bottom: 0.875rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .footer-links,
  .footer-contact {
    text-align: center;
  }

  .footer-links li,
  .footer-contact li {
    justify-content: center;
  }

  .footer-links li a {
    font-size: 0.9rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-contact li {
    font-size: 0.88rem;
    min-height: 40px;
    justify-content: center;
    word-break: break-word;
  }

  .footer-bottom {
    padding: 0.9rem 0;
  }

  .footer-bottom p {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
  }

  /* ── Property detail page — mobile first ── */
  .property-detail-gallery .gallery-main {
    border-radius: 8px;
    max-height: 280px;
  }

  .property-detail-gallery .gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .property-detail-gallery .gallery-thumbs img {
    height: 65px;
  }

  .property-detail-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .property-detail-info .price {
    font-size: 1.35rem;
  }

  .property-detail-features {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .property-detail-features .feature {
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .property-detail-description {
    font-size: 0.9rem;
  }

  .property-detail-sidebar .sidebar-card {
    margin-bottom: 1rem;
  }

  .property-detail-sidebar .sidebar-card .btn {
    width: 100%;
    min-height: 48px;
  }

  /* ── Sticky bottom contact bar ── */
  .property-detail-page .sticky-contact-bar,
  .imovel-page .sticky-contact-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    padding: 0.65rem 1rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    gap: 0.5rem;
    align-items: center;
  }

  .sticky-contact-bar .btn {
    flex: 1;
    min-height: 44px;
    font-size: 0.85rem;
  }

  .sticky-contact-bar .btn-whatsapp {
    background: #25d366;
    color: #fff;
    border-radius: 8px;
  }

  .sticky-contact-bar .btn-phone {
    background: var(--primary-color, #F69B9A);
    color: #fff;
    border-radius: 8px;
  }

  /* prevent footer from hiding behind sticky bar */
  .property-detail-page main,
  .imovel-page main {
    padding-bottom: 70px;
  }

  /* ── Cards grid on listing page ── */
  .property-grid,
  .properties-grid,
  .imoveis-grid {
    gap: 1rem;
  }

  /* ── Filter sidebar mobile ── */
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    z-index: 1045;
    background: #fff;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .filter-sidebar.open {
    left: 0;
  }

  .filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.5);
  }

  .filter-overlay.active {
    display: block;
  }

  .filter-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }

  /* ── Admin ── */
  .admin-wrapper {
    padding: 0.5rem;
  }

  .admin-cards-row {
    grid-template-columns: 1fr;
  }

  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 480px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .admin-header h1 {
    font-size: 1.3rem;
  }

  .admin-form .form-group {
    margin-bottom: 0.85rem;
  }

  .admin-form label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }

  .admin-form input,
  .admin-form select,
  .admin-form textarea {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .admin-form textarea {
    min-height: 100px;
  }

  .admin-form .btn {
    min-height: 44px;
    width: 100%;
  }

  /* ── Login ── */
  .login-container {
    padding: 1rem;
  }

  .login-container .form-control {
    min-height: 44px;
    font-size: 0.9rem;
  }

  .login-container .btn {
    min-height: 48px;
    width: 100%;
  }

  /* ── Utilities ── */
  .container {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }

  .img-fluid {
    max-width: 100%;
    height: auto;
  }
}

/* ==========================================================================
   375px — Tight mobile: smaller text, tighter spacing
   ========================================================================== */

@media (max-width: 375px) {

  /* ── Hero — full screen with compact text ── */
  .hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 70px;
  }

  .hero-title,
  .hero-section h1 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  /* ── Buttons — slightly smaller ── */
  .btn,
  .btn-primary,
  .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: 42px;
    border-radius: 7px;
  }

  .hero-buttons a,
  .hero-buttons .btn {
    max-width: 280px;
  }

  /* ── Search ── */
  .search-bar-overlay,
  .hero-search {
    padding: 0.7rem;
    margin: 0 0.25rem;
  }

  /* ── Property cards ── */
  .property-card .card-body,
  .property-card .property-info {
    padding: 0.7rem;
  }

  .property-card .card-title,
  .property-card .property-title {
    font-size: 0.95rem;
  }

  .property-card .card-price,
  .property-card .property-price {
    font-size: 1.05rem;
  }

  .property-card .card-features,
  .property-card .property-features {
    font-size: 0.75rem;
    gap: 0.5rem;
  }

  .property-card .card-location,
  .property-card .property-location {
    font-size: 0.75rem;
  }

  /* ── Section ── */
  .section-padding {
    padding: 1.75rem 0;
  }

  .section-title {
    font-size: 1.35rem;
  }

  /* ── Property detail ── */
  .property-detail-info h1 {
    font-size: 1.3rem;
  }

  .property-detail-info .price {
    font-size: 1.2rem;
  }

  .property-detail-gallery .gallery-main {
    max-height: 220px;
    border-radius: 6px;
  }

  .property-detail-gallery .gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }

  .property-detail-gallery .gallery-thumbs img {
    height: 55px;
  }

  .property-detail-features .feature {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }

  /* ── Footer ── */
  .footer-top {
    padding: 1.5rem 0;
  }

  .footer-brand {
    font-size: 1.05rem;
  }

  .footer-desc {
    font-size: 0.8rem;
  }

  /* ── Admin ── */
  .admin-table {
    min-width: 420px;
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.4rem 0.3rem;
  }

  /* ── Container ── */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* ── WhatsApp float ── */
  .whatsapp-float a {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }

  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
  }

  /* ── Sticky contact bar ── */
  .sticky-contact-bar {
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }

  .sticky-contact-bar .btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
  }

  /* ── Touch-friendly: ensure nothing is too small ── */
  a,
  button,
  input,
  select,
  textarea,
  [role="button"] {
    min-height: max(42px, 1em);
  }

  /* ── Forms ── */
  .form-control,
  .form-select {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  textarea.form-control {
    min-height: 90px;
  }
}

/* ==========================================================================
   320px — Minimum viable: nothing breaks
   ========================================================================== */

@media (max-width: 320px) {

  /* ── Hero ── */
  .hero-section {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-title,
  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }

  .hero-buttons {
    gap: 0.6rem;
  }

  .hero-buttons a,
  .hero-buttons .btn {
    max-width: 100%;
    font-size: 0.82rem;
    padding: 0.5rem 0.85rem;
    min-height: 40px;
  }

  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1rem; }

  /* ── Sections ── */
  .section-padding {
    padding: 1.5rem 0;
  }

  .section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  /* ── Property cards ── */
  .property-card .card-body,
  .property-card .property-info {
    padding: 0.6rem;
  }

  .property-card .card-title,
  .property-card .property-title {
    font-size: 0.9rem;
  }

  .property-card .card-price,
  .property-card .property-price {
    font-size: 1rem;
  }

  .property-card .card-features,
  .property-card .property-features {
    flex-wrap: wrap;
    font-size: 0.7rem;
  }

  /* ── Property detail ── */
  .property-detail-info h1 {
    font-size: 1.2rem;
  }

  .property-detail-info .price {
    font-size: 1.1rem;
  }

  .property-detail-gallery .gallery-main {
    max-height: 180px;
  }

  .property-detail-gallery .gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }

  .property-detail-gallery .gallery-thumbs img {
    height: 50px;
  }

  .property-detail-features .feature {
    font-size: 0.7rem;
    padding: 0.3rem 0.45rem;
    min-height: 32px;
  }

  .property-detail-description {
    font-size: 0.85rem;
  }

  /* ── Search ── */
  .search-bar-overlay,
  .hero-search {
    padding: 0.6rem;
    border-radius: 8px;
    margin: 0;
  }

  /* ── Footer ── */
  .footer-top {
    padding: 1.25rem 0;
  }

  .footer-brand {
    font-size: 0.95rem;
  }

  .footer-desc {
    font-size: 0.75rem;
  }

  .footer-title {
    font-size: 0.9rem;
  }

  .footer-links li a,
  .footer-contact li {
    font-size: 0.8rem;
    min-height: 36px;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .footer-bottom p {
    font-size: 0.7rem;
  }

  /* ── Container ── */
  .container {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }

  /* ── WhatsApp ── */
  .whatsapp-float a {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .whatsapp-float {
    bottom: 0.75rem;
    right: 0.75rem;
  }

  /* ── Admin ── */
  .admin-table {
    min-width: 380px;
    font-size: 0.75rem;
  }

  .admin-header h1 {
    font-size: 1.15rem;
  }

  /* ── Sticky bar ── */
  .sticky-contact-bar .btn {
    font-size: 0.75rem;
    min-height: 40px;
  }

  /* ── Ensure nothing overflows ── */
  img,
  video,
  embed,
  object {
    max-width: 100%;
    height: auto;
  }

  .property-card {
    overflow: hidden;
  }

  /* ── Safe area for notched phones ── */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .sticky-contact-bar {
      padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }

    .whatsapp-float {
      bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    .footer-bottom {
      padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }
  }
}

/* ==========================================================================
   GLOBAL MOBILE ADJUSTMENTS — applied at all small widths
   ========================================================================== */

@media (max-width: 768px) {

  /* ── Touch targets — minimum 44px ── */
  .nav-link,
  .dropdown-item,
  .pagination .page-link,
  .list-group-item-action,
  .breadcrumb-item a,
  .tab-link,
  a.list-group-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* ── Smooth scrolling for mobile ── */
  html {
    scroll-behavior: smooth;
  }

  /* ── Prevent horizontal scroll ── */
  body {
    overflow-x: hidden;
  }

  /* ── Ensure hero covers viewport properly ── */
  .hero-section,
  .hero {
    background-size: cover;
    background-position: center;
  }

  /* ── Videos in content ── */
  .video-wrapper,
  .embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
  }

  .video-wrapper iframe,
  .embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  /* ── Image gallery responsive ── */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  /* ── Testimonials ── */
  .testimonial-card {
    padding: 1.25rem;
  }

  .testimonial-text {
    font-size: 0.9rem;
  }

  /* ── Blog / news ── */
  .blog-card .card-body {
    padding: 1rem;
  }

  .blog-card .card-title {
    font-size: 1.05rem;
  }

  /* ── Tables ── */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Modal overrides ── */
  .modal-dialog {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }

  .modal-body {
    padding: 1rem;
    overflow-y: auto;
  }

  /* ── Back to top ── */
  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 5rem;
    right: 1rem;
  }
}

/* ==========================================================================
   LANDSCAPE PHONE
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {

  .hero-section {
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 2rem;
  }

  .hero-title,
  .hero-section h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-buttons a,
  .hero-buttons .btn {
    max-width: auto;
    flex: 1 1 auto;
  }

  .sticky-contact-bar {
    padding: 0.4rem 0.75rem;
  }

  .mobile-menu-panel {
    max-height: 100vh;
    max-height: 100dvh;
  }
}

/* ==========================================================================
   HIGH RESOLUTION / RETINA
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

  .hero-section {
    image-rendering: -webkit-optimize-contrast;
  }

  .property-card .card-image img,
  .property-card .property-image img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ==========================================================================
   PREFERS REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .mobile-menu-panel {
    transition: none;
  }

  .mobile-menu-overlay {
    transition: none;
  }

  .filter-sidebar {
    transition: none;
  }

  .admin-sidebar {
    transition: none;
  }
}

/* ==========================================================================
   DARK MODE SUPPORT (optional, progressive enhancement)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  /* Placeholder: uncomment and customize when dark mode is implemented
  :root {
    --bg-primary: #181922;
    --bg-secondary: #242424;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
  }

  .mobile-menu-panel {
    background: var(--bg-secondary);
  }

  .mobile-menu-nav a {
    color: var(--text-primary);
  }
  */
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {

  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  /* Hide non-essential elements */
  .site-header,
  .navbar,
  .navbar-toggler,
  .mobile-menu-overlay,
  .mobile-menu-panel,
  .whatsapp-float,
  .back-to-top,
  .hero-search,
  .search-bar-overlay,
  .filter-sidebar,
  .filter-overlay,
  .sticky-contact-bar,
  .footer-top .footer-social,
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-header-contact,
  #whatsappFloat,
  .admin-sidebar,
  .admin-header .btn-toggle-sidebar,
  script,
  style,
  link[rel="stylesheet"] {
    display: none !important;
  }

  /* Header */
  .site-header {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    margin-bottom: 1rem;
  }

  /* Hero */
  .hero-section {
    min-height: auto !important;
    padding: 1rem 0 !important;
  }

  .hero-title,
  .hero-section h1 {
    font-size: 24pt;
  }

  /* Links */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555 !important;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after,
  nav a::after,
  .footer-links a::after {
    content: "";
  }

  /* Images */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* Property cards */
  .property-grid,
  .properties-grid,
  .imoveis-grid {
    display: block;
  }

  .property-card {
    page-break-inside: avoid;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  .property-card .card-image,
  .property-card .property-image {
    max-height: 200px;
    overflow: hidden;
  }

  /* Footer */
  .site-footer {
    border-top: 2px solid #000;
    padding-top: 1rem;
    margin-top: 2rem;
  }

  .footer-top {
    padding: 1rem 0;
  }

  .footer-bottom {
    border-top: 1px solid #ccc;
    padding: 0.5rem 0;
  }

  /* Property detail */
  .property-detail-gallery .gallery-thumbs {
    display: none;
  }

  .property-detail-gallery .gallery-main {
    max-height: 300px;
  }

  /* Page setup */
  @page {
    margin: 2cm;
    size: A4;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  /* Show URL for navigation */
  .footer-links a[href]::after,
  .navbar-nav a[href]::after {
    content: none;
  }
}

/* ==========================================================================
   DARK SEARCH BOX (home over hero) — responsive overrides
   ========================================================================== */

.hero-search {
  max-width: none;
  padding: 0 24px;
  margin-top: -52px;
  margin-bottom: 56px;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  flex-direction: row;
}

.hero-search .search-form {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--gap-sm);
  align-items: end;
  flex-direction: row;
}

.hero-search .search-field > * {
  width: 100%;
}

.hero-search .search-field label {
  font-size: 0.68rem;
  margin-bottom: 6px;
  line-height: 1.2;
}

.hero-search .search-field select,
.hero-search .search-field input {
  padding: 9px 30px 9px 12px;
  font-size: var(--fs-xs);
  min-height: 0;
  border-radius: 8px;
  line-height: 1.4;
}

@media (max-width: 1200px) {
  .hero-search .search-form {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-search .search-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .hero-search {
    padding: 0 14px;
    margin-top: -40px;
    margin-bottom: 44px;
  }
  .hero-search-inner {
    padding: 18px 16px;
  }
  .hero-search .search-form {
    grid-template-columns: 1fr;
  }
  .hero-search .search-btn {
    width: 100%;
  }
}

/* ==========================================================================
   HOME / INTERNAL SECTIONS MOBILE FIXES
   counter-grid, featured-single, page-header, cards e títulos
   ========================================================================== */

@media (max-width: 768px) {

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .featured-single {
    grid-template-columns: 1fr;
  }

  .featured-single-image {
    min-height: 320px;
  }

  .featured-single-content {
    padding: var(--gap-xl) var(--gap-xl) var(--gap-2xl);
  }

  .featured-single-title {
    font-size: 1.8rem;
  }

  .featured-single-price {
    font-size: 1.8rem;
    margin-bottom: var(--gap-md);
  }

  .page-header {
    padding: calc(var(--header-height) + 40px) 0 48px;
  }

  .page-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {

  .counter-grid {
    gap: 1.5rem;
  }

  .counter-number {
    font-size: 2.5rem;
  }

  .counter-text {
    font-size: 1.35rem;
  }

  .counter-icon {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }

  .featured-single-image {
    min-height: 240px;
  }

  .featured-single-content {
    padding: var(--gap-xl) var(--gap-lg);
  }

  .featured-single-title {
    font-size: 1.5rem;
  }

  .featured-single-price {
    font-size: 1.5rem;
  }

  .featured-single-specs {
    gap: var(--gap-sm);
  }

  .page-header {
    padding: calc(var(--header-height) + 32px) 0 40px;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .about-text .section-title {
    font-size: 1.75rem;
  }

  .cta-title {
    font-size: 1.9rem;
  }

  .property-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }

  .property-card-location {
    font-size: 0.8rem;
  }

  .property-card-price {
    font-size: 1.15rem;
  }

  .property-card-features {
    font-size: 0.8rem;
    gap: 0.6rem;
  }

  .property-feature {
    font-size: 0.8rem;
  }
}

@media (max-width: 375px) {

  .counter-number {
    font-size: 2.25rem;
  }

  .property-card-title {
    font-size: 0.95rem;
  }

  .property-card-price {
    font-size: 1.05rem;
  }

  .property-card-features {
    flex-wrap: wrap;
    font-size: 0.75rem;
  }
}

@media (max-width: 320px) {

  .counter-number {
    font-size: 2rem;
  }
}

/* ==========================================================================
   ABOUT SECTION — mobile: foto em cima, texto embaixo
   ========================================================================== */

@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-xl);
  }
}

/* ==========================================================================
   WHATSAPP FLOAT — correção do ícone no mobile
   O círculo (.whatsapp-float) é flex; o <a> interno deve preenchê-lo para
   o ícone ficar centralizado, com o tamanho certo em todas as telas.
   ========================================================================== */

.whatsapp-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.whatsapp-float a i {
  font-size: 1.75rem;
  line-height: 1;
}

/* Em páginas de imóvel, a barra fixa de contato fica no rodapé do mobile —
   sobe o botão flutuante para não sobrepô-la. */
@media (max-width: 768px) {
  body.page-imovel .whatsapp-float {
    bottom: 84px;
  }
}

/* ==========================================================================
   PÁGINA DO IMÓVEL (imovel.php) — tipografia mobile
   As regras abaixo usam as classes reais da página (as antigas, ex.
   .property-detail-info, não existem no HTML).
   ========================================================================== */

@media (max-width: 768px) {
  .property-detail-title h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .property-detail-location {
    font-size: 0.9rem;
    flex-wrap: wrap;
    word-break: break-word;
  }
}

@media (max-width: 576px) {
  .property-detail-title h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .property-detail-location {
    font-size: 0.85rem;
  }

  .property-description p {
    font-size: 0.9rem;
    line-height: 1.75;
  }

  .characteristic-item {
    font-size: 0.9rem;
  }

  .contact-sidebar .price-display {
    font-size: 1.6rem;
  }

  .property-specs {
    padding: var(--gap-md);
    gap: var(--gap-sm);
  }

  .spec-item .spec-value {
    font-size: 1.05rem;
  }

  .spec-item .spec-label {
    font-size: 0.65rem;
  }

  .similar-properties h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 375px) {
  .property-detail-title h1 {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   PÁGINA DO IMÓVEL — vídeo do YouTube e Google Maps no mobile
   ========================================================================== */

@media (max-width: 768px) {
  .property-video h3,
  .property-map h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .map-responsive {
    padding-bottom: 60%;
  }
}
