/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:    #0f172a;
  --navy2:   #1e293b;
  --blue:    #2563eb;
  --blue-l:  #38bdf8;
  --orange:  #f97316;
  --green:   #10b981;
  --purple:  #8b5cf6;
  --red:     #ef4444;
  --amber:   #f59e0b;
  --cyan:    #06b6d4;
  --slate:   #64748b;
  --slate-l: #94a3b8;
  --border:  #e2e8f0;
  --bg:      #f8fafc;
  --white:   #ffffff;
  --surface: #f1f5f9;
  --text:    #1e293b;
  --text-m:  #475569;
  --muted:   #94a3b8;
  --radius:  10px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-l); }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ───────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ───────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 2rem;
}
.site-logo img { height: 40px; }
.site-logo { display: flex; align-items: center; }

/* ── Nav ──────────────────────────────────────────────── */
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  color: #94a3b8; font-size: .9rem; font-weight: 500;
  padding: .45rem .85rem; border-radius: 7px;
  transition: color .15s, background .15s;
}
.site-nav a:hover, .site-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-search { display: flex; align-items: center; gap: .5rem; }
.nav-search input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px; padding: .4rem .85rem; color: #fff; font-size: .875rem;
  width: 180px; outline: none; transition: border-color .15s;
}
.nav-search input:focus { border-color: var(--blue-l); }
.nav-search input::placeholder { color: #64748b; }

/* mobile toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #94a3b8; margin: 5px 0; border-radius: 2px; }

/* ── Category bar ─────────────────────────────────────── */
.cat-bar {
  background: var(--navy2); border-bottom: 1px solid rgba(255,255,255,.06);
}
.cat-bar-inner {
  display: flex; flex-wrap: wrap; gap: .4rem; padding: .55rem 0;
}
.cat-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .75rem; border-radius: 50px; font-size: .78rem; font-weight: 600;
  white-space: nowrap; color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.1);
  transition: all .15s;
}
.cat-pill:hover, .cat-pill.active { color: #fff; border-color: currentColor; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  padding: 4rem 0 3.5rem;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(37,99,235,.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; position: relative; }
.hero-label {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(56,189,248,.15); color: var(--blue-l);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .85rem; border-radius: 50px; border: 1px solid rgba(56,189,248,.25);
  margin-bottom: 1rem;
}
.hero-title {
  font-size: 2.5rem; font-weight: 800; line-height: 1.2;
  color: #fff; margin-bottom: 1rem;
}
.hero-excerpt { color: #94a3b8; font-size: 1.05rem; margin-bottom: 1.75rem; line-height: 1.7; }
.hero-meta { display: flex; align-items: center; gap: 1rem; color: #64748b; font-size: .85rem; }
.hero-meta .cat-badge { font-size: .75rem; }
.hero-img {
  border-radius: 16px; overflow: hidden;
  aspect-ratio: 16/9; background: var(--navy2);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: #1e3a5f; background: #1a2744;
}
.btn-read {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--blue); color: #fff; font-weight: 600; font-size: .95rem;
  padding: .65rem 1.5rem; border-radius: 8px;
  transition: background .15s, transform .1s;
}
.btn-read:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); }

