/* ============================================================
   site.css  –  Aman's Alarms  (de-bloated, v2)
   Replaces: WPO-Minify bundles + Elementor CSS + Astra CSS
   ============================================================ */

/* 1. Font faces (locally hosted) */
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Ubuntu'), url('/fonts/ubuntu-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Ubuntu'), url('/fonts/ubuntu-bold.woff2') format('woff2');
}

/* 2. Reset & base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Ubuntu', sans-serif;
  color: #555;
  background: #fff;
  font-size: 20px;
  line-height: 1.65;
  overflow-x: hidden;
  text-align: center;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0088ff; text-decoration: none; transition: color 0.2s; }
a:hover { color: #555; text-decoration: none; }
h1, h2, h3, h4 { color: #0088ff; font-weight: 400; margin: 0 0 0.5em; }
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }

/* 3. Shared container */
.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   4. SITE HEADER
   ============================================================ */
.site-header {
  background: #0088ff;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  gap: 20px;
}

#site-nav {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Logo */
.site-logo { flex-shrink: 0; }
.site-logo img {
  height: 136px;
  width: auto;
  display: block;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  width: 100%;
}
.site-nav li { margin: 0; }
.site-nav li:last-child { margin-left: 50px; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 20px;
  display: inline-block;
  font-size: 30px;
  white-space: nowrap;
}
.site-nav a:hover { color: #555; text-decoration: none; }
.site-nav a[aria-current="page"] { font-weight: 700; }

/* CTA Button */
.btn-quote {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #6fe500;
  color: #fff !important;
  text-decoration: none !important;
  padding: 15px 32px;
  border-radius: 5px;
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s;
}
/* Override .site-nav a specificity for the quote button */
.site-nav a.btn-quote {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  padding: 15px 32px;
}
.btn-quote:hover { background: #5bc900; }
.btn-quote svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  flex-shrink: 0;
}

/* Hamburger toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: 0.25s;
}

/* ============================================================
   5. MAIN CONTENT
   ============================================================ */
.site-main {
  padding: 40px 0 60px;
}

/* Generic page intro */
.page-intro { margin: 0 auto 30px; text-align: center; }
.page-intro h1 { margin-bottom: 0.6em; }
.article-body .page-intro img { max-width: 600px; margin: 16px auto; }

/* Content sections (h2 + paragraphs) */
.content-section { margin-bottom: 36px; }
.content-section h2 { margin-bottom: 0.5em; }
.content-section img {
  width: 100%;
  margin: 16px 0;
  border-radius: 4px;
}

/* ============================================================
   6. HOMEPAGE – Welcome section
   ============================================================ */
.home-welcome {
  text-align: center;
  padding: 30px 0 10px;
}
.home-welcome h1 { font-size: 2rem; margin-bottom: 0.75em; }
.home-welcome p {
  max-width: 680px;
  margin: 0 auto 0.75em;
}

/* ============================================================
   7. HOMEPAGE – Testimonials
   ============================================================ */
.testimonials-section {
  text-align: center;
  padding: 20px 0 30px;
}
.testimonials-section h2 { margin-bottom: 0.5em; }
.testimonials-section p.intro { max-width: 700px; margin: 0 auto 1em; }
.stars-img { margin: 0 auto 20px; }

.testimonial-carousel {
  position: relative;
  overflow: hidden;
}
.testimonial-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}
.testimonial-slide { min-width: 100%; padding: 10px 60px 30px; }

