/* Light Professional Blog Theme - Campbell Theme Redesign */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

html { color-scheme: light; }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------- */
/* Header / Navigation                 */
/* ---------------------------------- */
.gen-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--outline);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gen-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.gen-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: clamp(18px, 2vw, 20px);
}

.gen-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 60%, transparent);
}

.gen-menu {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.gen-menu-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.gen-link {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-weight: 600;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.gen-link:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* Mobile nav */
.gen-menu-toggle {
  display: none;
  border: 1px solid var(--outline);
  background: var(--panel);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
}

.gen-menu-toggle::-webkit-details-marker { display: none; }

.gen-menu-toggle .burger-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.gen-menu-toggle .burger {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  display: block;
}

@media (max-width: 900px) {
  .gen-menu-toggle { display: inline-flex; }
  .gen-menu {
    position: absolute;
    inset-inline: 0;
    top: 58px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--outline);
    padding: 10px 16px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform .18s ease;
  }
  .gen-header.is-open .gen-menu,
  .gen-menu-wrap[open] .gen-menu { transform: scaleY(1); }
}

/* ---------------------------------- */
/* Buttons / CTA                       */
/* ---------------------------------- */
.gen-cta,
.gen-hero-cta {
  display: inline-block;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: 1px solid color-mix(in srgb, var(--primary) 85%, transparent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 25%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  cursor: pointer;
}

.gen-cta:hover,
.gen-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent);
  filter: brightness(0.95);
}

.gen-hero-cta.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: none;
  font-weight: 700;
  text-transform: none;
}

.gen-hero-cta.ghost:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* ---------------------------------- */
/* Hero Section                        */
/* ---------------------------------- */
.gen-hero {
  border-bottom: 1px solid var(--outline);
  background: var(--panel);
}

.gen-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 28px);
  align-items: center;
  padding: clamp(28px, 4vw, 40px) 0 34px;
}

.gen-hero-banner-wrap {
  width: 100%;
  padding: 0 16px;
}

.gen-hero-banner {
  position: relative;
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.gen-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.45));
}

.gen-hero-banner img {
  width: 100%;
  height: clamp(320px, 40vw, 640px);
  object-fit: cover;
  object-position: center center;
}

.gen-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  z-index: 2;
  padding-bottom: clamp(18px, 3.5vw, 52px);
}

.gen-hero-title {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, var(--fs-h1));
  line-height: 1.08;
  color: var(--text);
  font-weight: 800;
}

.gen-hero-sub {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 18px);
  max-width: 70ch;
}

.gen-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gen-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.gen-badge {
  font-size: 12px;
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.gen-hero-overlay .gen-hero-copy {
  max-width: min(860px, 100%);
}

.gen-hero-overlay .gen-hero-title,
.gen-hero-overlay .gen-hero-sub {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.gen-hero-overlay .gen-hero-cta.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.16);
}

@media (max-width: 900px) {
  .gen-hero-banner-wrap { padding: 0 10px; }
  .gen-hero-overlay { padding-bottom: 20px; }
}

/* ---------------------------------- */
/* Trust Foldover                      */
/* ---------------------------------- */
.gen-trust {
  border-top: 1px solid var(--outline);
  border-bottom: 1px solid var(--outline);
  background: var(--bg);
}

