/*
Theme Name: Decent Act International
Theme URI: https://decent-act.com
Author: Decent Act International
Author URI: https://decent-act.com
Description: Custom WordPress theme for Decent Act International — dark editorial design with full Customizer control: accent colors, typography, day/night mode, and an editable home hero that supports image slideshows or a video background.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: decent-act
Tags: custom-colors, custom-logo, custom-menu, editor-style, featured-images, translation-ready
*/

/* ============================================================
   Decent Act International — Design System (WordPress theme)
   Dark, editorial, motion-rich. Colors/fonts are driven by the
   WordPress Customizer via inline :root overrides.
   ============================================================ */

:root {
  --bg: #0b0e13;
  --bg-2: #10141b;
  --bg-3: #161b24;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #e8eaf0;
  --text-dim: #9aa3b2;
  --accent: #4f7cff;
  --accent-2: #7aa0ff;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --white: #ffffff;
  --radius: 14px;
  --container: 1240px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-grad: linear-gradient(to bottom, rgba(11,14,19,0.85), rgba(11,14,19,0));
  --header-grad-scrolled: rgba(11, 14, 19, 0.92);
  --overlay-1: rgba(11,14,19,0.94);
  --overlay-2: rgba(11,14,19,0.55);
  --overlay-3: rgba(11,14,19,0.35);
  --hero-dot: rgba(255,255,255,0.25);
}

/* ---------- Light / Day mode ---------- */
[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef1f7;
  --bg-3: #ffffff;
  --line: rgba(15, 23, 42, 0.09);
  --line-2: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-dim: #526079;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --white: #ffffff;
  --header-grad: linear-gradient(to bottom, rgba(245,247,251,0.9), rgba(245,247,251,0));
  --header-grad-scrolled: rgba(245, 247, 251, 0.94);
  --overlay-1: rgba(245,247,251,0.9);
  --overlay-2: rgba(245,247,251,0.55);
  --overlay-3: rgba(245,247,251,0.35);
  --hero-dot: rgba(15,23,42,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }

.display-xl { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
.display-lg { font-size: clamp(2rem, 4vw, 3.2rem); }
.display-md { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--accent);
}

.lead { color: var(--text-dim); font-size: 1.06rem; max-width: 720px; }

.text-center { text-align: center; }
.text-center .eyebrow::after { content: ""; width: 34px; height: 1px; background: var(--accent); }

/* ---------- Header ---------- */
#site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background 0.4s var(--ease), box-shadow 0.4s;
  background: var(--header-grad);
}
#site-header.scrolled {
  background: var(--header-grad-scrolled);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
body.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar #site-header { top: 46px; } }

.header-top {
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
}
.header-top a:hover { color: var(--accent-2); }
.header-top .top-links { display: flex; gap: 18px; }

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand img, .brand .custom-logo { height: 46px; width: auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .custom-logo { height: 46px; }

/* Nav */
#main-nav > ul {
  display: flex;
  gap: 6px;
  align-items: center;
}
#main-nav > ul > li { position: relative; }
#main-nav > ul > li > a {
  display: block;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  transition: color 0.25s, background 0.25s;
}
#main-nav > ul > li > a:hover,
#main-nav > ul > li > a.active,
#main-nav > ul > li.current-menu-item > a,
#main-nav > ul > li.current-menu-ancestor > a { color: var(--accent-2); background: var(--accent-soft); }

#main-nav li.menu-item-has-children > a::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.6rem;
  margin-left: 6px;
  opacity: 0.7;
  vertical-align: middle;
}

#main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 270px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s var(--ease);
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
  z-index: 20;
}
#main-nav li:hover > .sub-menu, #main-nav li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
#main-nav .sub-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-dim);
  border-radius: 8px;
  transition: all 0.2s;
}
#main-nav .sub-menu a:hover { color: var(--white); background: var(--accent-soft); padding-left: 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--text);
  width: 44px; height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Day / night toggle */
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.theme-toggle:hover { color: var(--accent-2); border-color: var(--accent); transform: rotate(15deg); }
.theme-toggle .fa-sun { display: none; }
[data-theme="light"] .theme-toggle .fa-sun { display: inline-block; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79,124,255,0.3); }
.btn-outline { border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }

