/*
 * ===================================================================
 * TRICON CORPORATE CENTRE — RESPONSIVE STYLESHEET
 * Breakpoints: 1600, 1440, 1366, 1200, 1024, 992, 820, 768,
 *              480, 414, 390, 375, 360, 320
 * NO horizontal scrolling. NO overflow. Everything scales perfectly.
 * ===================================================================
 */

/* =====================================================================
   1600px — Large desktops
   ===================================================================== */
@media (max-width: 1600px) {
  :root { --container-max: 1400px; }
}

/* =====================================================================
   1440px — Standard wide desktop
   ===================================================================== */
@media (max-width: 1440px) {
  :root { --container-max: 1280px; }
  .hero__heading { font-size: clamp(2.25rem, 5vw, 5rem); }
}

/* =====================================================================
   1366px — Laptop screens
   ===================================================================== */
@media (max-width: 1366px) {
  :root { --container-max: 1180px; }
  .amenities-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-main__grid { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 2rem; }
}

/* =====================================================================
   1200px — Small laptops / large tablets landscape
   ===================================================================== */
@media (max-width: 1200px) {
  :root {
    --container-max: 1060px;
    --space-xxl: 5rem;
  }

  /* Header */
  .primary-menu > li > a { padding: 0.625rem 0.75rem; font-size: 0.85rem; }

  /* Overview */
  .overview__grid { gap: 3rem; }
  .overview__img-stack { height: 450px; }

  /* Stats */
  .stats-grid { gap: 1rem; }

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

  /* Why us */
  .why-us__grid { gap: 3rem; }

  /* Gallery */
  .gallery-masonry { grid-template-columns: repeat(3, 1fr); }

  /* Footer */
  .footer-main__grid { grid-template-columns: 1.25fr 1fr 1fr 1.25fr; gap: 1.5rem; }

  /* Contact */
  .contact-quick-cards { grid-template-columns: repeat(2, 1fr); }

  /* Sidebar */
  .single-wrap { grid-template-columns: 1fr 280px; }

  /* Timeline */
  .timeline::before { left: 28px; }
  .timeline__item { grid-template-columns: 56px 1fr; }
  .timeline__item--left .timeline__content,
  .timeline__item--right .timeline__content { grid-column: 2; text-align: left; }
  .timeline__item--left > :nth-child(3) { display: block; }
  .timeline__item--left .timeline__icon { grid-column: 1; }
  .timeline__item--right > :first-child { display: none; }
  .timeline__item--right .timeline__icon { grid-column: 1; }
}

/* =====================================================================
   1024px — Tablet landscape / small laptop
   ===================================================================== */
@media (max-width: 1024px) {
  :root { --space-xxl: 4rem; }

  /* Hide desktop nav, show hamburger */
  .site-header__nav { display: none; }
  .hamburger { display: flex; }
  .site-header__cta { display: none; }

  /* Hero */
  .hero__cards { grid-template-columns: repeat(2, 1fr); }
  .hero__heading { font-size: clamp(2rem, 5vw, 4rem); }

  /* Overview */
  .overview__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .overview__media { display: none; } /* Hide complex image stack on tablet */

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

  /* Why us */
  .why-us__grid { grid-template-columns: 1fr; }
  .why-us__visual { display: none; }

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

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

  /* Gallery */
  .gallery-preview__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-masonry { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:nth-child(5n+1) { grid-column: span 1; grid-row: span 1; }

  /* Reviews */
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }

  /* Updates */
  .updates-grid { grid-template-columns: repeat(2, 1fr); }

  /* Location */
  .location-grid { grid-template-columns: 1fr; }

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

  /* FAQ */
  .faqs-grid { grid-template-columns: 1fr; }
  .faq-contact-card { position: static; }
  .faqs-page-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-main__grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .footer-col--about { grid-column: span 2; }
  .footer-col--contact { grid-column: span 2; }

  /* Sidebar */
  .single-wrap { grid-template-columns: 1fr; }
  .site-sidebar { position: static; }

  /* Posts grid */
  .posts-grid { grid-template-columns: repeat(2, 1fr); }

  /* Service detail */
  .service-detail__grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-detail__grid--reverse > *:first-child { order: 0; }
  .service-detail__grid--reverse > *:last-child  { order: 0; }

  /* MV grid */
  .mv-grid { grid-template-columns: 1fr; gap: 1.25rem; }

  /* 404 */
  .error-page__inner { grid-template-columns: 1fr; text-align: center; }
  .error-page__code { font-size: 20vw; }

  /* CTA strip */
  .cta-strip__inner { flex-direction: column; text-align: center; }
  .cta-strip__actions { justify-content: center; }

  /* Rating summary */
  .rating-summary { flex-direction: column; text-align: center; }
}

