/* ==========================================================================
   Ophelia Homes — Responsive Media Queries (single consolidated file)

   Strategy: MOBILE-FIRST, using min-width only, throughout the entire file.
   Base/mobile styles live in ../style.css. This file only ever ADDS
   overrides as the viewport grows.

   Each breakpoint appears EXACTLY ONCE in this file:

     768px   — tablet
     1024px  — tablet landscape / small desktop (typography + inline nav)
     1200px  — desktop
     1366px  — large desktop

   No max-width queries are used anywhere in this file.
   ========================================================================== */


/* ========================================
   768px BREAKPOINT
   ======================================== */

@media (min-width: 768px) {

  /* ---------- GLOBAL — SECTION SPACING ---------- */

  section {
    padding: 2rem 3rem;
  }

  .topbar,
  .site-header,
  .site-footer {
    padding: 1rem 3rem;
  }

  /* ---------- GLOBAL — TOP BAR ---------- */

  .topbar-inner {
    justify-content:flex-start;
    flex-wrap: wrap;
    gap: 10px 24px;
  }

  .topbar-inner span.topbar-item {
    display: flex;
  }

  /* ---------- GLOBAL — HERO (shared by every page) ---------- */

  .hero-container {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .hero-content {
    flex: 1 1 50%;
    min-width: 0;
  }

  .hero-container::after {
    flex: 1 1 46%;
    min-width: 0;
    aspect-ratio: 1 / 1;
  }

  /* ---------- GLOBAL — FOOTER ---------- */

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  /* ---------- GLOBAL — OUR PROCESS SECTION (shared: Home + Services) ---------- */

  .step-badge {
    width: 78px;
    height: 78px;
  }

  .step-icon svg {
    width: 30px;
    height: 30px;
  }

  /* ---------- GLOBAL — CONTACT CTA SECTION (shared: Home + About) ---------- */

  .contact-items {
    flex-direction: row;
  }

  .contact-item {
    flex: 1;
    padding: 4px 24px;
    text-align: center;
  }

  .contact-icon {
    margin-inline: auto;
  }

  .contact-item:not(:first-child) {
    border-top: none;
    border-left: 1px solid var(--color-border-dark);
  }

  /* ---------- GLOBAL — ABOUT STATS SECTION (shared: About + Projects + Why Choose Us) ---------- */

  .aboutstat {
    padding: 20px 26px;
    gap: 18px;
  }

  .aboutstat-icon svg {
    width: 46px;
    height: 46px;
  }

  .aboutstat-number {
    font-size: 30px;
  }

  /* ---------- HOME PAGE — WHAT WE BUILD SECTION ---------- */

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-item {
    padding: 32px 22px;
  }

  .service-item:not(:first-child) {
    border-top: none;
  }

  .service-item:not(:nth-child(3n+1)) {
    border-left: 1px solid var(--color-border);
  }

  .service-item:nth-child(n+4) {
    border-top: 1px solid var(--color-border);
  }

  /* ---------- HOME PAGE — OUR PROJECTS SECTION ---------- */

  .projects-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .project-card {
    flex: 0 0 46%;
  }

  /* ---------- HOME PAGE — WHY CHOOSE US SECTION (home preview grid) ---------- */

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

  .why-item {
    padding: 28px 26px;
  }

  .why-item:not(:first-child) {
    border-top: none;
  }

  .why-item:not(:nth-child(2n+1)) {
    border-left: 1px solid var(--color-border);
  }

  .why-item:nth-child(n+3) {
    border-top: 1px solid var(--color-border);
  }

  /* ---------- HOME PAGE — STATS SECTION ---------- */

  .stats-frame {
    padding: 36px 30px;
  }

  .stat-number {
    font-size: 42px;
  }

  /* ---------- ABOUT PAGE — INTRO SECTION ---------- */

  .about-container {
    flex-direction: row;
    align-items: flex-start;
    gap: 48px;
  }

  .about-media {
    flex: 1 1 48%;
    min-width: 0;
    aspect-ratio: 1 / 1;
  }

  .about-content {
    flex: 1 1 52%;
    min-width: 0;
  }

  /* ---------- ABOUT PAGE — VALUES SECTION ---------- */

  .values-frame {
    padding: 50px 40px;
  }

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

  .value-item {
    padding: 32px 22px;
  }

  .value-item:not(:first-child) {
    border-top: none;
  }

  .value-item:not(:nth-child(3n+1)) {
    border-left: 1px solid var(--color-border);
  }

  .value-item:nth-child(n+4) {
    border-top: 1px solid var(--color-border);
  }

  /* ---------- ABOUT PAGE — PROMISE SECTION ---------- */

  .promise-container {
    flex-direction: row;
    align-items: stretch;
  }

  .promise-content {
    flex: 0 0 42%;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .promise-media {
    flex: 1;
    aspect-ratio: auto;
  }

  /* ---------- SERVICES PAGE — OFFER SECTION (What We Offer grid) ---------- */

  .offer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
  }

  /* ---------- SERVICES PAGE — PROJECT CTA SECTION ---------- */

  .cta-container {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .cta-content {
    flex: 0 0 46%;
    padding: 0 0 0 32px;
  }

  .cta-media {
    flex: 1;
    aspect-ratio: auto;
    height: 340px;
  }

  /* ---------- PROJECTS PAGE — PROJECTS GRID & FILTER SECTION ---------- */
  /*
  .projects-filter {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .filter-btn {
    align-self: auto;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  */

  /* ---------- PROJECTS PAGE — CONSTRUCTION PROGRESS SECTION ---------- */

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

  /* ---------- PROJECTS PAGE — PROJECT VIDEO GALLERY SECTION ---------- */

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

  /* ---------- WHY CHOOSE US PAGE — KEY REASONS SECTION ---------- */

  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }

  /* ---------- WHY CHOOSE US PAGE — STAND OUT SECTION ---------- */

  .standout-media {
    aspect-ratio: 16 / 10;
  }

  /* ---------- CONTACT PAGE — CONTACT PAGE SECTION ---------- */

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

}


/* ========================================
   1024px BREAKPOINT
   ======================================== */

@media (min-width: 1024px) {

  /* ---------- GLOBAL — TYPOGRAPHY ---------- */

  p,
  li,
  span,
  a,
  button {
    font-size: 16px;
  }

  h2 {
    font-size: 34px;
  }

  /* ---------- GLOBAL — OUR PROCESS SECTION (shared: Home + Services) ---------- */

  .process-steps {
    position: relative;
    z-index: 1;
    flex: 1;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }

  .process-steps::before {
    content: '';
    position: absolute;
    top: 43px;
    bottom: 0;
    width: 100%;
    border-top: 2px dotted var(--color-gold);
    opacity: 0.5;
    z-index: 0;
  }

  /* ---------- GLOBAL — HEADER & NAVIGATION ---------- */

  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    transform: none;
    transition: none;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 26px;
  }

  .main-nav a {
    position: relative;
    padding-bottom: 4px;
  }

  .main-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--color-gold);
  }

  .header-cta {
    display: inline-flex;
    padding: 11px 20px;
  }

}


