/*
Theme Name: Mihai NIȚUICĂ — Nova
Theme URI: https://mihainituica.ro
Author: Mihai NIȚUICĂ
Description: Temă modernă cu carduri stil macOS/Safari, mod zi (roz pudrat) și noapte. Design premium, minimalist și responsive.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: mn-nova
Tags: minimal, blog, dark-mode, modern, personal, responsive
*/

/* ============================================================
   FONTURI LOCALE
   Kinoble Medium — titluri
   Arial Nova Light — păstrat (disponibil dar neutilizat ca implicit)
   Myriad Pro Condensed — text
   ============================================================ */
@font-face {
  font-family: 'Kinoble';
  src: url('fonts/Kinoble-Medium.woff2') format('woff2'),
       url('fonts/Kinoble-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Arial Nova';
  src: url('fonts/ArialNova-Light.woff2') format('woff2'),
       url('fonts/ArialNova-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Myriad Pro';
  src: url('fonts/MyriadPro-Condensed.woff2') format('woff2'),
       url('fonts/MyriadPro-Condensed.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   CSS CUSTOM PROPERTIES — LIGHT (Rose Powder)
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-page:       #F2EEF0;
  --bg-card:       rgba(255,255,255,0.72);
  --bg-card-hover: rgba(255,255,255,0.90);
  --bg-header:     rgba(242,238,240,0.80);
  --bg-thumb:      #E8E2E5;
  --bg-tag:        rgba(185,130,155,0.12);
  --bg-views:      rgba(185,130,155,0.10);
  --bg-btn:        #C47FA0;

  /* Text */
  --txt-primary:   #1E1520;
  --txt-secondary: #7A6372;
  --txt-muted:     #A8929C;
  --txt-accent:    #B0537C;
  --txt-on-btn:    #FFFFFF;

  /* Borders */
  --border-card:   rgba(185,130,155,0.18);
  --border-chrome: rgba(185,130,155,0.22);
  --border-input:  rgba(185,130,155,0.30);
  --divide:        rgba(185,130,155,0.14);

  /* Shadows */
  --shadow-card:   0 2px 1px rgba(30,21,32,0.04), 0 8px 32px rgba(180,120,155,0.10), 0 1px 3px rgba(30,21,32,0.06);
  --shadow-card-h: 0 4px 2px rgba(30,21,32,0.04), 0 16px 48px rgba(180,120,155,0.16), 0 2px 6px rgba(30,21,32,0.06);
  --shadow-header: 0 1px 0 var(--border-chrome), 0 4px 24px rgba(180,120,155,0.08);

  /* macOS traffic light colors */
  --dot-red:    #FF5F57;
  --dot-yellow: #FEBC2E;
  --dot-green:  #28C840;

  /* Accent */
  --accent:       #C47FA0;
  --accent-light: rgba(196,127,160,0.15);
  --accent-glow:  rgba(196,127,160,0.25);

  /* Typography */
  --font-display: 'Kinoble', 'Arial Nova', sans-serif;
  --font-ui:      'Myriad Pro', 'Arial Narrow', sans-serif;

  /* Layout */
  --max-w:      760px;
  --max-w-wide: 1400px;
  --r-card:     14px;
  --r-sm:       8px;
  --r-pill:     100px;

  /* Transitions */
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --dur:   240ms;
  --dur-s: 160ms;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --bg-page:       #141118;
  --bg-card:       rgba(30,26,36,0.85);
  --bg-card-hover: rgba(38,33,46,0.95);
  --bg-header:     rgba(18,16,22,0.88);
  --bg-thumb:      #2A2535;
  --bg-tag:        rgba(140,100,165,0.14);
  --bg-views:      rgba(140,100,165,0.12);
  --bg-btn:        #8C64A5;

  --txt-primary:   #F0EBF5;
  --txt-secondary: #A897B8;
  --txt-muted:     #7A6B8A;
  --txt-accent:    #C49AE0;
  --txt-on-btn:    #FFFFFF;

  --border-card:   rgba(140,100,165,0.18);
  --border-chrome: rgba(140,100,165,0.20);
  --border-input:  rgba(140,100,165,0.28);
  --divide:        rgba(140,100,165,0.12);

  --shadow-card:   0 2px 1px rgba(0,0,0,0.20), 0 8px 32px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.18);
  --shadow-card-h: 0 4px 2px rgba(0,0,0,0.24), 0 16px 48px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.22);
  --shadow-header: 0 1px 0 var(--border-chrome), 0 4px 24px rgba(0,0,0,0.30);

  --accent:       #A87CC7;
  --accent-light: rgba(168,124,199,0.15);
  --accent-glow:  rgba(168,124,199,0.25);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(62px + 1.75rem);
  -webkit-text-size-adjust: 100%;
  font-size: 18px;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-page);
  color: var(--txt-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--dur-s) var(--ease);
}

