/* ============================================================
   CCTV Secure Pro — Responsive Stylesheet
   Mobile-first breakpoints: 1400 / 1200 / 992 / 768 / 640 / 480
   ============================================================ */

/* ============================================================
   1400px — Large Desktop
   ============================================================ */
@media (max-width: 1400px) {
  .container { max-width: 1180px; }
  .hero-slide__title { font-size: clamp(34px, 4vw, 54px); }
  .footer-grid { gap: 32px; }
}

/* ============================================================
   1200px — Small Desktop / Large Laptop
   ============================================================ */
@media (max-width: 1200px) {
  .container { max-width: 1000px; padding: 0 20px; }

  /* Header */
  .main-nav__menu { gap: 20px; }
  .main-nav__menu li a { font-size: 14px; }
  .header-cta { padding: 12px 22px; font-size: 14px; }

  /* Hero */
  .hero-section { padding: 110px 0 90px; }
  .hero-slide__grid { gap: 40px; }
  .hero-slide__icons { gap: 24px; }
  .hero-arrow--prev { left: 16px; }
  .hero-arrow--next { right: 16px; }

  /* Layout */
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .step::after { display: none; }

  /* Grids */
  .grid { gap: 24px; }

  /* Sections */
  .section { padding: 88px 0; }
  .section-head { margin-bottom: 56px; }
}

/* ============================================================
   992px — Tablet Landscape
   ============================================================ */
@media (max-width: 992px) {

  /* Container */
  .container { padding: 0 20px; }

  /* ---------- HEADER & MOBILE NAV ---------- */
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 320px;
    max-width: 85vw;
    background: var(--csp-navy);
    padding: 100px 30px 40px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 998;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav__menu {
    flex-direction: column;
    gap: 4px;
  }
  .main-nav__menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .main-nav__menu li a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    color: #fff;
  }
  .main-nav__menu li a::after { display: none; }
  .main-nav__menu li a:hover {
    color: var(--csp-accent);
    padding-left: 8px;
  }

  .menu-toggle { display: flex; z-index: 1000; position: relative; }
  .menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.is-active span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ---------- HERO ---------- */
  .hero-section {
    padding: 100px 0 70px;
    min-height: auto;
    display: block;
  }
  .hero-slider { min-height: auto; }
  .hero-slide { position: relative; inset: auto; }
  .hero-slide:not(.is-active) { display: none; }
  .hero-slide__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-slide__icons { justify-content: center; }
  .hero-slide__text {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .hero-slide__ctas { justify-content: center; }
  .hero-slide__visual { order: -1; }
  .hero-slide__img { max-width: 480px; }
  .hero-arrow { display: none; }
  .hero-dots { bottom: 20px; }
  .hero-circle--1 { width: 400px; height: 400px; }
  .hero-circle--2 { width: 280px; height: 280px; }
  .hero-circle--3 { width: 160px; height: 160px; }

  /* ---------- LAYOUT ---------- */
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* ---------- GRIDS ---------- */
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }

  /* ---------- SECTIONS ---------- */
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 48px; }
  .section-head h2 { font-size: clamp(26px, 5vw, 36px); }
  .section-head p { font-size: 16px; }
}

/* ============================================================
   768px — Tablet Portrait
   ============================================================ */
@media (max-width: 768px) {

  /* Container */
  .container { padding: 0 18px; }

  /* Header */
  .header-cta { display: none; }
  .site-main { padding-top: 80px; }
  .site-header { padding: 14px 0; }
  .custom-logo { max-height: 40px; }
  .site-branding__text { font-size: 18px; }
  .site-branding__text .brand-icon { font-size: 20px; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; gap: 14px; }
  .contact-form { padding: 28px 22px; }
  .contact-info { padding: 28px 22px; }

  /* Layout */
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-bottom__inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .footer-legal { justify-content: center; flex-wrap: wrap; }

  /* Cards */
  .card__body { padding: 20px; }
  .package-card { padding: 28px 24px; }
  .feature-box { padding: 26px 22px; }

  /* Sections */
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head h2 { font-size: clamp(24px, 6vw, 32px); }
  .section-head p { font-size: 15px; }

  /* CTA Banner */
  .cta-banner { padding: 56px 0; }
  .cta-banner h2 { font-size: clamp(22px, 6vw, 32px); }
  .cta-banner p { font-size: 16px; }
  .cta-banner__actions {
    width: 100%;
    justify-content: center;
  }

  /* Hero */
  .hero-section { padding: 90px 0 60px; }
  .hero-slide__title { font-size: clamp(28px, 7vw, 42px); }
  .hero-slide__img { max-width: 420px; }
}

