/* ============================================================
   BULGARIA BRIEF — Public Blog
   British x Bulgarian split design
   ============================================================ */

:root {
  /* UK flag palette */
  --uk-navy: #012169;
  --uk-red: #C8102E;
  --uk-white: #ffffff;

  /* Bulgarian flag palette */
  --bg-white: #ffffff;
  --bg-green: #00966E;
  --bg-red: #D62612;

  /* Shared UI */
  --ink: #1a1a2e;
  --ink-light: #3d3d5c;
  --muted: #6b7280;
  --surface: #ffffff;
  --surface-warm: #faf8f5;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Accent gradient */
  --grad-uk: linear-gradient(135deg, #012169 0%, #1a3a8a 100%);
  --grad-bg: linear-gradient(135deg, #00966E 0%, #00b37e 100%);
  --grad-hero: linear-gradient(135deg, #012169 0%, #00966E 100%);
  --grad-warm: linear-gradient(135deg, #C8102E 0%, #D62612 100%);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface-warm);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================================
   FLAG STRIPS — left (UK) and right (Bulgaria)
   ============================================================ */

.flag-strip {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 100;
  pointer-events: none;
}

.flag-strip--uk {
  left: 0;
  background:
    repeating-linear-gradient(
      0deg,
      #012169 0px, #012169 30px,
      #C8102E 30px, #C8102E 36px,
      #fff 36px, #fff 42px,
      #C8102E 42px, #C8102E 48px
    );
  border-right: 3px solid #C8102E;
}

.flag-strip--uk::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0px, transparent 14px,
      rgba(255,255,255,0.15) 14px, rgba(255,255,255,0.15) 16px
    );
}

.flag-strip--uk .flag-svg { display: none; }

.flag-strip--bg {
  right: 0;
  display: flex;
  flex-direction: column;
}

.bg-stripe {
  flex: 1;
}

.bg-stripe--white { background: #fff; border-left: 1px solid #e5e5e5; }
.bg-stripe--green { background: #00966E; }
.bg-stripe--red { background: #D62612; }

.flag-strip__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 24px;
  background: linear-gradient(to left, transparent, var(--surface-warm));
  pointer-events: none;
}

.flag-strip__fade--right {
  left: 0;
  right: auto;
  background: linear-gradient(to right, transparent, rgba(250, 248, 245, 0.4));
}

.rose-pattern {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 58px,
      rgba(255,255,255,0.12) 58px, rgba(255,255,255,0.12) 60px
    );
  pointer-events: none;
}

/* ============================================================
   LAYOUT WRAPPER — indent for flag strips
   ============================================================ */

.site-header,
.hero,
.categories-bar,
.content-area,
.editor-cta,
.about-section,
.newsletter-section,
.site-footer {
  margin-left: 48px;
  margin-right: 48px;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-flags {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-flag {
  display: block;
  width: 32px;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.mini-flag-svg { display: block; width: 100%; height: 100%; }

.logo-x {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.site-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.title-bulgaria { color: var(--bg-green); }
.title-dot { color: var(--uk-red); }
.title-brief { color: var(--uk-navy); }

.site-strapline {
  display: none;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--ink-light);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(1, 33, 105, 0.06);
  color: var(--uk-navy);
}

.nav-link.active {
  background: var(--uk-navy);
  color: #fff;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background:
    linear-gradient(135deg, rgba(1, 33, 105, 0.04) 0%, rgba(0, 150, 110, 0.04) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--grad-warm);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-light);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Badge */
.hero-badge { flex-shrink: 0; }

.badge-svg {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 8px 24px rgba(1, 33, 105, 0.2));
  animation: badge-float 6s ease-in-out infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--uk-navy);
  color: #fff;
  border-color: var(--uk-navy);
}

.btn--primary:hover {
  background: #1a3a8a;
  border-color: #1a3a8a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(1, 33, 105, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--outline:hover {
  border-color: var(--uk-navy);
  color: var(--uk-navy);
  transform: translateY(-2px);
}

.btn--deploy {
  background: var(--grad-bg);
  color: #fff;
  border-color: var(--bg-green);
}

.btn--deploy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 150, 110, 0.3);
}

.btn--large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-icon {
  font-size: 1.2em;
}

/* ============================================================
   CATEGORY PILLS
   ============================================================ */

.categories-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px;
  z-index: 40;
}

.categories-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories-inner::-webkit-scrollbar { display: none; }

.cat-pill {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-light);
  background: rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.cat-pill:hover {
  background: rgba(1, 33, 105, 0.08);
  color: var(--uk-navy);
}

.cat-pill--active {
  background: var(--uk-navy);
  color: #fff;
}

/* ============================================================
   ARTICLES
   ============================================================ */

.content-area {
  background: var(--surface-warm);
}

.content-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 28px 60px;
}

/* Featured */
.article-card--featured {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--uk-navy) 0%, var(--uk-red) 25%, #fff 50%, var(--bg-green) 75%, var(--bg-red) 100%);
}

