/* Per-page overrides for pages/web_design.html
   Purpose: ensure header gradient is full-bleed and logo/company name scale nicely
   at tablet and mobile breakpoints. These mirror the pattern used for workflow.
*/

/* Keep rules scoped and specific to avoid touching global styles unintentionally */
@media (min-width: 481px) and (max-width: 1400px) {
  body header { position: relative !important; }

  /* Full-bleed gradient via pseudo-element so inner .header-container can remain centered */
  body header::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(to right, #00a79d 0%, #639 100%) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  body header .header-container { position: relative !important; z-index: 1 !important; }

  /* Keep branding readable and on one line where possible */
  .logo-text { font-size: clamp(1.05rem, 2.4vw, 1.65rem) !important; white-space: nowrap !important; line-height: 1.05 !important; }
  /* Responsive image sizing for the logo image */
  .logo img { height: 56px !important; width: auto !important; display: block !important; max-width: none !important; }
}

/* Small screens: tighten spacing and scale logo & text down further */
@media (max-width: 480px) {
  body header::before { background-size: 100% 100% !important; }
  .logo img { height: 44px !important; }
  .logo-text { font-size: clamp(0.95rem, 4.2vw, 1.2rem) !important; white-space: nowrap !important; }
  .mobile-toggle { position: relative !important; z-index: 3 !important; }
}

/* Mobile nav behavior: match workflow implementation (max-height, opacity, staggered items) */
@media (max-width: 768px) {
  nav {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    padding: 0 2rem !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transition: max-height 0.36s ease, opacity 0.28s ease, padding 0.28s ease, transform 0.28s ease !important;
    z-index: 200 !important;
  }

  nav.active { max-height: 80vh !important; padding: 1.5rem 2rem !important; opacity: 1 !important; pointer-events: auto !important; transform: translateY(0) !important; }

  nav ul li { opacity: 0 !important; transform: translateY(-6px) !important; transition: opacity 0.28s ease, transform 0.28s ease !important; }

  nav.active ul li:nth-child(1) { transition-delay: 0.06s; opacity: 1 !important; transform: translateY(0) !important; }
  nav.active ul li:nth-child(2) { transition-delay: 0.12s; opacity: 1 !important; transform: translateY(0) !important; }
  nav.active ul li:nth-child(3) { transition-delay: 0.18s; opacity: 1 !important; transform: translateY(0) !important; }
  nav.active ul li:nth-child(4) { transition-delay: 0.24s; opacity: 1 !important; transform: translateY(0) !important; }
  nav.active ul li:nth-child(5) { transition-delay: 0.30s; opacity: 1 !important; transform: translateY(0) !important; }
  nav.active ul li:nth-child(6) { transition-delay: 0.36s; opacity: 1 !important; transform: translateY(0) !important; }

  /* Dropdown panel behavior inside mobile nav */
  nav ul li .dropdown-menu {
    position: relative !important; top: auto !important; left: auto !important; min-width: 100% !important; background: #fff !important; box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important; border-radius: 8px !important; padding: 0 !important; margin-top: 0.5rem !important; opacity: 0 !important; max-height: 0 !important; overflow: hidden !important; transform: translateY(-8px) !important; transition: opacity 0.28s ease, transform 0.28s ease, max-height 0.36s ease !important; pointer-events: none !important;
  }

  /* Ensure link text is visible on white mobile nav: dark color with primary hover */
  nav a {
    color: #222 !important;
    text-decoration: none !important;
  }

  nav a:hover,
  nav a:focus {
    color: var(--primary) !important;
    text-decoration: underline !important;
  }

  nav ul li.dropdown.open .dropdown-menu,
  nav ul li.dropdown:focus-within .dropdown-menu,
  nav ul li.dropdown:hover .dropdown-menu {
    opacity: 1 !important; transform: translateY(0) !important; max-height: 420px !important; pointer-events: auto !important;
  }
}

/* Use global header spacing from site-header-overrides for consistent height across pages */
/* (Removed page-specific header/nav padding overrides) */

/* Align header layout with site-wide container width so brand hugs left consistently */
.page-web-design header .container.header-container {
  width: 80% !important; /* match base styles.css */
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Hero: use float-based wrap so whole paragraphs flow around the sign */
.swing-wrapper { display: block; }
.swing-wrapper .swing-sign {
  float: left;
  /* Larger height to roughly double previous size while preserving aspect ratio */
  height: clamp(260px, 32vh, 380px);
  width: auto;
  margin: 0 1.4rem 1.1rem 0;
}
.swing-wrapper .swing-text { display: block; }
.swing-wrapper .swing-text .hero-paragraph { margin-top: 0; }

/* Stack on small screens */
@media (max-width: 700px) {
  .swing-wrapper .swing-sign {
    float: none;
    margin: 0 auto 1rem;
    display: block;
    height: clamp(200px, 52vw, 300px);
    width: auto;
  }
}

/* Optional helper to keep a few words together */
.nobr { white-space: nowrap; }

/* Wide screens: allow larger sign while keeping float wrap */
@media (min-width: 1200px) {
  .swing-wrapper .swing-sign { height: clamp(300px, 28vh, 420px); width: auto; }
}

/* ==============================
   Page-scoped fluid typography
   ============================== */

.page-web-design {
  /* baseline fluid scale variables */
  --step--1: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --step-0: clamp(1rem, 0.94rem + 0.4vw, 1.125rem);   /* body text */
  --step-1: clamp(1.125rem, 1.02rem + 0.8vw, 1.35rem); /* small subheads */
  --step-2: clamp(1.35rem, 1.12rem + 1.4vw, 1.75rem);  /* h3 */
  --step-3: clamp(1.6rem, 1.22rem + 2.2vw, 2.2rem);    /* h2 */
  --step-4: clamp(2rem, 1.4rem + 3.5vw, 2.8rem);       /* h1 */
}

.page-web-design p,
.page-web-design li { font-size: var(--step-0); line-height: 1.6; }

.page-web-design h5 { font-size: var(--step-1); }
.page-web-design h4 { font-size: var(--step-2); }
.page-web-design h3 { font-size: var(--step-2); }
.page-web-design h2 { font-size: var(--step-3); }
.page-web-design h1 { font-size: var(--step-4); }

/* Tune the hero and section titles to the fluid scale */
.page-web-design .main-title-smaller,
.page-web-design .main-title-smaller2,
.page-web-design #main-title.main-title-smaller,
.page-web-design #main-title.main-title-small,
.page-web-design h2.main-title-smaller,
.page-web-design h2.main-title-smaller2 {
  font-size: var(--step-3) !important;
}

.page-web-design h3.main-title-smallest { font-size: var(--step-1) !important; }

/* Hero paragraphs align to body scale; slightly larger for readability */
.page-web-design .hero-paragraph { font-size: clamp(var(--step-0), 0.95rem + 0.5vw, 1.25rem); }

/* On ultra-wide screens, let headings step up a notch to match the sign growth */
@media (min-width: 1400px) {
  .page-web-design { --step-3: clamp(1.8rem, 1.1rem + 2.6vw, 2.5rem); --step-4: clamp(2.2rem, 1.4rem + 4vw, 3.2rem); }
}