.gen-trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.gen-trust-copy {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gen-trust-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.gen-trust-logos {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.gen-trust-logos img {
  height: 22px;
  width: auto;
  opacity: .9;
}

/* ---------------------------------- */
/* Main Content / Cards               */
/* ---------------------------------- */
.gen-main {
  padding: clamp(24px, 5vw, 56px) 0;
}

.gen-card {
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 28px) clamp(16px, 3vw, 24px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gen-card h1,
.gen-h1 {
  font-size: clamp(24px, 3.4vw, var(--fs-h2));
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 800;
}

.gen-card h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  margin: 18px 0 8px;
  color: var(--text);
  font-weight: 700;
}

.gen-card h3 {
  font-size: clamp(18px, 2vw, var(--fs-h3));
  margin: 14px 0 6px;
  color: var(--text);
  font-weight: 700;
}

.gen-card p {
  margin: 12px 0;
  max-width: 72ch;
  color: var(--text);
}

.gen-card a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.gen-card a:hover {
  text-decoration: underline;
}

/* ---------------------------------- */
/* Lists                               */
/* ---------------------------------- */
.gen-card ul,
.gen-card ol {
  list-style: none;
  padding-left: 0;
  margin: 16px 0;
  display: grid;
  gap: 12px;
}

.gen-card ul > li,
.gen-card ol > li {
  position: relative;
  padding: 14px 16px 14px 44px;
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  line-height: 1.7;
  color: var(--text);
}

.gen-card ul > li::before,
.gen-card ol > li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}

.gen-card li ul,
.gen-card li ol {
  margin-top: 10px;
}

.gen-card li ul > li,
.gen-card li ol > li {
  padding: 10px 12px 10px 36px;
  border-radius: 10px;
  background: #f0f2f5;
}

.gen-card li ul > li::before,
.gen-card li ol > li::before {
  width: 8px;
  height: 8px;
  left: 12px;
  box-shadow: none;
}

/* ---------------------------------- */
/* Feature Tiles / Blog Grid          */
/* ---------------------------------- */
.gen-features {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) { 
  .gen-features { 
    grid-template-columns: repeat(3, 1fr);
  } 
}

@media (max-width: 900px) { 
  .gen-features { 
    grid-template-columns: repeat(2, 1fr);
  } 
}

@media (max-width: 540px) { 
  .gen-features { 
    grid-template-columns: 1fr;
  } 
}

.gen-feature {
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.gen-feature h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
}

.gen-feature .muted {
  color: var(--muted);
}

.gen-feature:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 2%, transparent);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.12);
}

/* ---------------------------------- */
/* Footer & Language Pills             */
/* ---------------------------------- */
.gen-footer {
  border-top: 1px solid var(--outline);
  padding: 20px 0;
  background: var(--bg);
}

.gen-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* Lang pills */
.gen-lang {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}

.gen-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.gen-pill:hover {
  transform: translateY(-1px);
  background: #fff;
}

.gen-pill.active,
.gen-pill:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

/* ---------------------------------- */
/* Forms                               */
/* ---------------------------------- */
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
  outline: none;
}

/* Utilities */
.hidden { 
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}

/* ---------------------------------- */
/* Mobile Optimization                 */
/* ---------------------------------- */

