/* ============================================
   PulseGrid Theme — Visual DNA from Electro
   ============================================
   Color strategy: vibrant orange primary (#F28B00)
   + deep red secondary (#E52400) on neutral whites/lights.
   Dense grid layout, border-based cards, pill buttons,
   geometric sans-serif typography.
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #F28B00;
  --primary-dark: #d97a00;
  --secondary: #E52400;
  --secondary-light: #ff4d2a;
  --dark: #1a1a2e;
  --dark-soft: #22223a;
  --text: #333340;
  --text-muted: #6c6c80;
  --light: #f5f5f8;
  --lighter: #fafafa;
  --white: #ffffff;
  --border: #e0e0e8;
  --border-light: #ececf0;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gap: 1.25rem;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--secondary); }

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

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

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

/* --- Skip Nav --- */
.skip-nav {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-nav:focus { left: 0; }

/* ============================================
   TOPBAR — thin utility strip (Electro DNA)
   ============================================ */
.topbar {
  background: var(--dark);
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  border-bottom: 2px solid var(--primary);
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a {
  color: rgba(255,255,255,0.7);
  transition: color 0.3s;
}
.topbar a:hover { color: var(--primary); }

/* ============================================
   HEADER / NAV — primary-colored nav bar
   ============================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-logo { height: 36px; width: auto; }
.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--primary); }

/* Desktop nav */
.main-nav { display: none; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}
.main-nav a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.main-nav a:hover {
  background: var(--light);
  color: var(--primary);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.3s;
}
.hamburger:hover { border-color: var(--primary); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover {
  background: var(--light);
  color: var(--primary);
}

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

/* ============================================
   HERO — split layout (Electro carousel DNA)
   ============================================ */
.hero {
  background: var(--light);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
.hero-content { order: 1; }
.hero-label {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.hero-subtitle p { margin: 0; }
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.35s, transform 0.2s;
  text-decoration: none;
}
.btn-primary-pill {
  background: var(--primary);
  color: var(--white);
}
.btn-primary-pill:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-primary-pill svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.btn-outline-pill {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline-pill:hover {
  background: var(--primary);
  color: var(--white);
}

@media (min-width: 768px) {
  .hero { padding: 4rem 0; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { order: 0; }
  .hero h1 { font-size: 2.75rem; }
}

/* ============================================
   SERVICE BAR — horizontal icon strip (Electro DNA)
   ============================================ */
.service-bar {
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.service-bar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.service-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.service-item:nth-child(2n) { border-right: none; }
.service-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.service-icon svg { width: 22px; height: 22px; }
.service-item h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
  color: var(--dark);
}
.service-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .service-bar-grid { grid-template-columns: repeat(4, 1fr); }
  .service-item:nth-child(2n) { border-right: 1px solid var(--border); }
  .service-item:nth-child(4n) { border-right: none; }
  .service-item { border-bottom: none; }
}

/* ============================================
   SECTION SYSTEM
   ============================================ */
.section {
  padding: 3rem 0;
}
.section--light { background: var(--light); }
.section--white { background: var(--white); }
.section--dark {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
}
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.section-title {
  font-size: 1.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  margin-top: 0.5rem;
}
.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
}
.section-link:hover {
  background: var(--primary);
  color: var(--white);
}

@media (min-width: 768px) {
  .section { padding: 4rem 0; }
  .section-title { font-size: 1.75rem; }
}

/* ============================================
   TOPIC CARDS — border-based (Electro card DNA)
   ============================================ */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
.topic-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--white);
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-radius: 10px 0 0 10px;
  transform: scaleY(0);
  transition: transform 0.35s;
  transform-origin: bottom;
}
.topic-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.topic-card:hover::before { transform: scaleY(1); }
.topic-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  padding-left: 0.5rem;
}
.topic-card .topic-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 0.5rem;
}
.topic-card .topic-desc p { margin: 0; }

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