/* =====================================================================
   992px — Tablet portrait
   ===================================================================== */
@media (max-width: 992px) {
  /* Contact quick cards */
  .contact-quick-cards { grid-template-columns: repeat(2, 1fr); }

  /* Footer newsletter */
  .footer-newsletter__inner { flex-direction: column; align-items: flex-start; }
  .footer-newsletter__form { max-width: 100%; width: 100%; }

  /* Hero quick cards */
  .hero__cards { grid-template-columns: repeat(2, 1fr); }

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

/* =====================================================================
   820px — Large phones landscape / small tablet
   ===================================================================== */
@media (max-width: 820px) {
  :root {
    --topbar-height: 0px;
    --space-xxl: 3.5rem;
    --space-xl: 3rem;
  }

  /* Hide top bar */
  .topbar { display: none; }

  /* Header */
  .site-header {
    height: 68px;
  }
  :root { --header-height: 68px; }

  /* Hero */
  .hero__heading { font-size: clamp(1.875rem, 6vw, 3.5rem); }
  .hero__cards { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .hero-card { padding: 1rem; }

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

  /* Gallery */
  .gallery-preview__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-masonry { grid-template-columns: repeat(2, 1fr); }

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

  /* Reviews */
  .reviews-grid { grid-template-columns: 1fr; }

  /* Updates */
  .updates-grid { grid-template-columns: 1fr; }

  /* Posts */
  .posts-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-main__grid { grid-template-columns: 1fr 1fr; }
  .footer-col--about,
  .footer-col--contact { grid-column: span 2; }
  .footer-bottom__inner { flex-direction: column; text-align: center; }

  /* Contact quick */
  .contact-quick-cards { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   768px — Standard tablet portrait
   ===================================================================== */
@media (max-width: 768px) {
  /* Section spacing */
  .section { padding-block: 3rem; }

  /* Hero */
  .hero__cta { flex-direction: column; align-items: flex-start; }
  .hero__trust { flex-wrap: wrap; }

  /* Overview highlights */
  .overview__highlights { grid-template-columns: 1fr; }

  /* MV grid */
  .mv-grid { grid-template-columns: 1fr; }

  /* Contact form */
  .form-row--2 { flex-direction: column; }

  /* WhatsApp CTA */
  .whatsapp-cta { flex-wrap: wrap; }

  /* Footer newsletter form */
  .footer-newsletter__form { flex-direction: column; }
  .footer-newsletter__form input { width: 100%; }
  .footer-newsletter__form .btn { width: 100%; justify-content: center; }

  /* Footer bottom links */
  .footer-bottom__links { flex-wrap: wrap; gap: 0.75rem; }
}

/* =====================================================================
   480px — Large phones
   ===================================================================== */
@media (max-width: 480px) {
  :root {
    --container-pad: 1.25rem;
    --space-xxl: 3rem;
    --space-xl: 2.25rem;
    --space-lg: 2rem;
  }

  /* Hero */
  .hero__heading { font-size: clamp(1.75rem, 8vw, 2.75rem); }
  .hero__cards { grid-template-columns: repeat(2, 1fr); }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__badge { font-size: 0.7rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item { padding: 1.5rem 1rem; border: 1px solid rgba(255,255,255,0.06); }

  /* Gallery */
  .gallery-preview__grid { grid-template-columns: 1fr; }
  .gallery-masonry { grid-template-columns: 1fr; }
  .gallery-item:nth-child(5n+1) { grid-column: span 1; grid-row: span 1; }
  .gallery-filter { gap: 0.375rem; }
  .gallery-filter__btn { padding: 0.375rem 0.875rem; font-size: 0.8rem; }

  /* Contact */
  .contact-quick-cards { grid-template-columns: 1fr; }

  /* Amenities */
  .amenities-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-main__grid { grid-template-columns: 1fr; }
  .footer-col--about,
  .footer-col--contact { grid-column: span 1; }

  /* CTA strip actions */
  .cta-strip__actions { flex-direction: column; align-items: center; width: 100%; }
  .cta-strip__actions .btn { width: 100%; justify-content: center; }

  /* Floating buttons */
  .floating-buttons { right: 1rem; bottom: 1rem; }
  .floating-btn { width: 46px; height: 46px; font-size: 1.125rem; }

  /* Page hero */
  .page-hero { padding: calc(var(--header-height) + 2rem) 0 2rem; }
  .page-hero__title { font-size: clamp(1.5rem, 7vw, 2.25rem); }

  /* Error page */
  .error-page__links { flex-direction: column; }
  .error-page__links .btn { width: 100%; justify-content: center; }
  .error-page__quick-links ul { flex-direction: column; }

  /* Timeline */
  .timeline__item { grid-template-columns: 48px 1fr; }
  .timeline__icon { width: 48px; height: 48px; }

  /* Rating summary */
  .rating-summary { padding: 1.5rem; }
  .rating-summary__number { font-size: 3.5rem; }

  /* Section title */
  .section-title { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* Section intro */
  .section-intro { font-size: 1rem; }

  /* Buttons */
  .btn--lg { padding: 0.875rem 1.75rem; font-size: 0.9375rem; }
}

/* =====================================================================
   414px — iPhone Plus / Pro Max
   ===================================================================== */
@media (max-width: 414px) {
  :root { --container-pad: 1rem; }

  .hero__heading { font-size: clamp(1.625rem, 8vw, 2.5rem); }
  .hero-card { padding: 0.875rem 0.625rem; }
  .hero-card strong { font-size: 0.8rem; }
  .hero-card span { font-size: 0.65rem; }

  /* Post navigation */
  .post-navigation .nav-links { flex-direction: column; }

  /* Footer map */
  .footer-map { display: none; } /* Remove mini-map on very small screens */
}

/* =====================================================================
   390px — iPhone 14 / 15 Pro
   ===================================================================== */
@media (max-width: 390px) {
  .hero__cards { grid-template-columns: 1fr 1fr; }
  .hero-card i { font-size: 1.125rem; }

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

  .stat-number { font-size: 2.25rem; }
  .stat-label { font-size: 0.8rem; }

  /* Reviews slider buttons */
  .swiper-button-prev,
  .swiper-button-next { display: none !important; }
}

/* =====================================================================
   375px — iPhone SE / standard
   ===================================================================== */
@media (max-width: 375px) {
  :root { --header-height: 64px; }

  .logo-primary { font-size: 1.25rem; }
  .logo-sub { font-size: 0.55rem; }

  .hero__heading { font-size: clamp(1.5rem, 9vw, 2.25rem); }
  .hero__subheading { font-size: 0.9rem; }

  .section-title { font-size: clamp(1.4rem, 6vw, 1.875rem); }

  .btn { font-size: 0.875rem; padding: 0.625rem 1.25rem; }
  .btn--lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }

  .faq-item__question { padding: 1rem; font-size: 0.9rem; }

  .footer-newsletter__text h4 { font-size: 1.1rem; }
}

/* =====================================================================
   360px — Android standard
   ===================================================================== */
@media (max-width: 360px) {
  :root { --container-pad: 0.875rem; }

  .hero__cta .btn { font-size: 0.875rem; }
  .hero__cards { gap: 0.5rem; }

  .gallery-filter { gap: 0.25rem; }
  .gallery-filter__btn { padding: 0.3rem 0.75rem; font-size: 0.75rem; }

  .contact-quick-card { padding: 1.25rem 1rem; }
}

/* =====================================================================
   320px — iPhone SE 1st gen / small Android
   ===================================================================== */
@media (max-width: 320px) {
  :root {
    --container-pad: 0.75rem;
    --header-height: 60px;
  }

  .logo-primary { font-size: 1.125rem; }

  .hero { min-height: 100svh; }
  .hero__heading { font-size: clamp(1.375rem, 10vw, 2rem); }
  .hero__cards { grid-template-columns: 1fr; }

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

  .service-card,
  .amenity-card,
  .review-card { padding: 1.25rem 1rem; }

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

  .btn { font-size: 0.8125rem; padding: 0.5625rem 1rem; }
  .btn--lg { padding: 0.6875rem 1.25rem; font-size: 0.875rem; }

  .faq-item__question { padding: 0.875rem; font-size: 0.875rem; }

  .mobile-nav__inner { padding: 3rem 1.25rem; }
}

/* =====================================================================
   GLOBAL ANTI-OVERFLOW RULES
   Applied universally at all widths.
   ===================================================================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  max-width: 100%;
}

img, video, iframe, embed, object {
  max-width: 100%;
}

/* Prevent any element from causing horizontal scroll */
.container,
.site-header__inner,
.hero__container,
.footer-main__grid,
.footer-newsletter__inner,
.footer-bottom__inner {
  overflow: hidden;
}

/* Force wrap on all flex rows */
.hero__cta,
.cta-strip__inner,
.cta-strip__actions,
.footer-bottom__inner,
.footer-newsletter__inner {
  flex-wrap: wrap;
}

/* Tables */
table { width: 100%; overflow-x: auto; display: block; }

/* Long words/URLs */
p, li, h1, h2, h3, h4, h5, h6, a, span {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* =====================================================================
   PRINT
   ===================================================================== */
@media print {
  .topbar,
  .site-header,
  .floating-buttons,
  .site-loader,
  .hamburger,
  .mobile-nav,
  .mobile-nav__overlay,
  .footer-newsletter,
  .cta-strip { display: none !important; }

  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .container { max-width: 100%; }
}