/* ========================================
   1200px BREAKPOINT
   ======================================== */

@media (min-width: 1200px) {

  /* ---------- GLOBAL — TOP BAR ---------- */

  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
  }

  /* ---------- GLOBAL — HEADER & NAVIGATION ---------- */

  :root {
    --header-height: 88px;
  }

  .logo-img {
    height: 120px;
  }

  .main-nav ul {
    gap: 36px;
  }

  .header-cta {
    padding: 13px 24px;
  }

  /* ---------- GLOBAL — HERO (shared by every page) ---------- */

  .hero-wrap {
    overflow: visible;
  }

  .hero {
    padding-top: 17rem;
  }

  .site-header.transparent-header {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    width: auto;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
  }

  .hero-container {
    gap: 0;
    align-items: center;
  }

  .hero-content {
    position: relative;
    flex: 0 0 46%;
    padding-right: 40px;
    z-index: 2;
  }

  .hero-heading {
    font-size: 54px;
  }

  .hero-container::after {
    position: absolute;
    top: 225px;
    bottom: 0;
    right: 0;
    left: auto;
    width: 57%;
    height: auto;
    flex: none;
    margin-left: 0;
    aspect-ratio: auto;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 20%, #000 42%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 20%, #000 42%);
  }

  /* ---------- GLOBAL — OUR PROCESS SECTION (shared: Home + Services) ---------- */

  #process .process-container {
    flex-direction: row;
    align-items: center;
    gap: 50px;
  }

  .process-content {
    flex: 0 0 300px;
  }

  .process-steps::before {
    content: '';
    position: absolute;
    top: 50px;
    bottom: auto;
    left: 10%;
    right: 10%;
    width: auto;
    height: 0;
    border-left: none;
    border-top: 2px dotted var(--color-gold);
    opacity: 0.5;
    z-index: 0;
  }

  .process-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    flex: 1;
    padding-inline: 6px;
  }

  .step-badge {
    width: 100px;
    height: 100px;
    margin-bottom: 18px;
  }

  .step-icon svg {
    width: 45px;
    height: 45px;
  }

  .process-step p {
    max-width: 20ch;
  }

  /* ---------- GLOBAL — TESTIMONIALS SECTION (shared: Home + Projects + Why Choose Us) ---------- */

  .testimonial-track {
    flex-direction: row;
    align-items: center;
    gap: 32px;
    width: 90%;
    margin: 0 auto;
  }

  .testimonial-slide {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .quote-mark {
    font-size: 119px;
  }

  .testimonial-text {
    flex: 1 1 auto;
    max-width: 560px;
    min-width: 0;
    line-height: 1.6;
  }

  .testimonial-author {
    flex: 0 0 393px;
  }

  .author-avatar {
    width: 90px;
    height: 90px;
  }

  .author-info h3 {
    font-size: 18px;
  }

  /* ---------- GLOBAL — CONTACT CTA SECTION (shared: Home + About) ---------- */

  .contact-cta-container {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .contact-content {
    flex: 0 0 480px;
  }

  .contact-items {
    flex: 1;
  }

  .contact-item {
    padding: 4px 30px;
  }

  /* ---------- GLOBAL — ABOUT STATS SECTION (shared: About + Projects + Why Choose Us) ---------- */

  .aboutstats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .aboutstat {
    padding: 6px 28px;
  }

  .aboutstat:not(:first-child) {
    border-top: none;
    border-left: 1px solid var(--color-border-dark);
  }

  .aboutstat-icon svg {
    width: 64px;
    height: 64px;
  }

  .aboutstat-number {
    font-size: 70px;
  }

  /* ---------- HOME PAGE — WHAT WE BUILD SECTION ---------- */

  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .service-item {
    padding: 8px 14px;
  }

  .service-icon {
    width: 75px;
    height: 75px;
  }

  .service-item:not(:first-child) {
    border-top: none;
    border-left: 1px solid var(--color-border);
  }

  /* ---------- HOME PAGE — OUR PROJECTS SECTION ---------- */

  .project-card {
    flex: 0 0 calc((100% - 60px) / 4);
  }

  .project-info h3 {
    font-size: 20px;
  }

  /* ---------- HOME PAGE — WHY CHOOSE US SECTION (home preview grid) ---------- */

  .why-us .section-head {
    max-width: 760px;
  }

  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-item {
    padding: 8px 26px;
    gap: 20px;
  }

  .why-icon {
    width: 80px;
    height: 80px;
  }

  .why-icon svg {
    width: 50px;
    height: 50px;
  }

  .why-item:not(:first-child) {
    border-top: none;
    border-left: 1px solid var(--color-border);
  }

  /* ---------- HOME PAGE — STATS SECTION ---------- */

  .stats-frame {
    padding: 44px 40px;
  }

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

  .stat-item:not(:first-child) {
    border-top: none;
    border-left: 1.5px solid rgba(255, 255, 255, 0.4);
  }

  .stat-number {
    font-size: 70px;
  }

  /* ---------- ABOUT PAGE — INTRO SECTION ---------- */

  .about-container {
    gap: 70px;
  }

  .about-media {
    aspect-ratio: 4 / 3;
  }

  /* ---------- ABOUT PAGE — VALUES SECTION ---------- */

  .values-frame {
    padding: 56px 50px;
  }

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

  .value-item {
    padding: 6px 20px;
  }

  .value-item:not(:first-child) {
    border-top: none;
    border-left: 1px solid var(--color-border);
  }

  /* ---------- ABOUT PAGE — PROMISE SECTION ---------- */

  .promise-content {
    flex: 0 0 38%;
    padding: 60px 60px;
  }

  /* ---------- SERVICES PAGE — OFFER SECTION ---------- */

  .offer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 36px;
  }

  /* ---------- SERVICES PAGE — PROJECT CTA SECTION ---------- */

  .cta {
    min-height: 340px;
  }

  .cta-container {
    height: 100%;
    min-height: 340px;
    align-items: center;
  }

  .cta-content {
    flex: 0 0 44%;
    padding: 0 0 0 60px;
    z-index: 2;
  }

  .cta-media {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 58%;
    height: auto;
    aspect-ratio: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 20%, #000 42%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 20%, #000 42%);
  }

  /* ---------- PROJECTS PAGE — PROJECTS GRID & FILTER SECTION ---------- */
  /*
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .projectgrid-tag {
    font-size: 20px;
  }
  */

  /* ---------- PROJECTS PAGE — CONSTRUCTION PROGRESS SECTION ---------- */

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

  /* ---------- PROJECTS PAGE — PROJECT VIDEO GALLERY SECTION ---------- */

  .projectvideos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* ---------- WHY CHOOSE US PAGE — KEY REASONS SECTION ---------- */

  .reasons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }

  .reason-icon svg {
    width: 55px;
    height: 55px;
  }

  /* ---------- WHY CHOOSE US PAGE — STAND OUT SECTION ---------- */

  .standout-container {
    flex-direction: row;
    align-items: center;
    gap: 60px;
  }

  .standout-media {
    flex: 0 0 48%;
    aspect-ratio: 4 / 3;
  }

  .standout-content {
    flex: 1;
  }

  /* ---------- CONTACT PAGE — CONTACT PAGE SECTION ---------- */

  .contactpage-container {
    flex-direction: row;
    align-items: flex-start;
    gap: 50px;
  }

  .contactinfo-list {
    flex: 0 0 34%;
  }

  .contactform-wrap {
    flex: 1;
    padding: 42px 40px;
  }

}


/* ========================================
   1366px BREAKPOINT
   ======================================== */

@media (min-width: 1366px) {

  /* ---------- GLOBAL — SECTION SPACING ---------- */
  /* Large screens: .container handles content width, so sections
     drop their left/right padding entirely. */

  section {
    padding: 4rem 0;
  }

  .topbar,
  .site-header,
  .site-footer {
    padding: 1rem 0;
  }

  /* ---------- GLOBAL — TOP BAR ---------- */

  .topbar-item span {
    font-size: 16px;
  }

  .topbar-item svg {
    width: 25px;
    height: 25px;
  }

  /* ---------- GLOBAL — FOOTER ---------- */

  .footer-inner .logo-img {
    height: 60px;
  }

}