a:hover { opacity: 0.75; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--txt-primary);
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p { color: var(--txt-secondary); line-height: 1.75; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-w-wide);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  position: relative;
  z-index: 1;
}
.container--narrow { max-width: var(--max-w); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: var(--bg-header);
  box-shadow: var(--shadow-header);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* Gradient de fade sub header — articolele par ca dispar lin, nu se lovesc */
.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 28px;
  background: linear-gradient(to bottom, var(--bg-page), transparent);
  pointer-events: none;
  z-index: 199;
}

.site-header__inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo group: logo + tagline */
.site-logo-group {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 1;
  min-width: 0;
}

/* Elementele de navigare și UI păstrează culoarea lor proprie, nu accentul global */
.site-logo,
.site-logo__name,
.site-nav__menu a,
.card-title a,
.widget-list a,
.post-nav__item,
.post-tag,
.back-to-top,
.site-footer__nav a,
.card-arrow {
  color: inherit;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  flex-shrink: 0;
}

.site-logo__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--txt-primary);
  line-height: 1;
  transition: color var(--dur) var(--ease);
}

.site-logo__dot {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}

/* Descriere lângă logo */
.site-tagline {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--txt-muted);
  letter-spacing: 0.01em;
  padding-left: 0.375rem;
  margin-left: 0.375rem;
  border-left: 1px solid var(--border-chrome);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  flex-shrink: 1;
}

@media (max-width: 760px) {
  .site-tagline { display: none; }
}

@media (min-width: 761px) {
  .site-tagline {
    font-size: 1.1rem;
  }

  .site-nav__menu a {
    font-size: 1.1rem !important;
  }

  .theme-toggle {
    font-size: 1.1rem !important;
  }

  .theme-toggle__icon {
    font-size: 1.1rem !important;
  }
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-right: 0.75rem;
}

.site-nav__menu a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--txt-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-pill);
  transition: color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
  letter-spacing: 0.01em;
}

.site-nav__menu a:hover,
.site-nav__menu a.current-menu-item {
  color: var(--txt-primary);
  background: var(--accent-light);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-chrome);
  background: transparent;
  color: var(--txt-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all var(--dur-s) var(--ease);
  white-space: nowrap;
  font-family: var(--font-ui);
}

.theme-toggle:hover {
  color: var(--txt-primary);
  background: var(--accent-light);
  border-color: var(--accent);
}

.theme-toggle__icon {
  font-size: 0.8125rem;
  line-height: 1;
  transition: transform 400ms var(--ease);
}

.theme-toggle:hover .theme-toggle__icon {
  transform: rotate(20deg);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  color: var(--txt-secondary);
  transition: background var(--dur-s) var(--ease);
}

.menu-toggle:hover { background: var(--accent-light); }

.menu-toggle__bar {
  position: relative;
  width: 18px;
  height: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle__bar span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-s) var(--ease);
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar span:nth-child(1) {
  transform: translateY(4.25px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar span:nth-child(3) {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
  padding: 1rem 0 1.25rem;
}

.page-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-hero__label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  border-radius: 1px;
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.875rem;
  max-width: 20ch;
}

.page-hero__title em {
  font-style: italic;
  color: var(--txt-accent);
}

.page-hero__desc {
  font-size: 0.9375rem;
  color: var(--txt-muted);
  max-width: 42ch;
  line-height: 1.65;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.site-main {
  padding-top: 1.75rem;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  position: relative;
  z-index: 1;
}

/* Pe pagina unui articol, eliminam padding-top ca hero-ul sa inceapa din colt */
.single-post-layout .site-main {
  padding-top: 0;
}

/* Spatiu tampon: articolele se opresc la distanta fata de header cand derulez */
.post-feed > .post-card:first-child {
  scroll-margin-top: calc(62px + 1.75rem);
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

/* ============================================================
   macOS SAFARI POST CARDS
   ============================================================ */
.post-feed { display: flex; flex-direction: column; gap: 1rem; }

/* The Card */
.post-card {
  background: var(--bg-card);
  border-radius: var(--r-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  overflow: hidden;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
  will-change: transform;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-h);
  background: var(--bg-card-hover);
  border-color: var(--accent-glow);
}

/* macOS Chrome Bar */
.card-chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--divide);
  background: rgba(255,255,255,0.04);
}

@media (min-width: 641px) {
  .card-chrome {
    padding: 0.35rem 1rem;
  }
}

[data-theme="dark"] .card-chrome {
  background: rgba(255,255,255,0.02);
}

.card-chrome__dots { display: none; }

.card-chrome__bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  background: none;
  height: auto;
  padding: 0;
  border-radius: 0;
}