.article-card--featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-badge {
  display: inline-block;
  background: var(--grad-warm);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.card-category {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg-green);
  margin-bottom: 10px;
}

.article-card--featured .card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--ink);
}

.card-standfirst {
  font-size: 1.05rem;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 720px;
}

.card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-author { font-weight: 600; color: var(--uk-navy); }

.card-glance {
  background: rgba(1, 33, 105, 0.04);
  border: 1px solid rgba(1, 33, 105, 0.1);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 18px;
}

.card-glance h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--uk-navy);
  margin-bottom: 10px;
}

.card-glance ul {
  list-style: none;
  padding: 0;
}

.card-glance li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 0.92rem;
  color: var(--ink-light);
  line-height: 1.5;
}

.card-glance li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-green);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--uk-navy);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.card-link:hover { gap: 12px; }

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-grid .article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.article-grid .article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--bg-green);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-grid .article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.article-grid .article-card:hover::before { opacity: 1; }

.article-grid .card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--ink);
}

.article-grid .card-standfirst {
  font-size: 0.9rem;
  flex: 1;
}

.article-grid .card-link {
  margin-top: auto;
  padding-top: 12px;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.about-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.about-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--surface-warm);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.about-card:hover { transform: translateY(-4px); }

.about-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.about-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--uk-navy);
}

.about-card p {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.6;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */

.newsletter-section {
  background:
    linear-gradient(135deg, rgba(1, 33, 105, 0.03) 0%, rgba(0, 150, 110, 0.03) 100%);
}

.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 64px 28px;
  text-align: center;
}

.newsletter-inner h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.newsletter-inner p {
  color: var(--ink-light);
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.newsletter-input {
  padding: 12px 20px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.95rem;
  width: 280px;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-input:focus {
  border-color: var(--uk-navy);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 28px 28px;
}

.footer-inner > * + * { margin-top: 32px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-flags {
  display: flex;
  gap: 8px;
}

.footer-flag-svg {
  width: 36px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.footer-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.footer-tagline {
  font-size: 0.85rem;
  opacity: 0.6;
}

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

.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.82rem;
  opacity: 0.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: repeat(2, 1fr); }
  .editor-inner { grid-template-columns: 1fr; }
  .editor-preview { display: none; }
}

@media (max-width: 768px) {
  .flag-strip { width: 28px; }
  .site-header,
  .hero,
  .categories-bar,
  .content-area,
  .editor-cta,
  .about-section,
  .newsletter-section,
  .site-footer { margin-left: 28px; margin-right: 28px; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 18px;
  }

  .site-nav {
    gap: 4px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar { display: none; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 40px 18px;
  }

  .hero-badge { display: none; }

  .article-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }

  .newsletter-form { flex-direction: column; align-items: center; }
  .newsletter-input { width: 100%; max-width: 320px; }
}

@media (max-width: 480px) {
  .flag-strip { width: 16px; }
  .site-header,
  .hero,
  .categories-bar,
  .content-area,
  .editor-cta,
  .about-section,
  .newsletter-section,
  .site-footer { margin-left: 16px; margin-right: 16px; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--surface-warm); }
::-webkit-scrollbar-thumb {
  background: rgba(1, 33, 105, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(1, 33, 105, 0.35); }

/* ============================================================
   SELECTION
   ============================================================ */

::selection {
  background: rgba(1, 33, 105, 0.15);
  color: var(--ink);
}
