/* ==========================================================
   SENTINEL THEME — Visual DNA from CCTV/Security Template
   ==========================================================
   Color strategy: Dark blocks (#161616) on white, green accent
   Typography: Geometric sans-serif, bold display headings
   Layout DNA: Full-width split sections, numbered dark cards
   Distinctive: Accent bars, ghost numbers, pill buttons,
                split-screen edge-bleed, hover reveals
   ========================================================== */

/* --- CSS Reset & Variables --- */
:root {
  --primary: #65B530;
  --primary-dark: #4e9125;
  --dark: #161616;
  --dark-card: #1e1e1e;
  --light: #f5f5f5;
  --secondary: #9b9b9b;
  --white: #ffffff;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gap: 2rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.accent-bar {
  width: 60px;
  height: 2px;
  background: var(--primary);
  display: block;
}

.accent-bar--center {
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-top: 0.75rem;
}

.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;
}

/* --- Buttons (pill style from source) --- */
.btn {
  display: inline-block;
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.4s;
  text-align: center;
  line-height: 1.4;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn--dark {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

.btn--dark:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--ghost:hover {
  background: var(--primary);
  color: var(--white);
}

/* Arrow link — expanding hover from source */
.arrow-link {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: var(--primary);
  transition: all 0.3s;
}

.arrow-link::after {
  content: '→';
  margin-left: 0.5rem;
  transition: transform 0.3s;
}

.arrow-link:hover::after {
  transform: translateX(4px);
}

.arrow-link:hover {
  color: var(--primary-dark);
}

/* ===========================
   TOPBAR
   =========================== */
.topbar {
  background: var(--dark);
  color: var(--secondary);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a {
  color: var(--secondary);
  transition: color 0.3s;
}

.topbar a:hover {
  color: var(--primary);
}

.topbar__email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar__email svg {
  width: 14px;
  height: 14px;
  fill: var(--primary);
  flex-shrink: 0;
}

/* ===========================
   HEADER / NAVBAR
   =========================== */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo:hover {
  color: var(--primary);
}

/* Desktop Nav */
.main-nav {
  display: none;
  list-style: none;
  gap: 0;
  align-items: center;
}

.main-nav li a {
  display: block;
  padding: 1.5rem 1rem;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s;
}

.main-nav li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s;
}

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

.main-nav li a:hover::after {
  transform: scaleX(1);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--dark);
  transition: all 0.3s;
  border-radius: 2px;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  border-top: 1px solid #eee;
  z-index: 999;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  padding: 0.5rem 0;
}

.mobile-nav li a {
  display: block;
  padding: 0.875rem 1.25rem;
  color: var(--dark);
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav li a:hover {
  color: var(--primary);
  background: var(--light);
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
  .hamburger {
    display: none;
  }
}

/* ===========================
   HERO — Full-width dark overlay (source carousel style)
   =========================== */
.hero {
  background: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 480px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 1.25rem;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero__accent {
  width: 60px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero__subtitle p {
  margin: 0;
}

.hero__cta .btn {
  font-size: 1rem;
  padding: 0.875rem 2.25rem;
}

@media (min-width: 992px) {
  .hero__inner {
    min-height: 540px;
  }
  .hero__content {
    padding: 5rem 1.25rem;
  }
}

/* ===========================
   TOPICS — Dark numbered cards (source Facts/Services DNA)
   =========================== */
.topics-section {
  padding: 5rem 0;
}

.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.topic-card {
  background: var(--dark);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.topic-card:hover {
  transform: translateY(-4px);
}

.topic-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.topic-card__number {
  font-size: 4.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  user-select: none;
}

.topic-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(101,181,48,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topic-card__icon svg {
  width: 22px;
  height: 22px;
  fill: var(--primary);
}

.topic-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.topic-card__divider {
  width: 40px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 0.75rem;
}

.topic-card__desc {
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.topic-card__desc p {
  margin: 0;
}

@media (min-width: 600px) {
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .topics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===========================
   LATEST POSTS — Split-screen / edge-bleed feel
   =========================== */
.posts-section {
  background: var(--light);
  padding: 5rem 0;
}

.posts-section__header {
  margin-bottom: 2.5rem;
}

.posts-section__header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* Featured first post — split style */
.post-card {
  background: var(--white);
  overflow: hidden;
  transition: box-shadow 0.4s;
}

.post-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.post-card--featured {
  display: grid;
  grid-template-columns: 1fr;
}

.post-card__image {
  overflow: hidden;
  position: relative;
  min-height: 220px;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s;
}

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card__date {
  font-size: 0.8rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.post-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.post-card__title a {
  color: var(--dark);
  transition: color 0.3s;
}

.post-card__title a:hover {
  color: var(--primary);
}

.post-card__excerpt {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.post-card__excerpt p {
  margin: 0;
}

/* Side-by-side small posts */
.posts-grid--secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: #e8e8e8;
  margin-top: 1px;
}

.post-card--small {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--white);
}

.post-card--small .post-card__image {
  min-height: 180px;
}

.post-card--small .post-card__body {
  padding: 1.5rem;
}

.post-card--small .post-card__title {
  font-size: 1.05rem;
}

@media (min-width: 768px) {
  .post-card--featured {
    grid-template-columns: 1fr 1fr;
  }
  .post-card--featured .post-card__image {
    min-height: 340px;
  }
  .posts-grid--secondary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .posts-grid--secondary {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===========================
   FAQ — Clean editorial style (not accordion)
   =========================== */
.faq-section {
  padding: 5rem 0;
}

.faq-section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #e8e8e8;
}

.faq-item:first-child {
  border-top: 1px solid #e8e8e8;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--heading-font);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  transition: color 0.3s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

.faq-question__icon svg {
  width: 14px;
  height: 14px;
  fill: var(--dark);
  transition: transform 0.3s;
}

.faq-item.is-open .faq-question__icon {
  background: var(--primary);
}

.faq-item.is-open .faq-question__icon svg {
  fill: var(--white);
  transform: rotate(45deg);
}

.faq-item.is-open .faq-question {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-answer__inner {
  padding: 0 0 1.25rem 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-answer__inner p {
  margin: 0 0 0.5rem 0;
}

.faq-answer__inner p:last-child {
  margin-bottom: 0;
}

.faq-item.is-open .faq-answer {
  max-height: 600px;
}

/* ===========================
   FOOTER — Dark bg matching source
   =========================== */
.site-footer {
  background: var(--dark);
  color: var(--secondary);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-col__heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col__brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--secondary);
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav li a {
  color: var(--secondary);
  font-size: 0.9rem;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-nav li a::before {
  content: '›';
  font-size: 1.1rem;
  color: var(--primary);
}

.footer-nav li a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-contact a {
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  fill: var(--primary);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--secondary);
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
  }
}

/* ===========================
   PAGE TEMPLATE (about, etc.)
   =========================== */
.page-hero {
  background: linear-gradient(rgba(22,22,22,0.85), rgba(22,22,22,0.85));
  background-color: var(--dark);
  padding: 4rem 0;
  text-align: center;
}

.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--white);
}

.page-content {
  padding: 4rem 0;
}

.page-content__inner {
  max-width: 800px;
  margin: 0 auto;
}

.page-content__inner h1,
.page-content__inner h2,
.page-content__inner h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content__inner p {
  margin-bottom: 1rem;
}

.page-content__inner ul,
.page-content__inner ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content__inner img {
  border-radius: 2px;
  margin: 1.5rem 0;
}

.page-content__inner a {
  color: var(--primary);
  text-decoration: underline;
}

/* ===========================
   BLOG INDEX
   =========================== */
.blog-hero {
  background: var(--dark);
  padding: 3.5rem 0;
  text-align: center;
}

.blog-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--white);
}

.blog-listing {
  padding: 4rem 0;
  background: var(--light);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: #e0e0e0;
}

.blog-grid .post-card {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .blog-grid .post-card:first-child {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
  .blog-grid .post-card:first-child .post-card__image {
    min-height: 320px;
  }
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 2.5rem 0 0;
  list-style: none;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  background: var(--white);
  border: 1px solid #ddd;
  transition: all 0.3s;
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination a.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  pointer-events: none;
}

.pagination__arrow {
  font-weight: 600;
}

/* ===========================
   POST SINGLE
   =========================== */
.post-header {
  background: var(--dark);
  padding: 3.5rem 0 2.5rem;
}

.post-header__inner {
  max-width: 800px;
  margin: 0 auto;
}

.post-header__date {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.post-header__title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.post-header__excerpt {
  color: var(--secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-header__excerpt p {
  margin: 0;
}

.post-cover {
  max-width: 900px;
  margin: -2rem auto 0;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.post-cover img {
  width: 100%;
  display: block;
}

.post-body {
  padding: 3rem 0 4rem;
}

.post-body__inner {
  max-width: 800px;
  margin: 0 auto;
}

.post-body__inner h1,
.post-body__inner h2,
.post-body__inner h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body__inner p {
  margin-bottom: 1rem;
}

.post-body__inner ul,
.post-body__inner ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.post-body__inner img {
  margin: 1.5rem 0;
}

.post-body__inner a {
  color: var(--primary);
  text-decoration: underline;
}

.post-body__inner blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--light);
  font-style: italic;
  color: #555;
}

/* ===========================
   BACK TO TOP
   =========================== */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 90;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(101,181,48,0.3);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.back-to-top.is-visible {
  display: flex;
}

/* ===========================
   SKIP NAV
   =========================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  z-index: 10000;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* ===========================
   FOCUS STYLES
   =========================== */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