/* ============================================================
   640px — Large Mobile
   ============================================================ */
@media (max-width: 640px) {

  /* Container */
  .container { padding: 0 16px; }

  /* ---------- HERO ---------- */
  .hero-section { padding: 80px 0 60px; }
  .hero-slide__grid { gap: 32px; }
  .hero-slide__title {
    font-size: clamp(24px, 8vw, 36px);
    margin-bottom: 20px;
  }
  .hero-slide__eyebrow {
    padding: 5px 14px;
    font-size: 10px;
    margin-bottom: 14px;
  }
  .hero-slide__icons {
    gap: 14px;
    margin-bottom: 20px;
  }
  .hero-slide__icon-badge {
    width: 52px;
    height: 52px;
    font-size: 20px;
    border-radius: 14px;
  }
  .hero-slide__icon-label { font-size: 10px; }
  .hero-slide__text {
    font-size: 14px;
    margin-bottom: 22px;
    line-height: 1.6;
  }
  .hero-slide__ctas {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    padding-bottom: 0;
  }
  .hero-slide__ctas .btn,
  .hero-slide__ctas .btn--hero-primary,
  .hero-slide__ctas .btn--hero-outline {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 13px;
  }
  .hero-slide__img { max-width: 100%; }
  .hero-dots { bottom: 14px; gap: 10px; }
  .hero-dot { width: 10px; height: 10px; }
  .hero-dot.is-active { width: 26px; }

  /* ---------- HEADER ---------- */
  .site-header { padding: 12px 0; }
  .custom-logo { max-height: 36px; }
  .site-branding__text { font-size: 16px; gap: 8px; }
  .main-nav { width: 280px; max-width: 90vw; }

  /* ---------- GRIDS ---------- */
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; gap: 20px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; }

  /* ---------- CARDS ---------- */
  .card__body { padding: 20px; }
  .card__body h3 { font-size: 17px; }
  .card__body p { font-size: 14px; }

  /* ---------- SECTIONS ---------- */
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: clamp(22px, 6vw, 30px); }
  .section-head p { font-size: 15px; }

  /* ---------- BUTTONS ---------- */
  .btn {
    padding: 14px 26px;
    font-size: 14px;
  }

  /* ---------- GALLERY FILTERS ---------- */
  .gallery-filters {
    gap: 8px;
    margin-bottom: 24px;
  }
  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* ---------- TESTIMONIALS ---------- */
  .testimonial { padding: 24px 20px; }
  .testimonial__quote { font-size: 14px; }

  /* ---------- FAQ ---------- */
  .faq-item { padding: 16px 20px; }
  .faq-item__q { font-size: 15px; }
  .faq-item__a { font-size: 14px; }

  /* ---------- CTA BANNER ---------- */
  .cta-banner { padding: 48px 0; }
  .cta-banner__actions {
    flex-direction: column;
    width: 100%;
  }
  .cta-banner__actions .btn { width: 100%; }

  /* ---------- CONTACT ---------- */
  .contact-form,
  .contact-info { padding: 24px 20px; }

  /* ---------- FOOTER ---------- */
  .site-footer { padding-top: 56px; }
  .footer-bottom { padding: 18px 0; font-size: 13px; }
  .footer-social a {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
}

/* ============================================================
   480px — Small Mobile
   ============================================================ */
