/* =============================================================
   SOLARSHIELD — RESPONSIVE CSS
   responsive.css
   Media queries for all breakpoints
   ============================================================= */

/* ─────────────────────────────────────────────
   BREAKPOINTS
   1920 / 1600 / 1440 / 1366 / 1280 / 1024
   992 / 768 / 576 / 425 / 390 / 375 / 360 / 320
   ───────────────────────────────────────────── */

/* ─── ≤ 1600px ─── */
@media (max-width: 1600px) {
  :root {
    --section-px: 4rem;          /* pathways_v4: 3rem 4rem at medium (exact) */
  }
}

/* ─── ≤ 1440px ─── */
@media (max-width: 1440px) {
  :root {
    --section-px: 3rem;          /* pathways_v4: 3rem at tablet (exact) */
  }

  .cmp-showCase__title {
    letter-spacing: -2.8px;
  }

  .section-heading-red {
    font-size: var(--fs-section-title-md);  /* 2rem (exact) */
    letter-spacing: -0.1rem;               /* (exact) */
  }
}

/* ─── ≤ 1280px ─── */
@media (max-width: 1280px) {
  .navbar-menu {
    gap: 1.6rem;
  }

  .mega-menu-inner {
    gap: 2.5rem;
  }

  .why-solarshield-inner {
    gap: 3rem;
  }
}

/* ─── ≤ 1024px (Tablet Landscape) ─── */
@media (max-width: 1024px) {
  :root {
    --section-py: 3rem;
    --section-px: 1.25rem;        /* pathways_v4: 2rem 1.25rem mobile (exact) */
    --navbar-height: var(--navbar-height-mobile); /* 3.9375rem = 63px (exact) */
  }

  /* Hide desktop nav, show hamburger */
  .navbar-menu {
    display: none;
  }

  .navbar-hamburger {
    display: flex;
  }

  /* Hide Find a Dealer CTA on mobile navbar as requested, but keep it in the slider menu */
  #navFindDealer,
  .btn-solarshield-nav {
    display: none !important;
  }

  /* Hero */
  .hero-section {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--navbar-height));
  }
  
  .cmp-showCase {
    display: block;
    position: relative;
    padding: 0;
    min-height: 600px;
    height: auto; /* Allow height to grow based on content */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%); /* Slanted bottom edge upwards to right */
  }
  
  .cmp-teaser__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: auto;
    margin-left: 0;
    z-index: 1;
  }

  .cmp-teaser__image > div,
  .cmp-teaser__image picture,
  .cmp-teaser__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    clip-path: none;
    border-radius: 0;
  }

  /* Add gradient overlay so white text is readable over the image */
  .cmp-teaser__image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
  }
  
  .cmp-showCase__content {
    flex: none;
    position: relative; /* Changed to relative so content pushes the container height naturally */
    width: 100%;
    height: auto;
    background: transparent;
    margin: 0;
    padding: 6rem 1.5rem 8rem; /* 8rem bottom padding ensures content safely clears the slanted edge */
    border-radius: 0;
    box-shadow: none;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box; /* Fixes left cutoff caused by width 100% + padding */
    overflow: hidden; /* Ensure nothing breaks out of this block */
  }

  .cmp-showCase__content-wrap {
    text-align: left;
    align-items: flex-start;
  }

  .hero-content {
    padding: 0;
  }

  .cmp-showCase__title {
    letter-spacing: -2px;
    font-size: 35px; /* Fixed font size for mobile as requested */
    text-align: left;
    margin-bottom: 10px;
    background: transparent;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    line-height: 1.05;
  }

  .cmp-showCase__subheading {
    text-align: left;
    margin: 1rem 0 0 0;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }

  .cmp-teaser__action-container--carousel {
    justify-content: flex-start;
    width: auto;
    margin-top: 30px;
  }

  .solarshield-hero-btn {
    width: auto;
    padding: 0.5rem 2rem;
    font-size: 1rem;
    background: linear-gradient(90deg, var(--solarshield-blue), var(--solarshield-blue-dark)); /* Match theme color */
    box-shadow: 0 4px 15px rgba(0, 77, 119, 0.25);
    border-radius: 50px;
  }
  
  .solarshield-hero-btn:hover {
    background: linear-gradient(90deg, var(--solarshield-blue-dark), var(--solarshield-blue));
    transform: none;
  }

  .section-heading-red {
    font-size: var(--fs-section-title-md); /* 2rem (exact) */
  }

  /* Expertise — handled in style.css */

  /* Why SolarShield */
  .why-solarshield-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .why-solarshield-images {
    align-items: center;
    gap: 1rem;
  }

  .why-solarshield-images img {
    max-width: 220px; /* Decreased logo size for mobile */
    padding: 0;
  }

  .why-icons-row {
    max-width: 500px;
  }

  /* Products */
  .products-grid {
    gap: 1.5rem;
  }

  /* Promo */
  .promo-inner {
    gap: 2.5rem;
  }

  /* Footer */
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-logo-brand {
    grid-column: 1 / -1;
  }
}

