/* ================================
   Surveillance Page (surveillance.css)
   This file assumes your global styles.css
   already provides base layout, header, buttons, etc.
================================ */

/* ===== HERO (video background) ===== */
.banner.banner--cctv {
  height: 64vh;
  margin-bottom: 0;
}
.banner.banner--cctv::after {          /* darken video for legibility */
  background: rgba(0,0,0,.40);
}
.banner.banner--cctv .banner-content {
  align-items: flex-start;
  padding-top: 120px;                   /* room below fixed header */
}
.banner.banner--cctv h1 {
  max-width: 900px;
}
.banner.banner--cctv .hero-sub {
  max-width: 760px;
  margin-top: 10px;
  line-height: 1.75;
  color: #f3f4f6;
  opacity: .95;
}

/* Section color helpers */
.section--white { background: #fff; }
.section--gradient { 
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

/* Heading container styling */
.heading-container {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fff7ed 100%);
  border-radius: 16px;
  padding: 32px 40px;
  margin-bottom: 50px;
  margin-top: 30px;
  box-shadow: 0 4px 16px rgba(255, 122, 0, 0.12);
  border: 2px solid #fed7aa;
  position: relative;
}

.heading-container .section-heading {
  margin-bottom: 16px;
  background: transparent;
  box-shadow: none;
}

.section-subtitle {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4b5563;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Fade-in animations from bottom to top */
.animate-init {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-init.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CCTV Feature Grid ===== */
.cctv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .cctv-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .cctv-card {
    padding: 20px;
  }
  
  .cctv-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }
  
  .cctv-card p {
    font-size: 1rem;
    line-height: 1.7;
  }
}
.cctv-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cctv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff7a00, #ff9900);
}

.cctv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(255, 122, 0, 0.15);
  border-color: #ff7a00;
}

.cctv-card h3 { 
  margin-bottom: 12px; 
  color: #111827;
  font-size: 1.3rem;
}
.cctv-card p  { 
  color: #4b5563; 
  line-height: 1.8;
  font-size: 1.05rem;
}

/* ===== Package showcase with images ===== */
.pkg-showcase {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}

.pkg-showcase-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  align-items: center;
  transition: all 0.3s ease;
}

.pkg-showcase-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.pkg-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pkg-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pkg-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pkg-details h3 {
  font-size: 1.5rem;
  color: #111827;
  margin: 0;
}

.pkg-details ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.pkg-details ul li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: #4b5563;
  line-height: 1.6;
}

.pkg-details ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.price-tag {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 12px 0 0 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
}

@media (max-width: 768px) {
  .pkg-showcase-item {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pkg-image {
    height: 180px;
  }
}

/* Old package grid (keep for backward compatibility) */
.pkg-grid {
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:18px;
  margin-top:16px;
}
.pkg-card {
  background:#fff;
  border:1px solid #e9edf0;
  border-radius:14px;
  padding:18px;
  box-shadow:0 2px 10px rgba(0,0,0,.05);
}
.pkg-card h4 { margin-bottom:6px; }
.pkg-card ul { margin-left:18px; line-height:1.8; color:#4b5563; }
.price { font-weight:800; color:#1f2937; margin-top:8px; }

/* ===== CCTV Quotation ===== */
.quote-section { padding: 64px 24px; background:#fff; }
.quote-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  align-items: stretch;                 /* make both columns equal height */
}

/* Left info card */
.quote-left {
  background: linear-gradient(180deg,#fff7ef,#fff);
  border:1px solid #ffe1c7;
  border-radius:16px;
  padding: 26px 26px 22px;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);

  /* equal-height behavior */
  height: 100%;
  display: flex;
  flex-direction: column;
}
.section-heading.left { text-align:left; display:block; }
.quote-left h3 { 
  font-size: 2rem; 
  font-weight: 700; 
  color: #222; 
  text-align: left; 
  margin-bottom: 10px; 
}
.quote-left p { color:#374151; margin-bottom:12px; max-width: 46ch; }

/* Feature chips on left */
.usp-row.left{
  justify-content: flex-start;
  gap: 12px 14px;                       /* row x column spacing */
  margin: 12px 0 0;
  padding: 2px 0 4px;
  display: grid;
  grid-template-columns: repeat(2, auto);
}
.usp-row.left .usp-badge{
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  font-weight: 700;
}

/* Right quotation form card */
.quote-form {
  background:#fff;
  border:1px solid #e9edf0;
  border-radius:16px;
  padding: 22px;                        /* visual balance vs left */
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  display:grid;
  gap: 10px;

  /* equal height */
  height: 100%;
}
.quote-form label { display:grid; gap:6px; font-weight:700; color:#111827; }
.quote-form select,
.quote-form input,
.quote-form textarea {
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:10px;
  background:#fafafa;
}
.quote-form .row { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quote-form small { color:#6b7280; }
.quote-form .modern-btn { margin-top: 4px; }

/* ===== FAQ / Knowledge ===== */
.faq { margin-top: 14px; }
.faq details {
  border:1px solid #e9edf0; border-radius:12px;
  padding: 12px 14px; background:#fff; margin-bottom:10px;
}
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { color:#4b5563; margin-top: 6px; line-height: 1.75; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .banner.banner--cctv { height: 48vh; }
  .quote-wrap { grid-template-columns: 1fr; }
  .quote-form .row { grid-template-columns: 1fr; }
  .cctv-grid, .pkg-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  /* chips stay tidy on smaller screens */
  .usp-row.left{
    grid-template-columns: repeat(2, minmax(0, auto));
  }
}

@media (max-width: 600px){
  .banner.banner--cctv { height: 44vh; }
}

/* ======== MOBILE OVERFLOW + ANTI-SQUISH + DESKTOP GRID SAFETY (appended) ======== */

/* Prevent any horizontal overflow and scale media safely */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; height: auto; display: block; }

/* Gentle wrapping: avoid hard-breaking headings/links */
p, li, .faq p {
  overflow-wrap: break-word;
  word-break: normal;
}
h1, h2, h3, h4, h5, h6,
.section-heading,
.cctv-card h3,
.pkg-card h4 {
  overflow-wrap: normal;
  word-break: normal;
}

/* Desktop-only grid safety so mobile breakpoints aren’t overridden */
@media (min-width: 992px) {
  .cctv-grid  { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .pkg-grid   { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .quote-wrap { grid-template-columns: 1.1fr minmax(0,1fr); }
}

/* Extra safety */
:root { overflow-x: clip; }
