:root {
  --bg: #ffffff;
  --surface: #f4f6fb;
  --text: #1a1d21;
  --muted: #5d6b82;
  --accent: #2f6feb;
  --accent-dark: #1e4fc9;
  --header-bg: #101c33;
  --border: #e3e8f2;
  --radius: 14px;
}

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

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  color: #fff;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
}

.logo {
  justify-self: start;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo:hover {
  color: #bcd3fb;
}

.site-nav {
  justify-self: center;
  display: flex;
  gap: 0.3rem 1.1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  color: #d7e3f7;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-tag {
  justify-self: end;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fb4f5;
  white-space: nowrap;
}

/* Hero */
.hero {
  color: #fff;
  background-color: var(--header-bg);
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 3.5rem 0;
}

.hero h1 {
  font-size: clamp(1.6rem, 1.1rem + 3vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
  text-wrap: balance;
}

.hero .lead {
  font-size: clamp(0.95rem, 0.85rem + 1vw, 1.1rem);
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto 1.4rem;
}

.hero .btn {
  margin: 0.2rem;
}

/* Sections */
.section {
  padding: 2.8rem 0;
}

.section.alt {
  background: var(--surface);
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 1.6rem;
  max-width: 640px;
}

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}

.cat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.cat-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.cat-card .body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.cat-card h3 {
  font-size: 1.1rem;
}

.cat-card h3 a {
  color: var(--text);
}

.cat-card h3 a:hover {
  color: var(--accent);
}

.cat-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.cat-card .more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Post list */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.post-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.post-row img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
}

.post-row .body {
  padding: 1.1rem 1.2rem 1.1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-row h3 {
  font-size: 1.15rem;
  line-height: 1.35;
}

.post-row h3 a {
  color: var(--text);
}

.post-row h3 a:hover {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.excerpt {
  color: var(--muted);
  font-size: 0.93rem;
}

/* Article */
.article {
  max-width: 720px;
  padding: 2.5rem 0 3rem;
  font-size: 1.02rem;
}

.article h1 {
  font-size: clamp(1.5rem, 1.1rem + 2.5vw, 2rem);
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.article .lead {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
}

.article .cover {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.4rem 0;
  max-height: 380px;
  object-fit: cover;
}

.article h2 {
  font-size: 1.3rem;
  margin: 1.8rem 0 0.7rem;
  letter-spacing: -0.01em;
}

.article h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.6rem;
}

.article p,
.article li {
  color: #374151;
  margin-bottom: 1rem;
}

.article ul,
.article ol {
  margin-left: 1.4rem;
}

.article ul > li::marker {
  color: var(--accent);
}

.article blockquote {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.3rem 0;
  color: #374151;
  font-style: italic;
}

.article blockquote p:last-child {
  margin-bottom: 0;
}

.tips {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  margin: 1.3rem 0;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  color: #fff;
  font-size: 0.85rem;
  padding: 1.4rem 0.9rem 0.7rem;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  text-align: center;
  padding: 2.6rem 1.2rem;
  border-radius: var(--radius);
  margin: 0.5rem 0 3rem;
}

.cta h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.cta p {
  opacity: 0.92;
  margin-bottom: 1.2rem;
}

.btn {
  display: inline-block;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.btn:hover {
  background: #e8effe;
  color: var(--accent-dark);
}

.btn-green {
  background: var(--accent);
  color: #fff;
}

.btn-green:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Page head */
.page-head {
  padding: 2.6rem 0 0.6rem;
  text-align: center;
}

.page-head h1 {
  font-size: clamp(1.5rem, 1.1rem + 2.5vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.page-head p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
}

/* About */
.about {
  max-width: 660px;
  padding: 2.5rem 0 3rem;
}

.about h1 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.about p {
  color: #374151;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background: var(--header-bg);
  color: #aebdd6;
  margin-top: auto;
  padding: 1.8rem 0;
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.footer-inner nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.footer-inner a {
  color: #aebdd6;
}

.footer-inner a:hover {
  color: #fff;
}

/* Carduri-link rapide din hero (format tip blog de nișă) */
.link-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: left;
}

.link-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.link-card small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 0.2rem;
}

.link-card:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

/* Tablet */
@media (max-width: 900px) {
  .link-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-row {
    grid-template-columns: 220px 1fr;
  }
}

/* Smartphone */
@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.35rem;
    padding: 0.55rem 0;
  }
  .logo,
  .header-tag {
    justify-self: center;
  }
  .site-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    justify-content: flex-start;
    justify-content: safe center;
    scrollbar-width: none;
    padding: 0.2rem 0;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  .hero {
    padding: 2.4rem 0;
  }
  .cat-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .post-row {
    grid-template-columns: 1fr;
  }
  .post-row img {
    max-height: 200px;
  }
  .post-row .body {
    padding: 0 1.1rem 1.1rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .footer-inner nav {
    justify-content: center;
  }
}

/* Telefoane mici */
@media (max-width: 400px) {
  .site-nav a {
    font-size: 0.85rem;
  }
  .cta {
    padding: 2rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .cat-card {
    transition: none;
  }
}