/* ─── ≤ 992px ─── */
@media (max-width: 992px) {
  :root {
    --section-py: 2.5rem;
  }

  .navbar-solarshield {
    top: 0px !important;
    height: auto !important;
    padding: 0 !important;
  }
  
  .navbar-inner {
    height: auto !important;
    padding: 28px 20px 0px !important;
    align-items: center !important;
  }

  .navbar-logo, .navbar-hamburger {
    margin: 0 !important;
  }

  /* Hero — stack on mobile */
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-image-wrap {
    min-height: 320px;
    aspect-ratio: 16/9;
    order: -1; /* Image above text on mobile */
    display: none; /* Hide for simplicity on small tablets */
  }

  .hero-content {
    padding: 2rem var(--section-px);
  }

  .cmp-showCase__title {
    letter-spacing: -2px;
  }

  .section-heading-red {
    font-size: var(--fs-section-title-sm); /* 1.75rem (exact) */
    letter-spacing: -0.0625rem;            /* (exact) */
  }

  .hero-image-wrap::before {
    display: none;
  }

  /* Expertise — handled in style.css */

  /* Products — stack */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Feature list — single column */
  .feature-list {
    grid-template-columns: 1fr;
  }

  /* Promo — stack */
  .promo-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .promo-inner.image-right .promo-media { order: -1; }
  .promo-inner.image-right .promo-content { order: 1; }

  /* Arch products */
  .arch-products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Footer */
  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── ≤ 768px (Tablet Portrait) ─── */
@media (max-width: 768px) {
  :root {
    --section-py: 3rem;
    --navbar-height: 64px;
  }

  /* Hero */
  .hero-section {
    min-height: auto;
    padding-bottom: 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 2.5rem 1.5rem 2.5rem;
    gap: 1.25rem;
  }

  .hero-headline {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .hero-subtext {
    font-size: 0.95rem;
  }

  /* Why SolarShield icons */
  .why-icons-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  /* Product card */
  .product-card {
    padding: 1.5rem;
  }

  /* Promo */
  .promo-title {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  /* Why solarshield */
  .why-solarshield-title {
    font-size: clamp(2rem, 7vw, 50px);
  }

  /* Footer search */
  .footer-search-heading {
    font-size: 1.4rem;
  }

  /* Footer */
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* Cookie banner */
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }

  .cookie-banner-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
  }
}

/* ─── ≤ 576px ─── */
@media (max-width: 576px) {
  :root {
    --container-px-lg: 1.1rem;
    --section-py: 2.5rem;
    --card-padding: 1.25rem;
  }

  /* Hero */
  .hero-content {
    padding: 2rem 1.1rem;
  }

  .hero-headline {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .btn-solarshield {
    font-size: 0.75rem;
    padding: 0.7rem 1.3rem;
    height: 44px;
  }

  /* Mobile UI Refinements for Why SolarShield */
  /* Mobile UI Refinements for Why SolarShield */
  .why-solarshield-title {
    margin-bottom: 1.5rem;
  }

  .why-solarshield-body {
    line-height: 1.8;
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  /* Premium Partner Badges (Logos) */
  .why-solarshield-images {
    flex-direction: row !important;
    justify-content: space-evenly;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 10px 25px rgba(0, 0, 0, 0.04);
    margin-top: 1rem;
  }

  .why-solarshield-images img {
    max-width: 42% !important; /* Fit side-by-side */
    max-height: 45px;
    object-fit: contain;
    padding: 0 !important;
  }

  /* Why icons — 2 per row */
  .why-icons-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .why-icon-svg {
    width: 48px;
    height: 48px;
    font-size: 1.75rem;
  }

  .why-icon-label {
    font-size: 0.75rem;
  }

  /* Section headings and Card titles */
  .section-heading-red,
  .why-solarshield-title,
  .promo-title,
  .expertise-card__title,
  .product-card__title,
  .testimonial-heading {
    font-size: 1.75rem !important;
    font-weight: 400 !important;
  }

  /* Feature list single column */
  .feature-list {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  /* Expertise */
  .expertise-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .expertise-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  }

  /* Testimonials */
  .testimonial-section {
    padding: 0;
  }

  /* Footer */
  .footer-search-section {
    padding: 2.5rem 0 2rem;
  }

  .footer-search-input {
    height: 50px;
    font-size: 0.875rem;
  }

  /* Social icons */
  .social-link {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  /* Footer nav */
  .footer-main-grid {
    gap: 1.5rem;
  }

  /* Cookie */
  .cookie-banner {
    font-size: 0.8125rem;
  }
}

/* ─── ≤ 425px ─── */
@media (max-width: 425px) {
  :root {
    --container-px-lg: 1rem;
  }

  .hero-headline {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
  }

  .promo-title {
    /* overridden by 576px rule */
  }

  .product-card__title {
    /* overridden by 576px rule */
  }

  .product-card__desc {
    font-size: 0.875rem;
  }

  .feature-list li {
    font-size: 0.85rem;
  }

  .why-icons-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── ≤ 390px ─── */
@media (max-width: 390px) {
  .hero-headline {
    font-size: clamp(1.7rem, 8.5vw, 2.2rem);
  }

  .hero-subtext {
    font-size: 0.875rem;
  }

  .section-heading-red {
    font-size: clamp(1.5rem, 7.5vw, 2rem);
  }

  .navbar-logo img {
    height: 36px;
  }

  .btn-solarshield {
    font-size: 0.7rem;
    padding: 0.65rem 1.1rem;
    height: 40px;
  }

  .why-icon-svg {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
  }
}

/* ─── ≤ 375px ─── */
@media (max-width: 375px) {
  .cookie-btn {
    font-size: 0.75rem;
    padding: 0.5rem 0.6rem;
  }

  .footer-nav-heading {
    font-size: 0.8rem;
  }

  .footer-nav-link {
    font-size: 0.875rem;
  }
}

/* ─── ≤ 360px ─── */
@media (max-width: 360px) {
  :root {
    --container-px-lg: 0.875rem;
  }

  .hero-headline {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── ≤ 320px (Small Mobile) ─── */
@media (max-width: 320px) {
  :root {
    --container-px-lg: 0.75rem;
    --section-py: 2rem;
  }

  .hero-headline {
    font-size: 1.5rem;
  }

  .navbar-logo img {
    height: 30px;
  }

  .btn-solarshield-nav {
    display: none; /* Hide Find Dealer on very small screens */
  }

  .why-icons-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .why-icon-label {
    font-size: 0.65rem;
  }

  .product-card {
    padding: 1rem;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-btn {
    text-align: center;
  }
}

/* ─────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────── */

@media print {
  .navbar-solarshield,
  .cookie-banner,
  .scroll-top-btn,
  .mobile-drawer,
  .mobile-nav-overlay,
  .search-overlay {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