/* ---------- Hero (home) ---------- */
#hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 120px;
  background: var(--bg-2);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s ease, transform 7s linear;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--overlay-1) 20%, var(--overlay-2) 60%, var(--overlay-3));
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero-content h1 span { color: var(--accent-2); }
.hero-content p { margin: 26px 0 38px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-dots { position: absolute; z-index: 3; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button {
  width: 34px; height: 3px; border: none; cursor: pointer;
  background: var(--hero-dot); transition: background 0.3s;
}
.hero-dots button.active { background: var(--accent); }

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding: 190px 0 90px;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(79,124,255,0.16), transparent 60%),
    radial-gradient(600px 300px at 5% 110%, rgba(79,124,255,0.08), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero .crumbs { margin-top: 18px; font-size: 0.82rem; color: var(--text-dim); }
.page-hero .crumbs a:hover { color: var(--accent-2); }
.page-hero .crumbs span { margin: 0 8px; opacity: 0.5; }
.page-hero .lead { margin-top: 22px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 56px; }
.section-head.text-center { margin-inline: auto; max-width: 780px; }
.section-head .lead { margin-top: 16px; }
.text-center .lead { margin-inline: auto; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.card::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.card:hover { transform: translateY(-8px); border-color: var(--line-2); box-shadow: 0 26px 50px rgba(0,0,0,0.35); }
.card:hover::after { transform: scaleX(1); }

.card .card-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 1.45rem;
  margin-bottom: 22px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 12px; }
.card h3 a:hover { color: var(--accent-2); }
.card p { color: var(--text-dim); font-size: 0.93rem; }
.card .card-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; font-size: 0.85rem; font-weight: 600; color: var(--accent-2);
}
.card .card-link i { transition: transform 0.3s; }
.card:hover .card-link i { transform: translateX(6px); }

/* Item card (product component) */
.item-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.item-card:hover { transform: translateY(-6px); border-color: rgba(79,124,255,0.4); }
.item-card .item-img {
  height: 130px;
  display: grid; place-items: center;
  margin-bottom: 18px;
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
}
.item-card .item-img img { max-height: 106px; width: auto; object-fit: contain; }
.item-card h3 { font-size: 1rem; margin-bottom: 8px; }
.item-card p { font-size: 0.85rem; color: var(--text-dim); }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split .split-media { position: relative; }
.split .split-media img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  width: 100%;
}
.split .split-media::before {
  content: "";
  position: absolute; inset: -18px auto auto -18px;
  width: 120px; height: 120px;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  border-radius: 14px 0 0 0;
  opacity: 0.6;
}
.split .lead + .lead { margin-top: 14px; }

/* Stats */
.stats-band {
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(79,124,255,0.18), transparent 60%),
    var(--bg-3);
  border-block: 1px solid var(--line);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 60px 20px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 700;
  color: var(--text);
}
.stat .stat-num span { color: var(--accent-2); }
.stat .stat-label { margin-top: 6px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem; }
.stat i { font-size: 1.6rem; color: var(--accent-2); margin-bottom: 14px; }

