/* ============================================================
   responsive.css - Master Responsive Stylesheet for prop4all
   Real Estate Website - Tamil Nadu, India

   Breakpoints:
   - 1200px: Large desktops
   - 992px:  Tablets landscape / small desktops
   - 768px:  Tablets portrait / large phones
   - 576px:  Small phones
   ============================================================ */

/* ============================================================
   GLOBAL DEFAULTS (all pages)
   ============================================================ */

/* Ensure scroll-to-top is visible on all pages */
#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: var(--z-sticky);
}

/* ============================================================
   1200px - Large Desktop
   ============================================================ */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 30px;
  }

  /* Homepage: properties 4 -> 3 cols */
  .properties-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Homepage: districts 6 -> 4 cols */
  .districts-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Homepage: why-choose 4 -> 2 cols */
  .why-choose-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Homepage: team 4 -> 3 cols */
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Property Detail: layout narrower sidebar */
  .detail-layout {
    grid-template-columns: 1fr 340px;
  }

  /* Pricing: plan cards */
  .pricing-grid {
    gap: var(--spacing-lg);
  }
}

/* ============================================================
   992px - Tablet Landscape / Small Desktop
   ============================================================ */
@media (max-width: 992px) {
  /* Body: switch to mobile header height */
  body {
    padding-top: var(--header-height-mobile);
  }

  /* Header: hide desktop nav, show hamburger */
  .header {
    height: var(--header-height-mobile);
  }

  .nav-desktop {
    display: none !important;
  }

  .hamburger-btn,
  #hamburgerBtn {
    display: flex !important;
  }

  /* Footer: 2-column grid */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  /* Reduce section padding by ~30% */
  .section {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  .featured-section,
  .latest-section,
  .browse-districts,
  .browse-types,
  .services-section,
  .testimonials-section,
  .blog-section,
  .team-section,
  .recently-viewed,
  .why-choose {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  /* Homepage: hero search fields wrap */
  .hero-search-form {
    flex-wrap: wrap;
  }

  .search-field {
    min-width: calc(50% - var(--spacing-md));
    flex: none;
    width: calc(50% - var(--spacing-md));
  }

  .hero-search-btn {
    width: 100%;
    justify-content: center;
    margin-top: var(--spacing-sm);
  }

  /* Homepage: properties grid 2 cols */
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Homepage: districts 3 cols */
  .districts-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Homepage: services 2 cols */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Homepage: blog 2 cols */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Homepage: team 2 cols */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Property Listing: grid 2 cols */
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .property-grid.list-view .property-card {
    height: 200px;
  }

  .property-grid.list-view .property-card .card-image {
    width: 240px;
    min-width: 240px;
  }

  /* Property Detail: single column layout */
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  /* Dashboard: sidebar becomes horizontal */
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: var(--spacing-sm);
    gap: var(--spacing-xs);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--radius-full);
  }

  .dashboard-content {
    width: 100%;
  }

  /* Auth: ensure proper sizing */
  .auth-container {
    min-height: calc(100vh - var(--header-height-mobile));
  }

  /* Pricing: 2 cols */
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Promoter Profile: stack header */
  .promoter-header {
    flex-direction: column;
    text-align: center;
  }

  .promoter-header-info {
    align-items: center;
  }

  /* Promoter properties: 2 cols */
  .promoter-properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Blog detail: sidebar below content */
  .blog-detail-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  /* Services page: 2 cols */
  .services-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Team page: 2 cols */
  .team-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About page: story stack */
  .about-story {
    grid-template-columns: 1fr;
  }

  /* Contact page: stack columns */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Careers page: single column */
  .careers-grid {
    grid-template-columns: 1fr;
  }

  /* FAQ: slightly smaller fonts */
  .faq-question {
    font-size: var(--font-size-sm);
  }
}

/* ============================================================
   768px - Tablet Portrait / Large Phone
   ============================================================ */
