/* =================================================================
   All in One Powertech Solutions — Design System
   Apple-inspired: restrained color, confident type, generous space,
   soft depth instead of heavy shadows, quiet motion.
   ================================================================= */

:root {
  /* ---- Color ---- */
  --ink: #1d1d1f;          /* primary text */
  --ink-soft: #6e6e73;     /* secondary text */
  --white: #ffffff;
  --bg-alt: #f5f5f7;       /* section alt background */
  --line: rgba(0,0,0,0.08);/* hairline dividers */

  --primary: #0a6cc7;      /* brand blue, refined */
  --primary-dark: #084f93;
  --navy: #16233F;         /* brand navy — dark sections, footer */
  --accent: #F5B633;       /* brand amber — used sparingly */

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.015em;
  color: var(--ink);
}

a { color: inherit; }

img, video { max-width: 100%; display: block; }

/* The `hidden` attribute must win over any display: grid/flex set below. */
[hidden] { display: none !important; }

/* Visible keyboard focus everywhere, without showing a ring on mouse clicks. */
:focus-visible {
  outline: 3px solid rgba(10,108,199,0.55);
  outline-offset: 2px;
}

/* Scroll-reveal (progressive enhancement — see main.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .logo-mark { animation: none !important; }
}

/* ================= NAVBAR ================= */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 56px;
  border-bottom: 1px solid var(--line);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  animation: swoopIn 0.8s var(--ease) both;
}

@keyframes swoopIn {
  0% { opacity: 0; transform: translateX(-24px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Full logo lockup (mark + wordmark) lifted straight from the brand
   artwork with a transparent background, so it sits directly on the
   navbar's own background at any width without a boxed-in card. */
.logo-container img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.navbar nav {
  display: flex;
  align-items: center;
}

.navbar nav a {
  margin-left: 34px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
}

.navbar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s var(--ease);
}

.navbar nav a:hover,
.navbar nav a.active {
  color: var(--primary);
}

.navbar nav a.active::after,
.navbar nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 0;
  width: 44px;            /* comfortable touch target */
  height: 44px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--bg-alt); }

/* ================= HERO ================= */
.hero {
  height: 92vh;
  min-height: 560px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 56px;
  color: var(--white);
  overflow: hidden;
  background: url("../images/hero-photo.jpg") center/cover no-repeat;
}

.hero-content {
  max-width: 620px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.9),
    0 4px 14px rgba(0,0,0,0.65),
    0 12px 36px rgba(0,0,0,0.4);
}

.hero p {
  font-size: 19px;
  color: rgba(255,255,255,0.97);
  max-width: 520px;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.9),
    0 3px 10px rgba(0,0,0,0.6),
    0 8px 24px rgba(0,0,0,0.35);
}

/* ================= HOME COUNTERS ================= */
.stats-band {
  background: var(--navy);
  color: var(--white);
  padding: 64px 56px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

/* Fewer columns when the admin has left one or two counters at zero. */
.stats-band[data-count="2"] .stats-grid { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
.stats-band[data-count="1"] .stats-grid { grid-template-columns: 1fr; max-width: 360px; }

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 24px;
  border-left: 1px solid rgba(255,255,255,0.14);
}
.stat-item.stat-first { border-left: none; }

.stat-number {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  /* Equal-width digits so the number doesn't jitter while counting up. */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-plus {
  color: var(--accent);
  margin-left: 2px;
}

.stat-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.72);
}

/* ================= HOME COMPANY VIDEO ================= */
.video-section { padding-bottom: 0; }