/* ============================================
   POST CARDS — split mini-card layout (Electro mini-product DNA)
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
.post-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition: border-color 0.3s, transform 0.2s;
}
.post-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.post-card-inner {
  display: grid;
  grid-template-columns: 1fr;
}
.post-card--has-image .post-card-inner {
  grid-template-columns: 2fr 3fr;
}
.post-card-image {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
  min-height: 160px;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.post-card:hover .post-card-image img {
  transform: scale(1.08);
}
.post-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.post-card-title {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
.post-card-title a {
  color: var(--dark);
  text-decoration: none;
  transition: color 0.3s;
}
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.post-card-excerpt p { margin: 0; }
.post-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.3s;
}
.post-card-link:hover { gap: 0.6rem; color: var(--secondary); }
.post-card-link svg { width: 14px; height: 14px; fill: currentColor; }

@media (min-width: 768px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid .post-card:first-child {
    grid-column: 1 / -1;
  }
  .posts-grid .post-card:first-child .post-card-inner {
    grid-template-columns: 5fr 4fr;
  }
  .posts-grid .post-card:first-child .post-card-image {
    min-height: 260px;
  }
  .posts-grid .post-card:first-child .post-card-title {
    font-size: 1.35rem;
  }
}

/* ============================================
   BLOG INDEX — uniform list
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 600px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 992px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition: border-color 0.3s, transform 0.2s;
}
.blog-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.blog-card-image {
  overflow: hidden;
  height: 200px;
  border-bottom: 1px solid var(--border);
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.blog-card:hover .blog-card-image img { transform: scale(1.08); }
.blog-card-body { padding: 1.25rem; }
.blog-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}
.blog-card-title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.blog-card-title a {
  color: var(--dark);
  text-decoration: none;
  transition: color 0.3s;
}
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.blog-card-excerpt p { margin: 0; }

/* ============================================
   FAQ — expandable panels (Electro border style)
   ============================================ */
.faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.faq-item {
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--white);
}
.faq-item:first-child { border-radius: 10px 10px 0 0; }
.faq-item:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.2s, color 0.2s;
}
.faq-question:hover { background: var(--lighter); }
.faq-question:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.faq-question .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.faq-item.open .faq-question .faq-icon {
  background: var(--primary);
  color: var(--white);
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer-inner {
  padding: 0 1.5rem 1.25rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-answer-inner p { margin: 0 0 0.5rem; }
.faq-answer-inner p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .faq-list { max-width: 820px; }
}

/* ============================================
   PAGINATION — Electro-style inline blocks
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.pagination a:hover {
  background: var(--light);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ============================================
   SINGLE POST
   ============================================ */
.post-hero {
  background: var(--light);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.post-hero-inner { max-width: 780px; }
.post-hero .post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.post-hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.post-hero .post-excerpt {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.post-hero .post-excerpt p { margin: 0; }
.post-cover {
  margin: 2rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 780px;
}
.post-cover img { width: 100%; display: block; }

@media (min-width: 768px) {
  .post-hero { padding: 3.5rem 0; }
  .post-hero h1 { font-size: 2.5rem; }
}

/* ============================================
   ARTICLE CONTENT (page & post)
   ============================================ */
.article-content {
  max-width: 780px;
  padding: 2.5rem 0;
  font-size: 1rem;
  line-height: 1.8;
}
.article-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}
.article-content h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem;
}
.article-content p { margin: 0 0 1.25rem; }
.article-content ul, .article-content ol {
  margin: 0 0 1.25rem 1.5rem;
}
.article-content li { margin-bottom: 0.4rem; }
.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--light);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--text-muted);
}
.article-content img {
  border-radius: 10px;
  margin: 1.5rem 0;
}
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content a:hover { color: var(--secondary); }

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header-section {
  background: var(--light);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.page-header-section h1 { font-size: 2rem; }

@media (min-width: 768px) {
  .page-header-section { padding: 3.5rem 0; }
  .page-header-section h1 { font-size: 2.5rem; }
}

/* ============================================
   FOOTER — dark bg (Electro footer DNA)
   ============================================ */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 3.5rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .brand-name {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  display: block;
}
.footer-brand .brand-name span { color: var(--primary); }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}
.footer-nav h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color 0.3s, letter-spacing 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-nav a::before {
  content: '›';
  color: var(--primary);
  font-weight: 700;
}
.footer-nav a:hover {
  color: var(--primary);
  letter-spacing: 1px;
}
.footer-contact h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-contact a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}
.footer-contact a:hover { color: var(--primary); }
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.footer-contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.footer-contact-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.copyright-bar {
  background: var(--primary);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}

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

/* ============================================
   BACK TO TOP (Electro DNA)
   ============================================ */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}
.back-to-top.visible { display: flex; }
.back-to-top svg { width: 20px; height: 20px; fill: currentColor; }

/* ============================================
   UTILITIES
   ============================================ */
.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;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