.card-chrome__lock { display: none; }

.card-chrome__url {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--txt-secondary);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-chrome__views {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--txt-muted);
  background: var(--bg-views);
  padding: 0.15rem 0.55rem;
  border-radius: var(--r-pill);
  flex-shrink: 0;
  border: 1px solid var(--border-card);
}

.card-chrome__views svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Card Body */
.card-body {
  display: grid;
  grid-template-columns: 1fr 35%;
  gap: 0;
  min-height: 160px;
}

@media (min-width: 641px) {
  .card-body {
    max-height: none;
  }

  .card-title {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
}

.card-content {
  padding: 1.125rem 1.25rem 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Category + time row */
.card-meta-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
}

.card-cat {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
}

.card-reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--txt-muted);
}

.card-reading-time svg {
  width: 13px;
  height: 13px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Title */
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--txt-primary);
  margin-bottom: 0.625rem;
  transition: color var(--dur-s) var(--ease);
}

@media (min-width: 641px) {
  .card-title {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    -webkit-line-clamp: 3;
  }
}

.card-title a {
  color: inherit;
  display: block;
}

.post-card:hover .card-title { color: var(--txt-accent); }

/* Excerpt */
.card-excerpt {
  font-size: 1rem;
  color: var(--txt-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 0.875rem;
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divide);
}

.card-date-time {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.card-date {
  font-size: 1rem;
  font-weight: 500;
  color: var(--txt-secondary);
}

.card-date-sep {
  color: var(--txt-muted);
  font-weight: 400;
}

.card-time {
  font-size: 0.875rem;
  color: var(--txt-muted);
  font-variant-numeric: tabular-nums;
}

/* Pe desktop: data și ora pe același rând */
@media (min-width: 641px) {
  .card-date-time {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
  .card-time {
    font-size: 1rem;
  }
}
}

.card-arrow {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50% !important;
  border: 1.5px solid var(--border-card);
  color: var(--txt-muted);
  transition: background var(--dur-s) var(--ease),
              border-color var(--dur-s) var(--ease),
              color var(--dur-s) var(--ease),
              transform var(--dur-s) var(--ease);
  flex-shrink: 0;
  overflow: hidden;
}

.card-arrow svg {
  width: 13px;
  height: 13px;
  transition: transform var(--dur-s) var(--ease);
}

/* Hover direct pe săgeată */
.card-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.1);
}

/* Hover pe întregul card */
.post-card:hover .card-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.post-card:hover .card-arrow svg {
  transform: translateX(2px) translateY(-2px);
}

/* Card Thumbnail */
.card-thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-thumb);
  border-left: 1px solid var(--divide);
  max-height: 240px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: center center;
  transition: transform 600ms var(--ease);
}

.post-card:hover .card-thumb img {
  transform: scale(1.04);
}

.card-thumb__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb__placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.2;
  color: var(--txt-muted);
}

/* No thumbnail — full width content */
.post-card--no-thumb .card-body {
  grid-template-columns: 1fr;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: calc(62px + 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 62px - 3.5rem);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--r-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.sidebar-widget__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--divide);
}

.sidebar-widget__dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-widget__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.sidebar-widget__title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-muted);
  flex: 1;
  text-align: center;
}

.sidebar-widget__body {
  padding: 1rem 0.875rem;
}

.widget-list li {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--divide);
  gap: 0.625rem;
  font-size: 0.875rem;
}

.widget-list li:last-child { border-bottom: none; }

.widget-list a {
  color: var(--txt-secondary);
  flex: 1;
  transition: color var(--dur-s) var(--ease);
  font-size: 0.875rem;
  line-height: 1.3;
}

.widget-list a:hover { color: var(--txt-accent); }

.widget-count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--txt-muted);
  background: var(--bg-tag);
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}

/* Search in sidebar */
.sidebar-search {
  display: flex;
  gap: 0.5rem;
}

.sidebar-search input {
  flex: 1;
  background: var(--bg-thumb);
  border: 1px solid var(--border-input);
  border-radius: var(--r-pill);
  padding: 0.45rem 0.875rem;
  font-family: var(--font-ui);
  font-size: 16px; /* minim 16px — previne zoom-ul automat pe iOS Safari */
  color: var(--txt-primary);
  outline: none;
  transition: border-color var(--dur-s) var(--ease);
}