/* ── Section ──────────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2rem; padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.section-title { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.section-title span { color: var(--blue); }
.section-link { font-size: .875rem; color: var(--slate); }
.section-link:hover { color: var(--blue); }

/* ── Article Cards ────────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.article-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-img {
  aspect-ratio: 16/9; overflow: hidden; background: #f1f5f9;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.article-card:hover .card-img img { transform: scale(1.04); }
.card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #cbd5e1; }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.cat-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .2rem .6rem; border-radius: 4px; color: #fff;
}
.card-date { font-size: .78rem; color: var(--slate-l); }
.card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.45; color: var(--text);
  margin-bottom: .6rem; flex: 1;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--blue); }
.card-excerpt { font-size: .875rem; color: var(--text-m); line-height: 1.6; margin-bottom: 1rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--slate-l); }
.read-time { display: flex; align-items: center; gap: .3rem; }

/* ── Sidebar layout ───────────────────────────────────── */
.content-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; }
.sidebar-widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.widget-title { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.widget-cat-list { list-style: none; }
.widget-cat-list li a { display: flex; align-items: center; justify-content: space-between; padding: .4rem 0; font-size: .9rem; color: var(--text-m); border-bottom: 1px solid #f1f5f9; }
.widget-cat-list li:last-child a { border-bottom: none; }
.widget-cat-list li a:hover { color: var(--blue); }
.widget-cat-count { background: var(--bg); font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 50px; color: var(--slate); }

/* ── Article page ─────────────────────────────────────── */
.article-header { padding: 3rem 0 2rem; background: var(--navy); }
.article-header-inner { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.article-title { font-size: 2.2rem; font-weight: 800; color: #fff; line-height: 1.25; margin: 1rem 0 .75rem; }
.article-subtitle { color: #94a3b8; font-size: 1.05rem; margin-bottom: 1.5rem; }
.article-meta-bar { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; color: #64748b; font-size: .875rem; }
.article-meta-bar span { display: flex; align-items: center; gap: .35rem; }
.article-cover { width: 100%; max-height: 480px; object-fit: cover; border-radius: 0 0 16px 16px; }
.article-body { padding: 2.5rem 0 4rem; }
.prose {
  font-size: 1.05rem; line-height: 1.85; color: var(--text);
  max-width: 860px; margin: 0 auto;
}
.prose h2 { font-size: 1.65rem; font-weight: 700; margin: 2rem 0 .75rem; color: var(--navy); }
.prose h3 { font-size: 1.3rem; font-weight: 600; margin: 1.5rem 0 .6rem; color: var(--navy); }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { padding-left: 1.75rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose blockquote { border-left: 4px solid var(--blue); padding: .75rem 1.25rem; background: #eff6ff; border-radius: 0 8px 8px 0; margin: 1.5rem 0; color: var(--text-m); }
.prose img { border-radius: 10px; margin: 1.5rem auto; box-shadow: var(--shadow); }
.prose a { color: var(--blue); text-decoration: underline; }
.prose code { background: #f1f5f9; padding: .15rem .4rem; border-radius: 4px; font-family: monospace; font-size: .9em; color: #7c3aed; }
.prose pre { background: #1e293b; color: #e2e8f0; padding: 1.25rem 1.5rem; border-radius: 10px; overflow-x: auto; margin: 1.5rem 0; font-size: .9rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th { background: #1e293b; color: #f8fafc; font-weight: 600; }
.prose th, .prose td { padding: .65rem 1rem; border: 1px solid var(--border); text-align: left; }
.prose iframe { border-radius: 10px; max-width: 100%; }

/* ── Gallery ──────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.gallery-card {
  border-radius: var(--radius); overflow: hidden; position: relative;
  aspect-ratio: 4/3; background: var(--navy2); cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.gallery-card:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 50%);
  display: flex; align-items: flex-end; padding: 1rem;
  opacity: 0; transition: opacity .2s;
}
.gallery-card:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-title { color: #fff; font-weight: 600; font-size: .95rem; }
.gallery-overlay-count { color: rgba(255,255,255,.7); font-size: .8rem; margin-top: .2rem; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.photo-item { aspect-ratio: 1; overflow: hidden; border-radius: 8px; cursor: pointer; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-item:hover img { transform: scale(1.06); }

/* ── Lightbox ─────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 0 60px rgba(0,0,0,.5); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 1.5rem;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 1.5rem;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover { background: rgba(255,255,255,.2); }

/* ── Pagination ───────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; }
.page-btn {
  width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 600; border: 1px solid var(--border); color: var(--text-m);
  transition: all .15s;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .825rem; color: var(--slate-l); padding: .85rem 0; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: #cbd5e1; }

/* ── Categories grid (homepage) ──────────────────────── */
.cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cat-card-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 1.1rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  transition: all .2s; text-decoration: none;
}
.cat-card-item:hover {
  border-color: var(--cat-color, #3b82f6);
  background: color-mix(in srgb, var(--cat-color, #3b82f6) 8%, var(--surface));
  transform: translateY(-2px);
}
.cat-card-icon {
  font-size: 1.6rem; line-height: 1;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cat-color, #3b82f6) 15%, transparent);
  flex-shrink: 0;
}
.cat-card-info { min-width: 0; }
.cat-card-name {
  font-size: .9rem; font-weight: 700; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-card-count { font-size: .75rem; color: var(--muted); margin-top: .1rem; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--navy); color: #64748b; padding: 3rem 0 1.5rem;
  margin-top: 4rem; border-top: 1px solid rgba(255,255,255,.05);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-logo { display: flex; align-items: center; margin-bottom: .75rem; }
.footer-logo img { height: 34px; }
.footer-desc { font-size: .875rem; line-height: 1.7; color: #475569; }
.footer-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin-bottom: .75rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { font-size: .875rem; color: #475569; }
.footer-links a:hover { color: #94a3b8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }
.footer-bottom a { color: #475569; }

/* ── EDU Plus Solutions promo card ───────────────────────── */
.edu-footer-card {
  display: block; margin-top: 2.25rem; padding: .875rem 1rem;
  background: rgba(255,255,255,.03); border-radius: 8px;
  border: 1px solid rgba(56,189,248,.2);
  text-decoration: none;
  animation: edu-border-pulse 4s ease-in-out infinite;
  transition: background .25s;
}
.edu-footer-card:hover { background: rgba(255,255,255,.06); }
.edu-footer-logo { height: 88px; display: block; margin-bottom: .6rem; opacity: .85; }
.edu-footer-text { font-size: .775rem; color: #64748b; line-height: 1.55; margin-bottom: .55rem; }
.edu-footer-link { font-size: .775rem; font-weight: 600; color: #38bdf8; opacity: .75; }
.edu-footer-card:hover .edu-footer-link { opacity: 1; }
@keyframes edu-border-pulse {
  0%, 100% { border-color: rgba(56,189,248,.22); }
  33%       { border-color: rgba(129,140,248,.32); }
  66%       { border-color: rgba(74,222,128,.24); }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .content-sidebar { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ── Comments ─────────────────────────────────────────── */
.comments-section { padding: 3rem 0; border-top: 2px solid var(--border); margin-top: 2rem; }
.comments-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 2rem; display: flex; align-items: center; gap: .6rem; }
.comment-item { display: flex; gap: 1rem; margin-bottom: 1.75rem; }
.comment-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--blue-l); flex-shrink: 0;
  border: 2px solid var(--border);
}
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .4rem; }
.comment-name { font-weight: 700; font-size: .95rem; color: var(--text); }
.comment-date { font-size: .78rem; color: var(--slate-l); }
.comment-text { font-size: .935rem; line-height: 1.7; color: var(--text-m); background: var(--bg); padding: .85rem 1rem; border-radius: 0 10px 10px 10px; border: 1px solid var(--border); }

.comment-form-wrap { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 1.75rem; margin-top: 2.5rem; }
.comment-form-title { font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "nume  email"
    "corp  corp"
    "captcha submit";
  gap: 1rem 1.25rem;
  align-items: end;
}
.cf-nume    { grid-area: nume; }
.cf-email   { grid-area: email; }
.cf-corp    { grid-area: corp; }
.cf-captcha { grid-area: captcha; }
.cf-submit  { grid-area: submit; display: flex; align-items: flex-end; justify-content: flex-end; }
.comment-field { display: flex; flex-direction: column; gap: .4rem; }
.comment-field label { font-size: .82rem; font-weight: 600; color: var(--slate); letter-spacing: .01em; }
.comment-field input, .comment-field textarea {
  width: 100%; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: 7px;
  font-size: .9rem; color: var(--text); background: var(--bg); outline: none;
  transition: border-color .15s, background .15s; font-family: inherit; box-sizing: border-box;
}
.comment-field input:focus, .comment-field textarea:focus { border-color: var(--blue); background: #fff; }
.comment-field textarea { resize: vertical; line-height: 1.65; min-height: 120px; }
@media (max-width: 600px) {
  .comment-form-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "nume" "email" "corp" "captcha" "submit";
  }
  .cf-submit { justify-content: stretch; }
  .cf-submit .comment-submit { width: 100%; justify-content: center; }
}
.captcha-wrap { display: flex; align-items: center; gap: .75rem; }
.captcha-question { background: var(--navy); color: var(--blue-l); font-family: monospace; font-size: 1.1rem; font-weight: 700; padding: .45rem 1rem; border-radius: 7px; white-space: nowrap; }
.captcha-wrap input { width: 80px !important; text-align: center; }
.comment-submit { display: inline-flex; align-items: center; gap: .5rem; background: var(--blue); color: #fff; font-weight: 600; font-size: .95rem; padding: .65rem 1.5rem; border-radius: 8px; border: none; cursor: pointer; transition: background .15s; }
.comment-submit:hover { background: #1d4ed8; }
.comment-msg { padding: .75rem 1rem; border-radius: 7px; font-size: .875rem; margin-bottom: 1rem; }
.comment-msg.ok  { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.comment-msg.err { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.no-comments { color: var(--slate-l); font-size: .925rem; padding: 1rem 0; }

/* ── Visit counter ────────────────────────────────────── */
.visit-counter { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--slate-l); }

@media (max-width: 680px) {
  .articles-grid { grid-template-columns: 1fr; }
  .cat-cards-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.75rem; }
  .hero { padding: 2.5rem 0; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); gap: 0; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.6rem; }
}