@media (max-width: 768px) {
  /* Body: mobile header height */
  body {
    padding-top: var(--header-height-mobile);
  }

  /* Typography: reduce headings */
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }

  /* Container: tighter padding */
  .container {
    padding: 0 16px;
  }

  /* All buttons: min 44x44 touch target */
  .btn,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  .btn-sm {
    min-height: 40px;
  }

  /* Reduce section padding by ~50% */
  .section {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .featured-section,
  .latest-section,
  .browse-districts,
  .browse-types,
  .services-section,
  .testimonials-section,
  .blog-section,
  .team-section,
  .recently-viewed,
  .why-choose {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  /* Section title smaller */
  .section-title {
    font-size: var(--font-size-xl);
  }

  .section-subtitle {
    font-size: var(--font-size-sm);
  }

  /* Footer: single column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* ---- HOMEPAGE ---- */

  /* Hero: smaller */
  .hero {
    min-height: 400px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  .hero-search {
    padding: var(--spacing-md);
  }

  /* Hero search: fields stack vertically */
  .search-field {
    width: 100%;
    min-width: 100%;
  }

  /* Properties: single column */
  .properties-grid {
    grid-template-columns: 1fr;
  }

  /* Districts: 2 cols */
  .districts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Types: 2 cols wrap */
  .types-grid {
    gap: var(--spacing-lg);
  }

  .type-card {
    min-width: 120px;
  }

  .type-card-icon {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  /* Services: single column */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Testimonials: single card visible */
  .testimonial-quote {
    font-size: var(--font-size-base);
  }

  .testimonial-nav {
    gap: var(--spacing-sm);
  }

  /* Team: 2 cols */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Blog: single column */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Why choose: single column */
  .why-choose-grid {
    grid-template-columns: 1fr;
  }

  /* ---- PROPERTY LISTING ---- */

  /* Filters: hidden behind button */
  .filter-bar {
    top: var(--header-height-mobile);
    padding: var(--spacing-sm) 0;
  }

  .filter-bar-row {
    display: none;
  }

  .mobile-filter-btn {
    display: flex;
  }

  .filter-bar .container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
  }

  /* Grid: 2 -> handled via list-view force */
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* List view: force grid on mobile */
  .property-grid.list-view {
    grid-template-columns: 1fr;
  }

  .property-grid.list-view .property-card {
    flex-direction: column;
    height: auto;
  }

  .property-grid.list-view .property-card .card-image {
    width: 100%;
    min-width: unset;
    aspect-ratio: 16/10;
    height: auto;
  }

  /* Hide view toggle on mobile */
  .view-toggle {
    display: none;
  }

  /* Sort: wider */
  .sort-select {
    min-width: 140px;
  }

  /* Pagination: show prev/next only, hide page numbers */
  .pagination .page-item:not(:first-child):not(:last-child) {
    display: none;
  }

  .pagination .page-item:first-child,
  .pagination .page-item:last-child {
    display: inline-flex;
  }

  .pagination .page-prev,
  .pagination .page-next {
    min-width: 100px;
  }

  /* ---- PROPERTY DETAIL ---- */

  /* Gallery: scroll-snap swipe, show dots */
  .gallery-main {
    scroll-snap-type: x mandatory;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .gallery-main::-webkit-scrollbar {
    display: none;
  }

  .gallery-main img {
    min-width: 100%;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .gallery-thumbnails {
    display: none;
  }

  .gallery-mobile-dots {
    display: flex;
  }

  /* Layout: single column */
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  /* Property header: stack */
  .property-header-top {
    flex-direction: column;
  }

  .property-title {
    font-size: var(--font-size-2xl);
  }

  .property-price {
    font-size: var(--font-size-2xl);
  }

  /* Quick info: wrap to multiple rows */
  .quick-info {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .quick-info-item {
    border-right: none;
    padding-right: 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-100);
  }

  .quick-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Amenities: 2 cols */
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Share buttons: icon only */
  .share-label {
    display: none;
  }

  .share-btn span {
    display: none;
  }

  /* Mobile CTA bar */
  .mobile-cta {
    display: flex;
  }

  .detail-page {
    padding-bottom: 80px;
  }

  /* Adjust scroll-to-top above mobile CTA */
  .detail-page .scroll-to-top,
  .detail-page #scrollToTop {
    bottom: 76px;
  }

  /* Similar properties: horizontal scroll */
  .similar-properties-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--spacing-sm);
  }

  .similar-properties-scroll .property-card {
    scroll-snap-align: start;
    min-width: 260px;
    max-width: 280px;
  }

  /* ---- AUTH PAGES ---- */

  .auth-card {
    max-width: 100%;
    padding: 24px 15px;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
  }

  .auth-card.auth-card-wide {
    max-width: 100%;
  }

  /* ---- DASHBOARD ---- */

  /* Properties: card view instead of table */
  .dashboard-table-responsive {
    display: none;
  }

  .dashboard-card-view {
    display: block;
  }

  .dashboard-table-mobile-card {
    display: block;
  }

  /* Profile form: single column */
  .profile-form .form-row,
  .dashboard-form .form-row {
    grid-template-columns: 1fr;
  }

  /* Analytics: full width stacked */
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-card {
    width: 100%;
  }

  /* Plan card: full width */
  .plan-info-card {
    max-width: 100%;
  }

  /* ---- POST PROPERTY ---- */

  /* Step indicator: text + progress bar */
  .step-indicator {
    display: none;
  }

  .step-indicator-mobile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
  }

  .step-progress-bar {
    display: block;
  }

  /* Form: single column */
  .post-property-form .form-row {
    grid-template-columns: 1fr;
  }

  /* Image upload: ensure tap-friendly */
  .image-upload-zone {
    min-height: 120px;
    cursor: pointer;
  }

  /* ---- PRICING ---- */

  /* Plan cards: single column */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-card.featured {
    order: -1;
  }

  /* ---- PROMOTER PROFILE ---- */

  /* Header: stack vertically */
  .promoter-header {
    flex-direction: column;
    text-align: center;
  }

  .promoter-avatar {
    margin: 0 auto var(--spacing-md);
  }

  .promoter-header-info {
    align-items: center;
  }

  /* Properties: 1 col on smaller tablet */
  .promoter-properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ---- BLOG ---- */

  /* Listing: single column */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Detail: full width, sidebar below */
  .blog-detail-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    margin-top: var(--spacing-xl);
  }

  /* Related: horizontal scroll */
  .related-posts-grid {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .related-posts-grid .blog-card {
    min-width: 260px;
    max-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  /* ---- SERVICES PAGE ---- */
  .services-page-grid {
    grid-template-columns: 1fr;
  }

  /* ---- TEAM PAGE ---- */
  .team-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Team: horizontal card layout on mobile (photo left, info right) */
  .team-page-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--spacing-md);
  }

  .team-page-card .team-card-photo,
  .team-page-card .team-member-photo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin: 0;
  }

  /* ---- ABOUT PAGE ---- */
  .about-story {
    grid-template-columns: 1fr;
  }

  .mvv-grid {
    grid-template-columns: 1fr;
  }

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

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

  /* ---- CONTACT PAGE ---- */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: var(--spacing-lg);
  }

  /* Contact form: full-width fields */
  .contact-form-wrapper .form-row {
    grid-template-columns: 1fr;
  }

  /* ---- FAQ PAGE ---- */
  /* Larger tap areas for accordion */
  .faq-question {
    min-height: 50px;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-sm);
  }

  .faq-answer-content {
    padding: 0 var(--spacing-lg) var(--spacing-md);
  }

  /* ---- CAREERS PAGE ---- */
  .careers-grid {
    grid-template-columns: 1fr;
  }

  .career-card {
    padding: var(--spacing-lg);
  }

  /* ---- GLOBAL: FORM INPUTS ---- */
  /* Prevent iOS zoom on focus: min 16px font */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
  }

  /* ---- MODALS ---- */
  .modal-content {
    max-width: 100%;
    margin: var(--spacing-md);
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .modal-body {
    padding: var(--spacing-lg);
  }

  .modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  /* Breadcrumb: smaller */
  .breadcrumb {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-xs);
  }

  /* Page header banners: smaller */
  .page-header h1 {
    font-size: var(--font-size-2xl);
  }

  .page-header p {
    font-size: var(--font-size-base);
  }

  .page-header {
    padding: var(--spacing-2xl) 0;
  }

  /* Toast: full width */
  .toast-container {
    max-width: calc(100% - 20px);
    right: 10px;
    top: calc(var(--header-height-mobile) + 10px);
  }
}