.sidebar-search input:focus {
  border-color: var(--accent);
}

.sidebar-search input::placeholder {
  color: var(--txt-muted);
}

.sidebar-search button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity var(--dur-s) var(--ease);
}

.sidebar-search button:hover { opacity: 0.85; }
.sidebar-search button svg { width: 14px; height: 14px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding-top: 2rem;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-ui);
  color: var(--txt-muted);
  border: 1px solid transparent;
  transition: all var(--dur-s) var(--ease);
  text-decoration: none;
}

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

.pagination .current {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
/* ── Hero imagine — copiat din Journal Blog ── */
.single-hero {
  position: relative;
  width: 100%;
  height: 700px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.single-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.single-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  width: 100%;
  max-width: 900px;
}

.single-hero__date {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  font-family: var(--font-ui);
  font-weight: 500;
  margin-bottom: 1rem;
}

.single-hero__title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin: 0;
}

@media (max-width: 640px) {
  .single-hero { height: 500px; }
  .single-hero__title { font-size: 2rem; }
}

/* Wrapper articol fara imagine */
.single-wrapper {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.single-header {
  padding: 2rem 0 1.75rem;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.single-views {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--txt-muted);
}

.single-views svg { width: 13px; height: 13px; opacity: 0.65; }

.single-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.single-title em { font-style: italic; color: var(--txt-accent); }

.single-byline {
  font-size: 0.8125rem;
  color: var(--txt-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.single-byline-sep { opacity: 0.4; }

.single-featured-image {
  border-radius: var(--r-card);
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
}

.single-featured-image img { width: 100%; display: block; }

/* Spatiu intre hero si continut */
.single-hero + .single-wrapper,
.single-body {
  padding-top: 2rem;
}

/* Post content */
.post-content {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--txt-secondary);
}

/* Textul rămâne aliniat stânga, doar elementele block (imagini, figure) se centrează */
.post-content figure,
.post-content .wp-block-image {
  text-align: center;
}

.post-content > * + * { margin-top: 1.5em; }

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  color: var(--txt-primary);
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 2em;
  margin-bottom: 0.5em;
  color: var(--txt-primary);
}

.post-content a {
  color: var(--txt-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity var(--dur-s) var(--ease);
}

.post-content a:hover { opacity: 0.75; }

.post-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin-inline: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--txt-muted);
  margin-block: 2rem;
}

.post-content ul { list-style: disc; padding-left: 1.5em; }
.post-content ol { list-style: decimal; padding-left: 1.5em; }
.post-content li { margin-bottom: 0.5em; }

.post-content code {
  font-size: 0.875em;
  background: var(--bg-thumb);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-family: monospace;
}

.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-sm);
  padding: 1.5rem;
  overflow-x: auto;
}

.post-content img {
  border-radius: var(--r-sm);
  height: auto;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
}

.post-content figure,
.post-content .wp-block-image,
.post-content .wp-caption,
.post-content .wp-block-image figure {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  max-width: 100% !important;
}

/* Caption-ul imaginii — centrat și italic */
.post-content figcaption,
.post-content .wp-caption-text,
.post-content .wp-element-caption {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--txt-muted);
  text-align: center !important;
  margin-top: 0.5rem;
  line-height: 1.5;
  display: block;
  width: 100%;
}

/* Previne orice element din continut sa depaseasca ecranul */
.post-content * {
  max-width: 100%;
}

.post-content p > img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Suprascrie float-urile Gutenberg */
.post-content .wp-block-image.alignleft,
.post-content .wp-block-image.alignright,
.post-content .wp-block-image.alignnone,
.post-content .wp-block-image.aligncenter,
.post-content .alignleft > img,
.post-content .alignright > img,
.post-content .alignnone > img {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--divide);
  margin-block: 2.5rem;
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divide);
}

.post-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--txt-muted);
  background: var(--bg-tag);
  padding: 0.3rem 0.875rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  transition: color var(--dur-s), background var(--dur-s), border-color var(--dur-s);
}

.post-tag:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent);
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--divide);
}

.comments-title {
  font-size: 1.125rem;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.comment-wrap {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--divide);
}

.comment-author { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.comment-date { font-size: 0.8125rem; color: var(--txt-muted); margin-bottom: 0.75rem; }
.comment-text { font-size: 0.9375rem; line-height: 1.7; }

/* Form */
label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--txt-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  background: var(--bg-thumb);
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  padding: 0.625rem 0.875rem;
  font-family: var(--font-ui);
  font-size: 16px; /* minim 16px — previne zoom-ul automat pe iOS Safari */
  color: var(--txt-primary);
  outline: none;
  transition: border-color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}