.video-frame {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.video-frame video {
  width: 100%;
  height: 100% !important;   /* overrides the inline height:auto fallback */
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.video-mute,
.video-play {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  color: var(--white);
  background: rgba(22,35,63,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.video-mute {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.video-play {
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.video-mute:hover,
.video-play:hover { background: var(--primary); }

.video-mute .icon-sound { display: none; }
.video-mute.is-unmuted .icon-muted { display: none; }
.video-mute.is-unmuted .icon-sound { display: block; }

/* ================= SECTION ================= */
.section {
  padding: 120px 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.light-bg {
  background: var(--bg-alt);
  max-width: none;
}
.light-bg > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(30px, 3.6vw, 44px);
  margin-bottom: 56px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ================= BENEFITS ================= */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.benefit-card {
  background: var(--white);
  padding: 40px 34px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.benefit-card h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: var(--ink);
}

.benefit-card p {
  color: var(--ink-soft);
  font-size: 15.5px;
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

/* ================= IMAGE SLIDER ================= */
.slider {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
}

.slider img {
  scroll-snap-align: start;
  width: 480px;
  height: 300px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* ================= ABOUT PAGE ================= */
.about-hero {
  height: 44vh;
  min-height: 320px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  overflow: hidden;
  background: url("../images/hero-photo.jpg") center 60%/cover no-repeat;
}

.about-hero-content {
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.about-hero-content h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 14px;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.9),
    0 4px 14px rgba(0,0,0,0.65),
    0 12px 32px rgba(0,0,0,0.4);
}

.about-hero-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.97);
  text-shadow:
    0 1px 2px rgba(0,0,0,0.9),
    0 3px 10px rgba(0,0,0,0.6),
    0 8px 20px rgba(0,0,0,0.35);
}

.about-section .accordion-item {
  transition: transform 0.3s var(--ease);
}

.about-section .accordion-item:hover {
  transform: translateY(-2px);
}

/* FOUNDERS */
/* Flex (not grid) so a last card on its own row sits centred, not left. */
.founders-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 8px;
}

.founder-card {
  flex: 1 1 220px;
  max-width: 320px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.founder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

/* Photos are pre-framed at 4:5 with every head top at the same height
   (founderN-card.jpg); anchoring to the top keeps that headroom. */
.founder-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: #d9d9d9;
}

.founder-card-body {
  padding: 22px 20px 26px;
}

.founder-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.founder-role {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.founder-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.skill-tag {
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.pdf-content { padding: 30px; }

/* Embedded PDFs: phone browsers mostly can't show a PDF inside a page, so
   below 768px the frame is hidden and the buttons open it full screen. */
.pdf-frame {
  display: block;
  width: 100%;
  height: 720px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.pdf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pdf-actions .pdf-button { margin-right: 0; }
.pdf-intro { margin-bottom: 18px; }
.pdf-mobile-note { display: none; margin-bottom: 4px; }

.pdf-button {
  display: inline-block;
  padding: 13px 28px;
  margin-right: 14px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  background: var(--primary);
  color: var(--white);
  transition: 0.3s var(--ease);
}

.pdf-button:hover { background: var(--primary-dark); }
.pdf-button.secondary { background: var(--ink); }
.pdf-button.secondary:hover { opacity: 0.85; }

/* ================= ACCORDION ================= */
.accordion-item {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.accordion-title {
  position: relative;
  padding: 22px 56px 22px 28px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}

.accordion-title:hover { background: var(--bg-alt); }

.accordion-title::after {
  /* Default state is expanded, so the icon reads "−" (collapse this). */
  content: "\2212";
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
  color: var(--primary);
}

.accordion-title.collapsed {
  background: var(--white);
}

.accordion-title.collapsed::after {
  content: "+";
}

.accordion-content {
  /* All sections are visible by default; .collapsed hides one on click. */
  display: block;
  padding: 6px 28px 30px;
  background: var(--white);
  color: var(--ink-soft);
}

.accordion-content.collapsed {
  display: none;
}

.accordion-content ul { padding-left: 20px; }
.accordion-content li { margin-bottom: 10px; }

/* ================= SERVICES — 2x2 GRID ================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.service-card { position: relative; }

.service-plus {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(10,108,199,0.3);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
  pointer-events: none;   /* the whole card is the click target */
}

.service-card:hover .service-plus,
.service-card:focus-visible .service-plus {
  background: var(--primary-dark);
  transform: rotate(90deg);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card h3 {
  padding: 22px 72px 22px 24px;   /* room on the right for the + button */
  font-size: 19px;
  color: var(--ink);
}

/* Old inline reveal section is no longer used for display -- content is
   sourced from here into the popup modal instead, so keep it out of flow. */
.service-details { display: none; }
.service-info { display: none; }

/* ================= SERVICE POPUP MODAL ================= */
.service-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22,35,63,0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.service-modal-overlay.active { display: flex; }

.service-modal {
  background: var(--white);
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 24px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  animation: modalPop 0.3s var(--ease);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.service-modal img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.service-modal-body { padding: 34px; }
.service-modal-body h3 { color: var(--ink); font-size: 24px; margin-bottom: 14px; }
.service-modal-body p { margin-bottom: 16px; color: var(--ink-soft); }
.service-modal-body ul { padding-left: 22px; color: var(--ink-soft); }
.service-modal-body li { margin-bottom: 10px; }

.service-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: 0.25s var(--ease);
}

.service-modal-close:hover { background: var(--white); color: var(--primary); }

/* ================= GALLERY PAGE ================= */
.gallery-status {
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.gallery-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
}

.gallery-tab {
  padding: 10px 26px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-weight: 500;
  font-size: 14.5px;
  cursor: pointer;
  transition: 0.25s var(--ease);
}

.gallery-tab:hover { background: var(--bg-alt); }

.gallery-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Gallery-page-only category selector: same underlying .gallery-tab element
   (so gallery.js needs no changes) restyled as large boxes with an icon,
   instead of the small pill tabs used elsewhere (e.g. admin.html). */
.gallery-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 640px;
  margin: 0 auto 44px;
}

.category-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
}

.category-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.category-box svg {
  color: var(--primary);
  margin-bottom: 6px;
}

.category-label {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.category-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
}

.category-box.active {
  background: var(--bg-alt);
  border-color: var(--primary);
  color: var(--ink);
  box-shadow: 0 20px 45px rgba(10,108,199,0.14);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.gallery-item {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #000;
}

.media-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

.category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(22,35,63,0.85);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

.gallery-caption {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}

.lightbox.active { display: flex; }

.lightbox img,
.lightbox video {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.lightbox p {
  color: var(--white);
  margin-top: 16px;
  font-size: 15px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 40px;
  color: var(--white);
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
}

/* ================= ADMIN PAGE ================= */
.admin-wrapper {
  max-width: 1000px;
  margin: 0 auto;
}

.admin-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--line);
  box-shadow: 0 25px 60px rgba(0,0,0,0.06);
  max-width: 420px;
  margin: 0 auto;
}

#admin-panel.admin-box { max-width: none; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.upload-form {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.upload-form input[type="file"] {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.upload-form input[type="text"] {
  flex: 1 1 200px;
  margin-bottom: 0;
}

.upload-form select {
  flex: 1 1 180px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 15px;
  background: var(--white);
  color: var(--ink);
}

.upload-form select:focus { border-color: var(--primary); outline: none; }

.upload-form button { flex: 0 0 auto; }

.admin-error {
  width: 100%;
  color: #c0392b;
  font-size: 14px;
  margin-top: 8px;
}

.admin-delete-btn {
  width: calc(100% - 36px);
  margin: 0 18px 18px;
  padding: 10px;
  background: #c0392b;
  border-radius: 30px;
}

.admin-delete-btn:hover { background: #96281b; }

.admin-reorder-hint {
  font-size: 14px;
  color: var(--ink-soft);
  margin: -20px 0 24px;
}

.admin-section-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  /* Four tabs don't fit a phone screen: let the row scroll sideways. */
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-section-tabs::-webkit-scrollbar { display: none; }

.admin-section-tab {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-section-tab:hover { background: none; color: var(--ink); }

.admin-section-tab.active,
.admin-section-tab.active:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.enquiries-count-badge {
  background: #c0392b;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.enquiries-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.enquiry-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}

.enquiry-card-new {
  background: rgba(10,108,199,0.06);
  border-color: rgba(10,108,199,0.25);
}

.enquiry-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.enquiry-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
}

.enquiry-new-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 20px;
}

.enquiry-date {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-soft);
}

.enquiry-contact-line {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.enquiry-contact-line a { color: var(--primary); }

.enquiry-message {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.enquiry-actions {
  display: flex;
  gap: 12px;
}

.enquiry-delete-btn {
  width: auto;
  margin: 0;
  padding: 10px 20px;
}

/* Settings forms (Home Counters, Calculator parameters) */
.admin-hint {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 720px;
}

.settings-form { max-width: none; margin: 0; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px 26px;
}

.settings-field { display: flex; flex-direction: column; }

.settings-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.settings-field input { margin-bottom: 6px; }

.settings-field small {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.settings-preview:empty { display: none; }

.settings-preview {
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
}

.settings-preview ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 24px;
  margin-top: 12px;
}

.settings-preview li { display: flex; flex-direction: column; gap: 2px; }
.settings-preview li span { font-size: 12.5px; color: var(--ink-soft); }
.settings-preview li b { font-size: 16px; }

.settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.settings-status {
  flex: 1 1 220px;
  font-size: 14px;
  color: var(--ink-soft);
  min-height: 1.4em;
}
.settings-status-success { color: #1f8a4c; }
.settings-status-error { color: #c0392b; }

.btn-outline {
  background: none;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}
.btn-outline:hover { background: var(--bg-alt); }

button:disabled { opacity: 0.6; cursor: default; }

.admin-draggable { cursor: grab; }
.admin-draggable.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.drag-handle {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.92);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 3;
  user-select: none;
}

/* CONTACT + FORMS (site-wide) */
form { max-width: 600px; margin: auto; }

input, textarea {
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
}

input:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(10,108,199,0.12);
}

button {
  padding: 15px 34px;
  border-radius: 30px;
  background: var(--primary);
  color: var(--white);
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s var(--ease);
  font-family: inherit;
}

button:hover { background: var(--primary-dark); }

/* ================= CONTACT PAGE ================= */
.contact-wrapper { padding-top: 90px; padding-bottom: 90px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

.contact-form-box,
.contact-info-box {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

/* Let grid children shrink below their content width on narrow phones,
   and let the long email address wrap instead of pushing the page wide. */
.contact-grid > *, .calc-grid > * { min-width: 0; }
.contact-info-box a, .footer-col a { overflow-wrap: anywhere; }

.contact-form-box h3,
.contact-info-box h3 {
  margin-bottom: 24px;
  color: var(--ink);
  font-size: 20px;
}

.contact-info-box p {
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.contact-info-box strong { color: var(--ink); }

.contact-form-status {
  margin: 4px 0 0;
  font-size: 14.5px;
  min-height: 1.4em;
}

.contact-form-status-success { color: #1f8a4c; }
.contact-form-status-error { color: #c0392b; }

/* ================= FAQ PAGE ================= */
.faq-hero {
  height: 34vh;
  min-height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  overflow: hidden;
  background: url("../images/hero-photo.jpg") center 60%/cover no-repeat;
}

.faq-hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}
.faq-hero-content h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.9),
    0 4px 14px rgba(0,0,0,0.65),
    0 12px 32px rgba(0,0,0,0.4);
}
.faq-hero-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.97);
  text-shadow:
    0 1px 2px rgba(0,0,0,0.9),
    0 3px 10px rgba(0,0,0,0.6),
    0 8px 20px rgba(0,0,0,0.35);
}

.faq-list { max-width: 820px; margin: 0 auto; }

.faq-item {
  margin-bottom: 20px;
  padding: 28px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.faq-question {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.faq-answer {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.faq-note {
  max-width: 820px;
  margin: 0 auto 40px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 14.5px;
  border: 1px dashed var(--line);
}

/* ================= CALCULATOR PAGE ================= */
.calc-section { padding-top: 70px; padding-bottom: 90px; }

.calc-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.calc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.calc-card h3 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 24px;
}

.calc-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.calc-card input[type="number"] {
  margin-bottom: 22px;
}

.calc-assumptions {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px 2px;
  margin-bottom: 24px;
  background: var(--bg-alt);
}

.calc-assumptions summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-size: 14.5px;
  margin-bottom: 14px;
}

.calc-btn {
  width: 100%;
  margin-top: 4px;
}

.calc-fineprint {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 16px;
  line-height: 1.6;
}

.calc-fineprint a { color: var(--primary); }

.calc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 36px;
}

.calc-stat {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-stat-wide { grid-column: 1 / -1; }

.calc-stat-subsidy {
  background: rgba(31,138,76,0.08);
  border: 1px solid rgba(31,138,76,0.2);
}
.calc-stat-subsidy .calc-stat-value { color: #1f8a4c; }

.calc-stat-highlight {
  background: rgba(10,108,199,0.08);
  border: 1px solid rgba(10,108,199,0.18);
}

.calc-stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.calc-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.calc-stat-highlight .calc-stat-value { color: var(--primary); }

.calc-chart-wrap {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-bottom: 28px;
}

.calc-chart-title {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 18px;
}

.calc-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.calc-bar-name {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.calc-bar-track {
  background: var(--bg-alt);
  border-radius: 20px;
  height: 18px;
  overflow: hidden;
}

.calc-bar {
  height: 100%;
  border-radius: 20px;
  transition: width 0.5s var(--ease);
}

.calc-bar-grid { background: var(--ink-soft); }
.calc-bar-solar { background: var(--primary); }

.calc-bar-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.calc-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.calc-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.calc-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.calc-swatch-grid { background: var(--ink-soft); }
.calc-swatch-solar { background: var(--primary); }

.calc-disclaimer {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.calc-disclaimer a { color: var(--primary); }

/* ================= FOOTER ================= */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 70px 56px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col p {
  font-size: 14px;
  color: rgba(255,255,255,0.68);
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer-col a:hover { color: var(--accent); }

.footer-links { display: flex; flex-direction: column; }
.footer-links a { margin-bottom: 12px; }

.social-links { display: flex; gap: 12px; }

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: 0.3s var(--ease);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--navy);
  transform: translateY(-3px);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

/* ================================================= */
/* ================== RESPONSIVE =================== */
/* ================================================= */
/* Base styles above target laptops and desktops (roughly 1025px and up).
   Below that:
     <= 1024px  small laptops / tablets  -- tighter page gutters
     <=  960px  tablets / phones         -- hamburger menu
     <=  768px  phones                   -- single-column layouts
     <=  480px  small phones             -- compact spacing              */

@media (max-width: 1024px) {
  .navbar { padding: 14px 32px; }
  .hero { padding: 0 32px; }
  .section { padding: 90px 32px; }
  .stats-band { padding: 56px 32px; }
  .footer { padding: 60px 32px 0; }
  .footer-content { gap: 36px; }
  .calc-grid { gap: 28px; }
  .contact-grid { gap: 32px; }
}

/* Seven links plus the logo stop fitting on one line a little under
   1000px, so the hamburger menu takes over from here down. */
@media (max-width: 960px) {
  .logo-container img { height: 46px; }

  .navbar nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    padding: 10px 0 16px;
  }

  .navbar nav.active { display: flex; }

  .navbar nav a {
    margin: 0;
    padding: 14px 20px;     /* full-width, easy-to-tap rows */
    font-size: 16px;
  }
  .navbar nav a::after { display: none; }

  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .services-grid { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 768px) {

  .navbar { padding: 12px 20px; }

  .logo-container img { height: 38px; }

  /* 16px inputs stop iPhones zooming the page when a field is tapped. */
  input, textarea, select, .upload-form select { font-size: 16px; }

  .hero { padding: 0 20px; height: 82vh; min-height: 460px; text-align: center; justify-content: center; }
  .hero-content { max-width: 100%; }
  .hero p { max-width: 100%; margin: 0 auto; font-size: 17px; }

  .about-hero { height: 38vh; }

  .section { padding: 64px 20px; }
  .section-title { margin-bottom: 32px; }

  /* Counters stack, with a hairline between rows instead of columns. */
  .stats-band { padding: 44px 20px; }
  .stats-grid,
  .stats-band[data-count="2"] .stats-grid { grid-template-columns: 1fr; max-width: 360px; gap: 0; }
  .stat-item {
    padding: 24px 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.14);
  }
  .stat-item.stat-first { border-top: none; padding-top: 0; }
  .stat-item.stat-last { padding-bottom: 0; }
  .stat-number { font-size: 44px; }

  .benefit-card { padding: 30px 26px; }

  .video-frame { border-radius: var(--radius-md); }
  .video-play { width: 60px; height: 60px; }

  .slider { gap: 16px; }
  .slider img { width: 260px; height: 170px; }

  .service-modal img { height: 190px; }
  .service-modal-body { padding: 24px; }

  .accordion-title { padding: 18px 50px 18px 20px; }
  .accordion-title::after { right: 20px; }
  .accordion-content { padding: 4px 20px 24px; }

  .founders-grid { gap: 16px; }
  .founder-card { flex: 1 1 140px; max-width: calc(50% - 8px); }
  .founder-card-body { padding: 16px 14px 20px; }
  .founder-name { font-size: 15px; }

  .faq-item { padding: 22px 20px; }

  .calc-section { padding-top: 48px; padding-bottom: 64px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-card { padding: 26px; }
  .calc-stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .calc-stat { padding: 14px 16px; }
  .calc-stat-value { font-size: 19px; }
  .calc-bar-row { grid-template-columns: 90px 1fr 90px; gap: 10px; }

  .contact-wrapper { padding-top: 56px; padding-bottom: 64px; }
  .contact-grid { grid-template-columns: 1fr; gap: 26px; }
  .contact-form-box, .contact-info-box { padding: 26px; }
  .contact-form-box button { width: 100%; }

  .gallery-tabs { flex-wrap: wrap; }
  .gallery-categories { grid-template-columns: 1fr 1fr; gap: 14px; }
  .category-box { padding: 22px 14px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .gallery-item img, .gallery-item video { height: 150px; }

  .lightbox { padding: 20px; }
  .lightbox-close { top: 14px; right: 20px; }

  .admin-box { padding: 24px; }
  .admin-reorder-hint { margin-top: 0; }
  .upload-form button { width: 100%; }
  .enquiry-card { padding: 18px 18px; }
  .enquiry-date { margin-left: 0; width: 100%; }
  .enquiry-actions { flex-wrap: wrap; }
  .settings-actions button { flex: 1 1 100%; }
  .pdf-button { margin-right: 0; }
  .pdf-frame { display: none; }
  .pdf-mobile-note { display: block; }
  .pdf-actions { margin-top: 12px; }
  .pdf-actions .pdf-button { flex: 1 1 100%; text-align: center; }

  .footer { padding: 44px 20px 0; }
  .footer-content { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-links { align-items: center; }
  .social-links { justify-content: center; }
}

@media (max-width: 480px) {
  .logo-container img { height: 34px; }

  .hero h1 { font-size: 30px; }
  .section { padding: 52px 16px; }

  .calc-card, .contact-form-box, .contact-info-box { padding: 20px; }
  .calc-stats-grid { grid-template-columns: 1fr; }

  /* Chart rows: label and amount on one line, bar underneath. */
  .calc-bar-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .calc-bar-track { grid-column: 1 / -1; grid-row: 2; }

  .category-sub { display: none; }

  .admin-box { padding: 18px 16px; border-radius: var(--radius-md); }
  .admin-header .section-title { font-size: 26px !important; }
}

/* Short landscape phones: don't let the hero swallow the whole screen. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { height: auto; min-height: 0; padding-top: 70px; padding-bottom: 70px; }
  .about-hero, .faq-hero { height: auto; min-height: 0; padding-top: 48px; padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .navbar, .footer, .menu-toggle { display: none; }
}