@media (max-width: 480px) {

  /* Container */
  .container { padding: 0 14px; }

  /* ---------- HERO ---------- */
  .hero-section { padding: 76px 0 56px; }
  .hero-slide__title {
    font-size: clamp(22px, 8.5vw, 32px);
    letter-spacing: -0.5px;
  }
  .hero-slide__title-line2 { letter-spacing: 1px; }
  .hero-slide__icons {
    gap: 10px;
    justify-content: space-between;
  }
  .hero-slide__icons li { min-width: 60px; }
  .hero-slide__icon-badge {
    width: 46px;
    height: 46px;
    font-size: 18px;
    border-radius: 12px;
  }
  .hero-slide__icon-label { font-size: 9px; letter-spacing: 0; }
  .hero-slide__text { font-size: 13px; }
  .hero-circle--1 { width: 300px; height: 300px; }
  .hero-circle--2 { width: 200px; height: 200px; }
  .hero-circle--3 { display: none; }

  /* ---------- HEADER ---------- */
  .site-header { padding: 10px 0; }
  .custom-logo { max-height: 32px; }
  .site-branding__text { font-size: 15px; }
  .main-nav { width: 260px; padding: 90px 22px 30px; }

  /* ---------- SECTIONS ---------- */
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: clamp(20px, 7vw, 28px); }
  .section-head .eyebrow { font-size: 11px; padding: 5px 14px; }

  /* ---------- CARDS ---------- */
  .card__body { padding: 18px; }
  .card__body h3 { font-size: 16px; margin-bottom: 8px; }
  .card__body p { font-size: 13px; }
  .card__icon {
    width: 54px;
    height: 54px;
    font-size: 22px;
    margin: 20px 20px 0;
  }

  /* ---------- FEATURE BOX ---------- */
  .feature-box { padding: 22px 18px; }
  .feature-box__icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
    margin-bottom: 14px;
  }
  .feature-box h3 { font-size: 16px; }
  .feature-box p { font-size: 13px; }

  /* ---------- PACKAGES ---------- */
  .package-card { padding: 24px 20px; }
  .package-card h3 { font-size: 19px; }
  .package-card__list li { font-size: 14px; padding: 10px 0; }

  /* ---------- STEPS ---------- */
  .step { padding: 24px 18px; }
  .step__num { font-size: 26px; }
  .step h3 { font-size: 15px; }
  .step p { font-size: 13px; }

  /* ---------- CONTACT ---------- */
  .contact-form,
  .contact-info { padding: 22px 18px; }
  .contact-form label { font-size: 13px; }
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    padding: 11px 12px;
    font-size: 14px;
  }
  .contact-map iframe { height: 180px; }

  /* ---------- CTA BANNER ---------- */
  .cta-banner { padding: 42px 0; }
  .cta-banner h2 { font-size: clamp(20px, 7vw, 26px); }
  .cta-banner p { font-size: 14px; }

  /* ---------- FOOTER ---------- */
  .site-footer { padding-top: 48px; }
  .footer-menu,
  .footer-contact { font-size: 13px; }
  .footer-bottom { padding: 16px 0; font-size: 12px; }

  /* ---------- TESTIMONIALS ---------- */
  .testimonial { padding: 20px 18px; }
  .testimonial__stars { font-size: 16px; }
  .testimonial__quote { font-size: 13px; }
  .testimonial__avatar img,
  .testimonial__avatar--initial {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  /* ---------- FAQ ---------- */
  .faq-item { padding: 14px 18px; margin-bottom: 10px; }
  .faq-item__q { font-size: 14px; gap: 12px; }
  .faq-item__a { font-size: 13px; padding-top: 12px; }

  /* ---------- AREAS ---------- */
  .area-chip {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* ============================================================
   360px — Extra Small Mobile (iPhone SE etc.)
   ============================================================ */
@media (max-width: 360px) {
  .container { padding: 0 12px; }

  .hero-slide__title { font-size: 22px; }
  .hero-slide__icon-badge {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  .hero-slide__icon-label { font-size: 8px; }
  .hero-slide__text { font-size: 12px; }

  .section { padding: 40px 0; }
  .section-head h2 { font-size: 20px; }

  .btn { padding: 12px 20px; font-size: 13px; }

  .site-branding__text { font-size: 14px; }
  .custom-logo { max-height: 28px; }

  .contact-form,
  .contact-info { padding: 18px 14px; }

  .footer-menu,
  .footer-contact { font-size: 12px; }
}

/* ============================================================
   Landscape Phones (short height)
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 80px 0 50px;
  }
  .hero-slide__title { font-size: 28px; }
  .hero-slide__icons { margin-bottom: 16px; }
  .hero-slide__text { margin-bottom: 18px; }
  .main-nav {
    padding: 80px 24px 24px;
  }
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
  .site-header,
  .hero-arrow,
  .hero-dots,
  .cta-banner,
  .footer-social,
  .menu-toggle,
  .csp-scroll-progress,
  .csp-particles {
    display: none !important;
  }
  .site-main { padding-top: 0; }
  .hero-section {
    background: #fff !important;
    color: #000 !important;
    min-height: auto;
    padding: 20px 0;
  }
  .hero-slide { position: relative !important; opacity: 1 !important; visibility: visible !important; }
  .hero-slide:not(.is-active) { display: block !important; }
}

/* ============================================================
   Dark Mode (optional — respects OS preference)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  /* Theme is already dark by default, so no changes needed.
     If you later add a light-mode theme, uncomment below. */
  /*
  body { background: #0a1628; color: #fff; }
  .card { background: #132640; border-color: #1e3558; }
  */
}