/* ============================================================
   576px - Small Phone
   ============================================================ */
@media (max-width: 576px) {
  /* Container: minimal padding */
  .container {
    padding: 0 15px;
  }

  .container-fluid {
    padding: 0 15px;
  }

  /* Footer: full-width everything */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

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

  .footer-column ul {
    align-items: center;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
    font-size: var(--font-size-xs);
  }

  /* ---- HOMEPAGE ---- */

  /* Hero: minimal */
  .hero {
    min-height: 350px;
  }

  .hero-content {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-subtitle {
    font-size: var(--font-size-sm);
  }

  .hero-search {
    padding: var(--spacing-sm);
  }

  /* Search fields: full-width */
  .search-field {
    width: 100%;
    min-width: 100%;
  }

  /* Properties: single column */
  .properties-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* Districts: 2 cols tighter */
  .districts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  /* Types: stack vertically */
  .types-grid {
    flex-direction: column;
    align-items: center;
  }

  .type-card {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
  }

  .type-card-icon {
    margin: 0;
    width: 56px;
    height: 56px;
    font-size: 24px;
    flex-shrink: 0;
  }

  /* Services: single column */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
  }

  .service-card-icon {
    margin: 0;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  /* Team: single column */
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .team-card-photo {
    width: 64px;
    height: 64px;
    margin: 0;
    flex-shrink: 0;
  }

  .team-card-social {
    display: none;
  }

  /* Blog: single column */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* Recently viewed: smaller cards */
  .recently-viewed-scroll .property-card {
    min-width: 240px;
    max-width: 240px;
  }

  /* Testimonials: tighter */
  .testimonial-card {
    padding: var(--spacing-lg);
  }

  .testimonial-avatar {
    width: 60px;
    height: 60px;
  }

  .testimonial-quote {
    font-size: var(--font-size-sm);
  }

  .testimonial-quote::before {
    font-size: 36px;
  }

  /* ---- PROPERTY LISTING ---- */

  /* Grid: single column */
  .property-grid {
    grid-template-columns: 1fr;
  }

  /* Sort: full width */
  .results-actions {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  /* ---- PROPERTY DETAIL ---- */

  /* Details table: key above value */
  .details-table td {
    display: block;
    width: 100%;
  }

  .details-table tr {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .details-table td:first-child {
    font-weight: 600;
    color: var(--gray-700);
    padding-bottom: 2px;
    border-bottom: none;
  }

  .details-table td:last-child {
    color: var(--gray-900);
  }

  /* Amenities: 2 cols maintained */
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  /* Similar properties: smaller cards */
  .similar-properties-scroll .property-card {
    min-width: 220px;
    max-width: 250px;
  }

  /* ---- AUTH PAGES ---- */

  .auth-card {
    padding: 20px 15px;
    box-shadow: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
  }

  /* Register role selector: stack vertically */
  .role-selector {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .role-option {
    width: 100%;
  }

  /* All auth fields: full width (already 100% by default) */

  /* ---- DASHBOARD ---- */

  /* Properties card view */
  .dashboard-property-card {
    padding: var(--spacing-md);
  }

  /* Profile: single column */
  .profile-form .form-row,
  .dashboard-form .form-row {
    grid-template-columns: 1fr;
  }

  /* Stats: 2 cols stacked */
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  .dashboard-stat-card {
    padding: var(--spacing-md);
  }

  /* ---- POST PROPERTY ---- */

  /* Navigation: full-width stacked buttons */
  .post-property-nav,
  .step-navigation {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .post-property-nav .btn,
  .step-navigation .btn {
    width: 100%;
  }

  /* Form: single column */
  .post-property-form .form-row {
    grid-template-columns: 1fr;
  }

  /* ---- PRICING ---- */

  /* Full-width cards */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .pricing-card {
    padding: var(--spacing-lg);
  }

  /* ---- PROMOTER PROFILE ---- */

  /* Properties: single column */
  .promoter-properties-grid {
    grid-template-columns: 1fr;
  }

  .promoter-stats {
    flex-wrap: wrap;
  }

  .promoter-stat {
    flex: 1;
    min-width: calc(50% - var(--spacing-sm));
  }

  /* ---- BLOG ---- */

  .blog-card-content {
    padding: var(--spacing-md);
  }

  .blog-card-title {
    font-size: var(--font-size-base);
  }

  /* Related posts: smaller cards */
  .related-posts-grid .blog-card {
    min-width: 220px;
    max-width: 250px;
  }

  /* ---- ABOUT PAGE ---- */

  .values-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .stat-item h3 {
    font-size: var(--font-size-2xl);
  }

  /* ---- CONTACT PAGE ---- */

  .contact-form-wrapper {
    padding: var(--spacing-md);
  }

  .contact-info-card {
    padding: var(--spacing-md);
  }

  /* ---- FAQ PAGE ---- */

  /* Horizontal scroll pills on very small */
  .faq-categories {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .faq-categories::-webkit-scrollbar {
    display: none;
  }

  .faq-category-pill {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: var(--font-size-xs);
  }

  .faq-question {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }

  /* ---- CAREERS PAGE ---- */

  .careers-grid {
    gap: var(--spacing-md);
  }

  /* ---- LEGAL PAGES (Privacy, Terms) ---- */

  .legal-container {
    padding: 0;
  }

  .legal-content h2 {
    font-size: var(--font-size-lg);
    margin-top: var(--spacing-xl);
  }

  .legal-content h3 {
    font-size: var(--font-size-base);
  }

  .legal-toc {
    padding: var(--spacing-md);
  }

  /* ---- 404 PAGE ---- */
  .error-code {
    font-size: 100px;
    letter-spacing: -3px;
  }

  .error-content h1 {
    font-size: var(--font-size-2xl);
  }

  .error-content p {
    font-size: var(--font-size-base);
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn {
    width: 100%;
  }

  /* ---- GLOBAL ---- */

  /* Scroll to Top: smaller, repositioned */
  #scrollToTop,
  .scroll-to-top {
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Pagination: prev/next only */
  .pagination .page-item:not(:first-child):not(:last-child) {
    display: none;
  }

  .pagination {
    gap: var(--spacing-sm);
  }

  /* Toast */
  .toast-container {
    max-width: calc(100% - 16px);
    right: 8px;
  }
}

/* ============================================================
   TOUCH TARGET & ACCESSIBILITY ENHANCEMENTS
   ============================================================ */
@media (pointer: coarse) {
  /* All interactive elements: min 44x44px touch target */
  a,
  button,
  .btn,
  input[type="checkbox"],
  input[type="radio"],
  select,
  .faq-question,
  .tab-item,
  .pagination .page-link,
  .dropdown-item,
  .filter-chip button,
  .testimonial-dot,
  .gallery-tab {
    min-height: 44px;
    min-width: 44px;
  }

  /* Slightly larger tap targets for small buttons */
  .btn-sm {
    min-height: 40px;
    padding: 10px 16px;
  }

  .btn-icon {
    width: 44px;
    height: 44px;
  }

  .btn-icon.btn-sm {
    width: 40px;
    height: 40px;
  }

  /* FAQ accordion: larger touch area */
  .faq-question {
    min-height: 50px;
  }
}

/* ============================================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) and (orientation: landscape) {
  /* Hero: shorter in landscape */
  .hero {
    min-height: 300px;
  }

  .hero-title {
    font-size: 24px;
  }

  /* Mobile CTA: thinner */
  .mobile-cta {
    height: 50px;
  }
}

/* ============================================================
   HIGH DPI / RETINA DISPLAYS
   ============================================================ */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
  /* Ensure thin borders remain crisp */
  .card,
  .form-group input,
  .form-group select,
  .form-group textarea {
    border-width: 0.5px;
  }
}

/* ============================================================
   REDUCED MOTION PREFERENCE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-slide {
    transition: none;
  }

  .testimonials-track {
    transition: none;
  }

  .card:hover {
    transform: none;
  }

  .property-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* ============================================================
   PRINT STYLES (supplemental)
   ============================================================ */
@media print {
  body {
    padding-top: 0 !important;
  }

  .header,
  .footer,
  #scrollToTop,
  .scroll-to-top,
  .toast-container,
  .modal-overlay,
  .mobile-cta,
  .filter-bar,
  .mobile-filter-btn,
  .share-buttons,
  .pagination,
  .hamburger-btn,
  #hamburgerBtn {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section {
    padding: 20px 0;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    color: #666;
  }

  .btn::after {
    content: none;
  }
}

/* ============================================================
   SAFE AREA INSETS (iOS notch/home indicator)
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-cta {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
  }

  #scrollToTop,
  .scroll-to-top {
    bottom: calc(30px + env(safe-area-inset-bottom));
  }

  @media (max-width: 768px) {
    .detail-page #scrollToTop,
    .detail-page .scroll-to-top {
      bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .detail-page {
      padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
  }
}