/* Safe-area padding for iOS notches */
.gen-header,
.gen-footer,
.container {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Tappable targets */
a, button, .gen-link, .gen-cta, .gen-hero-cta, .gen-menu-toggle {
  min-height: 44px;
}

/* Hero mobile */
@media (max-width: 720px) {
  .gen-hero-inner { 
    grid-template-columns: 1fr; 
    gap: 16px; 
    padding: 20px 0 24px; 
  }
  .gen-hero-title { 
    font-size: clamp(26px, 7vw, 34px); 
    line-height: 1.15; 
  }
  .gen-hero-sub { 
    font-size: 15px; 
  }
  .gen-cta-row { 
    gap: 10px; 
  }
  .gen-hero-art img { 
    max-height: 280px; 
    border-radius: 14px; 
  }
}

/* Cards mobile */
@media (max-width: 720px) {
  .gen-main { 
    padding: 18px 0 32px; 
  }
  .gen-card { 
    padding: 16px 14px; 
    border-radius: 14px; 
  }
  .gen-card h1 { 
    font-size: clamp(20px, 6vw, 24px); 
  }
  .gen-card h2 { 
    font-size: 18px; 
  }
  .gen-card h3 { 
    font-size: 16px; 
  }
}

/* Lists mobile */
@media (max-width: 540px) {
  .gen-card ul, .gen-card ol { 
    gap: 10px; 
  }
  .gen-card ul > li, .gen-card ol > li {
    padding: 12px 12px 12px 40px;
    border-radius: 12px;
  }
  .gen-card ul > li::before, .gen-card ol > li::before {
    left: 14px;
    width: 10px;
    height: 10px;
  }
}

/* Features grid mobile */
@media (max-width: 540px) {
  .gen-features { 
    grid-template-columns: 1fr; 
  }
}

/* Footer mobile */
@media (max-width: 540px) {
  .gen-footer-inner { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 8px; 
  }
  .gen-lang { 
    right: max(12px, env(safe-area-inset-right)); 
    bottom: max(12px, env(safe-area-inset-bottom)); 
  }
}

/* Tables in content */
.gen-card .table-wrap { 
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch; 
}

.gen-card table { 
  width: 100%; 
  border-collapse: collapse; 
  min-width: 560px; 
}

.gen-card th, .gen-card td { 
  padding: 10px 12px; 
  border-bottom: 1px solid var(--outline); 
}

/* Additional spacing utilities */
.m-0 { margin: 0; }

/* ---------------------------------- */
/* Blog Posts Grid                     */
/* ---------------------------------- */
.blog-posts {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.post-card {
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  padding: 24px;
  background: var(--bg);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.post-card-content {
  display: flex;
  flex-direction: column;
}

.post-card-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.post-card-title a {
  color: var(--primary);
  text-decoration: none;
}

.post-card-title a:hover {
  text-decoration: underline;
}

.post-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.post-excerpt {
  color: var(--text);
  margin: 12px 0;
  line-height: 1.7;
  max-width: 70ch;
}

.read-more {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 8px;
  transition: transform .15s ease;
}

.read-more:hover {
  transform: translateX(4px);
  text-decoration: underline;
}

/* ---------------------------------- */
/* Recent Posts Section (Homepage)    */
/* ---------------------------------- */
.recent-posts-section {
  margin-top: 60px;
  padding-top: 60px;
  border-top: 1px solid var(--outline);
}

.recent-posts-section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin: 0 0 32px;
}

.recent-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .recent-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .recent-posts-grid {
    grid-template-columns: 1fr;
  }
  .recent-posts-section {
    margin-top: 40px;
    padding-top: 40px;
  }
  .recent-posts-section h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }
}

.recent-post-card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.recent-post-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.1);
}

.recent-post-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.recent-post-title a {
  color: var(--primary);
  text-decoration: none;
}

.recent-post-title a:hover {
  text-decoration: underline;
}

.recent-post-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.recent-post-excerpt {
  color: var(--text);
  margin: 12px 0;
  line-height: 1.6;
  font-size: 16px;
}

.recent-post-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-top: 8px;
  transition: transform .15s ease;
}

.recent-post-link:hover {
  transform: translateX(4px);
  text-decoration: underline;
}

/* Popup */
.gen-popup{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:60vw;
  max-height:80vh;
  z-index:1200;
  border:1px solid var(--outline);
  border-radius:12px;
  overflow:hidden;
  background:var(--bg);
  box-shadow:0 18px 45px rgba(0,0,0,.2);
}
.gen-popup-close{
  position:absolute;top:8px;right:8px;z-index:3;
  width:28px;height:28px;border:0;border-radius:999px;
  background:rgba(0,0,0,.45);color:#fff;cursor:pointer;
}
.gen-popup-media{position:relative}
.gen-popup-media img{width:100%;height:auto;max-height:80vh;object-fit:cover;display:block}
.gen-popup-overlay{
  position:absolute;inset:0;
  display:flex;flex-direction:column;justify-content:flex-end;gap:10px;
  padding:14px;
  background:linear-gradient(180deg,rgba(17,17,17,.2),rgba(17,17,17,.84));
}
.gen-popup-overlay p{margin:0;color:#fff;font-size:15px;line-height:1.35;text-shadow:0 2px 8px rgba(0,0,0,.72)}
.gen-popup-cta{
  display:inline-flex;align-items:center;justify-content:center;
  width:max-content;padding:9px 12px;border-radius:999px;
  text-decoration:none;font-weight:700;
  background:var(--primary);color:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.3);
}
.gen-popup-card{padding:14px;display:flex;flex-direction:column;justify-content:flex-end}
.gen-popup-card p{margin:0 0 10px;color:var(--text);font-size:15px}