/* Logo grid & marquee */
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.logo-tile {
  background: #f6f8fc;
  border-radius: var(--radius);
  padding: 28px;
  display: grid; place-items: center;
  min-height: 130px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.logo-tile img { max-height: 74px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.75; transition: all 0.35s; }
.logo-tile:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.logo-tile:hover img { filter: none; opacity: 1; }

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 26px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  gap: 70px;
  width: max-content;
  animation: marquee 32s linear infinite;
  align-items: center;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { height: 44px; width: auto; object-fit: contain; background:#fff; border-radius:8px; padding:6px 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Tabs (products preview) */
.tabs-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; justify-content: center; }
.tabs-nav button {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
}
.tabs-nav button:hover { color: var(--white); border-color: var(--accent); }
.tabs-nav button.active { background: var(--accent); border-color: var(--accent); color: var(--white); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp 0.6s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Product category (products page) */
.prod-cat { display: grid; grid-template-columns: 1.05fr 1fr; gap: 54px; align-items: center; }
.prod-cat.reverse .prod-media { order: 2; }
.prod-media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; background: #fff; }
.prod-list { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.prod-list li { display: flex; gap: 10px; align-items: baseline; color: var(--text-dim); font-size: 0.9rem; }
.prod-list li::before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--accent-2); }
.prod-cta { margin-top: 30px; }

/* Category section title on product pages */
.cat-title {
  display: flex; align-items: center; gap: 22px;
  margin: 70px 0 36px;
}
.cat-title:first-of-type { margin-top: 0; }
.cat-title h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); white-space: nowrap; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* Tech stack */
.stack-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.stack-card .stack-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.stack-card .stack-head i { color: var(--accent-2); font-size: 1.3rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 10px; }
.stack-card h3 { font-size: 1.02rem; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-tags span {
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* CTA band */
.cta-band {
  position: relative;
  padding: 90px 0;
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% -20%, rgba(79,124,255,0.25), transparent 65%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { color: var(--text-dim); max-width: 560px; margin: 0 auto 34px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.85rem; margin-top: 14px; }
.form-note.ok { color: #6fdd8b; }
.form-note.err { color: #ff7b7b; }

/* Contact info */
.info-tile {
  display: flex; gap: 18px;
  padding: 26px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.info-tile i { color: var(--accent-2); font-size: 1.2rem; width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: var(--accent-soft); border-radius: 12px; }
.info-tile h3 { font-size: 0.95rem; margin-bottom: 6px; }
.info-tile p, .info-tile a { color: var(--text-dim); font-size: 0.9rem; }
.info-tile a:hover { color: var(--accent-2); }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-wrap iframe { display: block; width: 100%; height: 420px; border: 0; filter: grayscale(0.4) contrast(1.05); }

/* ---------- Footer ---------- */
#site-footer { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 0; }
.footer-main {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 44px;
  padding: 80px 0 56px;
}
.footer-brand img, .footer-brand .custom-logo { height: 44px; margin-bottom: 20px; }
.footer-brand p { color: var(--text-dim); font-size: 0.88rem; max-width: 300px; }
.footer-social { display: flex; gap: 12px; margin-top: 24px; }
.footer-social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--text-dim);
  transition: all 0.3s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }

.footer-col h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--text); margin-bottom: 22px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a, .footer-col p { color: var(--text-dim); font-size: 0.88rem; transition: color 0.25s, padding-left 0.25s; }
.footer-col ul a:hover { color: var(--accent-2); padding-left: 5px; }
.footer-col .contact-line { display: flex; gap: 10px; margin-bottom: 12px; align-items: baseline; }
.footer-col .contact-line i { color: var(--accent-2); font-size: 0.85rem; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-bottom a:hover { color: var(--accent-2); }

/* Scroll top */
#scroll-top-btn {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: all 0.35s var(--ease);
  z-index: 900;
}
#scroll-top-btn.show { opacity: 1; visibility: visible; transform: none; }
#scroll-top-btn:hover { background: var(--accent-2); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* Resources */
.resource-card { overflow: hidden; padding: 0; }
.resource-card .res-img { height: 220px; overflow: hidden; }
.resource-card .res-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.resource-card:hover .res-img img { transform: scale(1.07); }
.resource-card .res-body { padding: 30px; }

/* Other services strip */
.other-services h2 { margin-bottom: 34px; }

/* ---------- WordPress content ---------- */
.entry-content > * + * { margin-top: 1.4em; }
.entry-content img, .entry-content .wp-block-image img { border-radius: var(--radius); border: 1px solid var(--line); }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content a:not(.btn):not(.card-link) { color: var(--accent-2); }
.entry-content a:not(.btn):not(.card-link):hover { text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4em; }
.alignwide { margin-inline: calc((var(--container) - 92vw) / -2); }
.alignfull { margin-inline: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--text-dim); font-size: 0.82rem; text-align: center; padding: 8px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item img { border-radius: 10px; }
blockquote { border-left: 3px solid var(--accent); padding-left: 20px; color: var(--text-dim); font-style: italic; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--line-2); padding: 10px 14px; text-align: left; }
th { background: var(--bg-3); }
pre { background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 18px; overflow-x: auto; }

/* Search form */
.search-form { display: flex; gap: 10px; max-width: 460px; }
.search-form input[type="search"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
  padding: 12px 20px;
  font-family: var(--font-body);
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); }
.search-form button { border-radius: 999px; }

/* 404 */
.error-404 { text-align: center; padding: 40px 0; }
.error-404 .code { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--accent); line-height: 1; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: none; }
  .footer-main { grid-template-columns: 1fr 1fr; }

  /* Mobile nav */
  .nav-toggle { display: grid; place-items: center; }
  #main-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(360px, 88vw);
    height: 100vh;
    background: var(--bg-2);
    border-left: 1px solid var(--line);
    padding: 100px 28px 40px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    overflow-y: auto;
    z-index: 999;
  }
  #main-nav.open { transform: none; }
  #main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  #main-nav > ul > li > a { padding: 14px 10px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  #main-nav .sub-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent;
    padding: 0 0 8px 16px;
    display: none;
  }
  li.open-sub > .sub-menu { display: block; }
  .header-top { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .split, .prod-cat { grid-template-columns: 1fr; gap: 36px; }
  .prod-cat.reverse .prod-media { order: 0; }
  .prod-list { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 36px; }
  .page-hero { padding: 150px 0 64px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .cat-title h2 { white-space: normal; }
}