input:focus, textarea:focus { border-color: var(--accent); background: var(--bg-card); }
textarea { resize: vertical; min-height: 120px; }

input[type="submit"], .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  font: 0.875rem/1 var(--font-ui);
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  transition: opacity var(--dur-s), transform var(--dur-s);
  letter-spacing: 0.02em;
}

input[type="submit"]:hover, .btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ============================================================
   POST NAVIGATION (prev/next on single)
   ============================================================ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--divide);
}

.post-nav__item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  color: inherit;
}

.post-nav__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-h);
  border-color: var(--accent-glow);
}

.post-nav__thumb {
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: var(--bg-thumb);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-nav__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 500ms var(--ease);
}

.post-nav__item:hover .post-nav__thumb img {
  transform: scale(1.04);
}

.post-nav__body {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.post-nav__body--right {
  text-align: right;
}

.post-nav__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-muted);
  display: block;
}

.post-nav__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--txt-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   PAGE & 404
   ============================================================ */
.page-content { max-width: var(--max-w); margin-inline: auto; padding: 3rem clamp(1rem,4vw,2.5rem); }

.error-404 { text-align: center; padding: 5rem 0; }
.error-404__num {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 10rem);
  font-weight: 400;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 1rem;
  -webkit-text-stroke: 2px var(--accent);
}

.error-404__title { font-size: 1.5rem; margin-bottom: 0.875rem; }
.error-404__desc { color: var(--txt-muted); margin-bottom: 2rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-card);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.75rem 0;
  position: relative;
  z-index: 1;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--txt-muted);
}

.site-footer__copy a { color: var(--txt-accent); }

.site-footer__nav {
  display: flex;
  gap: 1.25rem;
}

.site-footer__nav a {
  font-size: 0.8125rem;
  color: var(--txt-muted);
  transition: color var(--dur-s) var(--ease);
}

.site-footer__nav a:hover { color: var(--txt-primary); }

/* ============================================================
   FLOATING CONTROLS
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt-muted);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all var(--dur) var(--ease);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.back-to-top svg { width: 16px; height: 16px; }

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, transparent));
  z-index: 9999;
  transition: width 60ms linear;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   SKIP LINK & ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

.skip-link:focus { top: 0.5rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-card {
  animation: fadeUp 400ms var(--ease) both;
}

/* Stagger delays applied via JS */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 640px) {
  /* Header devine mai înalt pe mobil cu tagline-ul pe al doilea rând */
  .site-header__inner {
    height: auto;
    padding-block: 0.625rem;
    flex-wrap: wrap;
    row-gap: 0;
  }

  .site-logo-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .site-tagline {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    font-size: 0.75rem;
  }

  .site-nav__menu { display: none; }
  .site-nav__menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 72px;
    inset-inline: 0;
    background: var(--bg-header);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-chrome);
    z-index: 199;
    gap: 0.25rem;
  }

  .site-nav__menu.is-open a {
    font-size: 1.125rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
  }

  .menu-toggle { display: flex; }

  /* Carduri pe mobil: poza deasupra, conținut jos */
  .card-body {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }
  .card-thumb { display: none; }
  .post-card.has-thumb .card-thumb {
    display: block;
    height: 200px;
    max-height: 200px;
    border-left: none;
    border-top: 1px solid var(--divide);
    order: -1;
  }

  /* Arată numele autorului pe mobil */
  .card-chrome__url { display: block; }

  .comment-form-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }

  /* Imagini și caption centrate pe mobil */
  .post-content figure,
  .post-content .wp-block-image,
  .post-content .wp-caption {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .post-content figcaption,
  .post-content .wp-caption-text,
  .post-content .wp-element-caption {
    font-style: italic !important;
    text-align: center !important;
    color: var(--txt-muted);
    font-size: 0.875rem;
  }

  .post-content img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 420px) {
  .theme-toggle span:not(.theme-toggle__icon) { display: none; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .sidebar, .back-to-top, .reading-progress { display: none; }
  body { background: white; color: black; }
  .post-card { box-shadow: none; border: 1px solid #ddd; }
}

/* Ascunde contorul afișat automat de pluginul Page Views Count (a3rev)
   — tema afișează deja vizualizările în bara de sus a cardului */
.pvc_stats,
p.pvc_stats,
.pvc-stats,
[class*="pvc_stats"],
[id*="pvc_stats"],
[class*="pvc-stats"],
[id*="pvc-stats"],
.pvc_stats_container,
.a3-pvc-stats {
  display: none !important;
}