.testimonial-bubble {
  background: #eef5ff;
  border-radius: 8px;
  padding: 25px 30px;
  font-size: 1rem;
  line-height: 1.75;
  color: #555;
  position: relative;
  margin-bottom: 20px;
  text-align: left;
}
.testimonial-bubble::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #eef5ff;
}
.testimonial-cite { font-style: normal; display: block; text-align: center; }
.testimonial-name { font-weight: 700; color: #555; }
.testimonial-location { color: #666; margin-left: 6px; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-80%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #0088ff;
  line-height: 0;
}
.carousel-btn-prev { left: 0; }
.carousel-btn-next { right: 0; }
.carousel-btn svg { width: 32px; height: 32px; fill: #0088ff; }

/* ============================================================
   8. HOMEPAGE – Service tiles grid
   ============================================================ */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 40px;
}
.service-grid h2 { text-align: center; font-family: 'Ubuntu', sans-serif; font-size: 34px; font-weight: 500; margin-bottom: 10px; }

.service-tile {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  background: #ccc;
  text-decoration: none;
}
.service-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.service-tile:hover img { transform: scale(1.08); }

.service-tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 45, 45, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.service-tile:hover .service-tile-overlay { opacity: 1; }
.service-tile-overlay span {
  color: #fff;
  font-family: 'Ubuntu', sans-serif;
  font-size: 28px;
  font-weight: 500;
  text-align: center;
  padding: 10px 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ============================================================
   9. CASE STUDY POST GRID (used on service pages)
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 20px 0;
}
.post-card {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.post-card-thumb { overflow: hidden; aspect-ratio: 4 / 3; display: flex; }
.post-card-thumb a { display: block; line-height: 0; width: 100%; height: 100%; }
.post-card .post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.post-card:hover .post-card-thumb img { transform: scale(1.08); }
.post-card-body { padding: 20px 15px 25px; flex: 1; display: flex; flex-direction: column; }
.post-card .post-card-body h3 { font-size: 1.75rem; color: #0088ff; margin-top: 0; margin-bottom: 25px; }
.post-card-body h3 a { text-decoration: none; }
.post-card-excerpt { font-size: 0.9rem; color: #555; flex: 1; margin-bottom: 25px; }
.post-card-readmore {
  font-size: 0.85rem;
  color: #0088ff;
  text-decoration: none;
  font-weight: 500;
}

/* ============================================================
   10. ARTICLE / CASE STUDY content
   ============================================================ */
.article-body { padding: 20px 0 40px; }
.article-body h1 { margin-bottom: 0.75em; }
.article-body h2 { margin: 1.5em 0 0.5em; }
.article-body h3 { margin: 1.2em 0 0.4em; }
.article-body img {
  width: 100%;
  margin: 20px 0;
  border-radius: 4px;
}
.article-body figcaption { font-size: 0.85rem; color: #666; text-align: center; margin-top: -15px; margin-bottom: 20px; }

/* Text + portrait image side-by-side layout */
.text-img-row {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  margin: 20px 0;
}
.text-img-row .text-img-row__text { flex: 1; }
.text-img-row .text-img-row__img {
  flex-shrink: 0;
  width: 240px;
}
.text-img-row .text-img-row__img img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0;
}

/* Image gallery in articles (3-col thumbnail strip) */
.img-2col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.img-2col img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.img-2col img:hover { opacity: 0.85; transform: scale(1.025); }
/* Lone last image (1 left over in a 3-col row) spans full width */
.img-2col img:last-child:nth-child(3n+1) { grid-column: 1 / -1; }

/* ============================================================
   11. LOCATION / SIMPLE PAGE content
   ============================================================ */
.simple-page { padding: 20px 0 40px; }
.simple-page h1 { margin-bottom: 0.75em; }
.simple-page h2 { margin: 2em 0 1.5em; }

/* Location intro: text centred, map right */
.location-intro {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 20px;
  text-align: center;
}
.location-text { flex: 1; }
.location-map  { flex: 1; aspect-ratio: 4/3; }
.location-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================
   12. GET A QUOTE page
   ============================================================ */
.quote-page { padding: 20px 0 40px; text-align: center; }
.quote-page h1 { margin-bottom: 0.5em; }
.quote-page .intro { margin-bottom: 30px; }
.btn-whatsapp {
  display: inline-block;
  background: #6fe500;
  color: #fff !important;
  text-decoration: none !important;
  padding: 20px 45px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}
.btn-whatsapp:hover { background: #5bc900; }
.qr-block { margin: 30px auto; }
.qr-block p { margin-bottom: 12px; }
.qr-block img { margin: 0 auto; border: 1px solid #ddd; border-radius: 4px; }
.phone-link { margin-top: 20px; }
.phone-link a { color: #6fe500; font-weight: 700; text-decoration: none; }
.phone-link a:hover { color: #555; text-decoration: none; }

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
  background: #0088ff;
  color: #fff;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.25rem;
}
.footer-inner p { margin: 0; line-height: 1.75; color: #fff; }
.footer-inner a { color: #fff; text-decoration: none; display: block; line-height: 1.75; }
.footer-inner a:hover { color: #555; text-decoration: none; }
/* Address column uses <br> tags — links must be inline to avoid blank lines */
.footer-inner div:first-child a { display: inline; line-height: inherit; }

/* Footer headings — override global blue so they show on the blue background */
.site-footer h2,
.site-footer h3 { color: #fff; margin-bottom: 12px; }

/* Build version tag */
.build-tag {
  display: block;
  background: #0088ff;
  color: rgba(255,255,255,0.45);
  font-size: 0.72rem;
  text-align: right;
  padding: 6px 20px;
  letter-spacing: 0.05em;
}

/* ============================================================
   14. VIDEO EMBED (responsive YouTube / iframe)
   ============================================================ */
.video-embed {
  margin: 20px 0;
  aspect-ratio: 16 / 9;
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 4px;
}

/* ============================================================
   Sub-page navigation grid (used on CCTV page)
   ============================================================ */
.subpage-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 10px 0 36px;
}
.subpage-nav a {
  display: block;
  background: #eef5ff;
  color: #0088ff;
  text-decoration: none;
  padding: 18px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid #c8dff8;
  transition: background 0.2s, color 0.2s;
}
.subpage-nav a:hover {
  background: #0088ff;
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   15. BLOCKQUOTE
   ============================================================ */
blockquote {
  border-left: 4px solid #0088ff;
  background: #eef5ff;
  margin: 20px 0;
  padding: 20px 24px;
  border-radius: 0 4px 4px 0;
  font-style: italic;
}
blockquote p { font-size: 1rem; margin-bottom: 0.75em; }
blockquote p:last-child { margin-bottom: 0; }

/* ============================================================
   16. ACCESSIBILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -9999px;
  background: #fff;
  color: #0088ff;
  padding: 8px 16px;
  font-weight: 700;
  z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ============================================================
   17. LIGHTBOX
   ============================================================ */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lb-overlay.lb-open {
  display: flex;
}
.lb-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 88vh;
}
.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-close {
  position: fixed;
  top: 14px;
  right: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 12px 8px;
  border-radius: 4px;
  z-index: 2001;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
  font-family: sans-serif;
}
.lb-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.22); }
.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 4px;
  z-index: 2001;
  opacity: 0.75;
  transition: opacity 0.2s, background 0.2s;
  user-select: none;
  font-family: sans-serif;
}
.lb-btn:hover { opacity: 1; background: rgba(255, 255, 255, 0.22); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-counter {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  z-index: 2001;
  pointer-events: none;
  font-family: 'Ubuntu', sans-serif;
  letter-spacing: 0.04em;
}
/* Hide nav buttons when there is only 1 image */
.lb-overlay.lb-single .lb-prev,
.lb-overlay.lb-single .lb-next { display: none; }

/* ============================================================
   18. RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  /* Header */
  .site-header { position: relative; }
  .menu-toggle { display: flex; }
  .site-logo img { height: 100px; }

  /* Nav hidden by default, shown when .open */
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #0066cc;
    padding: 10px 0 20px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 24px; width: 100%; }

  /* Grids */
  .service-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .img-2col { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .subpage-nav { grid-template-columns: 1fr; }

  /* Text+image row: stack on mobile */
  .text-img-row { flex-direction: column; align-items: center; }
  .text-img-row .text-img-row__img { width: 160px; }

  /* Location intro: stack vertically on mobile */
  .location-intro { flex-direction: column; }
  .location-map { width: 100%; }

  /* Testimonials */
  .testimonial-slide { padding: 10px 45px 20px; }
  .carousel-btn svg { width: 24px; height: 24px; }

  /* Quote button */
  .btn-quote { font-size: 1.05rem; padding: 12px 20px; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .btn-quote { padding: 10px 15px; font-size: 1rem; }
  .testimonial-slide { padding: 10px 40px 20px; }
  .site-logo img { height: 68px; }
}
