/* ============================================
   ClinFlow Blog — Styles
   ============================================ */

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

:root {
  --teal: #0D9488;
  --teal-dark: #0f766e;
  --teal-light: #F0FDFA;
  --amber: #F59E0B;
  --dark: #0F172A;
  --slate: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(13, 148, 136, 0.10);
  --shadow-lg: 0 8px 48px rgba(13, 148, 136, 0.18);
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text: #0F172A;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --nav-bg: rgba(255,255,255,.68);
  --nav-border: rgba(255,255,255,.62);
}

body.dark {
  --bg: #0F172A;
  --bg-soft: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --card-bg: #1e293b;
  --nav-bg: rgba(15,23,42,.82);
  --nav-border: rgba(51,65,85,.5);
  --shadow: 0 4px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- HEADER / NAV --- */
.site-header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1160px, calc(100% - 32px));
  z-index: 1000;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--nav-border);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(15,23,42,.14), inset 0 1px 0 rgba(255,255,255,.72);
  transition: background .3s, box-shadow .3s, border-color .3s;
}

.site-header.scrolled {
  background: rgba(255,255,255,.82);
  border-color: rgba(13,148,136,.20);
  box-shadow: 0 22px 64px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.76);
}

body.dark .site-header.scrolled {
  background: rgba(15,23,42,.88);
  border-color: rgba(51,65,85,.5);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
  padding: 0 4px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.logo span { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
}

.nav-links a:hover { color: var(--teal); background: var(--teal-light); }
.nav-links a.active { color: var(--teal); background: var(--teal-light); font-weight: 600; }

body.dark .nav-links a:hover { background: rgba(13,148,136,.15); }
body.dark .nav-links a.active { background: rgba(13,148,136,.2); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- LANGUAGE SWITCHER --- */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(13,148,136,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  flex-shrink: 0;
}

body.dark .language-switcher {
  background: rgba(30,41,59,.6);
  border-color: rgba(51,65,85,.4);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .02em;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .22s ease;
  min-width: 34px;
  text-align: center;
}

.lang-btn:hover { color: var(--teal); }

.lang-btn.active {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(13,148,136,.24);
}

/* --- THEME TOGGLE --- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(13,148,136,.18);
  background: rgba(255,255,255,.58);
  color: var(--slate);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .25s;
}

body.dark .theme-toggle {
  background: rgba(30,41,59,.6);
  border-color: rgba(51,65,85,.5);
  color: var(--teal);
}

.theme-toggle:hover {
  color: var(--teal);
  background: rgba(240,253,250,.78);
  transform: translateY(-1px);
}

.mobile-theme-toggle {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .25s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: white;
  box-shadow: 0 4px 14px rgba(245,158,11,.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,.45);
}

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 14px; }
.btn-full { width: 100%; justify-content: center; }

.btn-glass {
  background: rgba(255,255,255,.12);
  color: white;
  border: 1px solid rgba(255,255,255,.2);
}

.btn-glass:hover {
  background: rgba(255,255,255,.18);
}

/* --- HAMBURGER --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: rgba(255,255,255,.38);
  border-radius: 12px;
  transition: background .25s;
}

body.dark .hamburger { background: rgba(30,41,59,.5); }

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- MOBILE MENU --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1160px, calc(100% - 32px));
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(30px) saturate(185%);
  backdrop-filter: blur(30px) saturate(185%);
  border: 1px solid var(--nav-border);
  border-radius: 22px;
  padding: 14px 20px;
  box-shadow: 0 22px 64px rgba(15,23,42,.18);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transform: translateX(-50%) translateY(-16px) scale(.98);
  transition: opacity .28s, transform .32s cubic-bezier(.22,1,.36,1), max-height .35s;
}

.mobile-menu.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
  max-height: 80vh;
  transform: translateX(-50%) translateY(0) scale(1);
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--text);
  transition: color .2s;
}

.mobile-menu a:hover { color: var(--teal); }

.mobile-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* ============================================
   BLOG HERO
   ============================================ */
.blog-hero {
  padding: 130px 0 80px;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 40%, #0D9488 100%);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-circle {
  position: absolute;
  border-radius: 50%;
  opacity: .07;
  background: white;
}
.circle-one { width: 600px; height: 600px; top: -200px; right: -100px; }
.circle-two { width: 300px; height: 300px; bottom: -100px; left: -50px; }
.circle-three { width: 180px; height: 180px; top: 40%; left: 30%; }

.blog-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.blog-hero-content .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: 24px;
}

.hero-badge span {
  width: 7px;
  height: 7px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: white;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.blog-hero-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  max-width: 500px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px;
  padding: 10px 18px;
  max-width: 400px;
  backdrop-filter: blur(8px);
}

.hero-search i {
  color: rgba(255,255,255,.5);
  font-size: .9rem;
}

.hero-search input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: .9rem;
  width: 100%;
  font-family: inherit;
}

.hero-search input::placeholder { color: rgba(255,255,255,.4); }

/* --- FEATURED CARD --- */
.hero-featured-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
}

.featured-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.featured-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.featured-top span {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.6);
}

.hero-featured-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  line-height: 1.35;
  margin-bottom: 10px;
}

.hero-featured-card p {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  line-height: 1.65;
  margin-bottom: 20px;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-weight: 600;
  font-size: .9rem;
  transition: gap .25s;
}

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

/* ============================================
   BLOG CATEGORIES
   ============================================ */
.blog-categories {
  padding: 40px 0 24px;
  background: var(--bg-soft);
  transition: background .3s;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.category-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.category-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.category-btn.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* ============================================
   BLOG GRID
   ============================================ */
.blog-section {
  padding: 60px 0;
  background: var(--bg);
  transition: background .3s;
}

.section-heading {
  text-align: center;
  margin-bottom: 44px;
}

.section-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-light);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.section-heading p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.blog-card-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,.3);
}

.gradient-teal { background: linear-gradient(135deg, #0D9488, #0f172a); }
.gradient-green { background: linear-gradient(135deg, #25D366, #075e54); }
.gradient-amber { background: linear-gradient(135deg, #f97316, #0f172a); }
.gradient-blue { background: linear-gradient(135deg, #3b82f6, #0f172a); }
.gradient-purple { background: linear-gradient(135deg, #8b5cf6, #0f172a); }
.gradient-rose { background: linear-gradient(135deg, #e11d48, #0f172a); }

.blog-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.blog-meta span:first-child {
  color: var(--teal);
  background: var(--teal-light);
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.blog-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
}

.blog-card-body p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 600;
  font-size: .85rem;
  color: var(--teal);
  transition: gap .25s;
}

.blog-link:hover { gap: 10px; }

.no-results {
  display: none;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.no-results i {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: .4;
}

.no-results p {
  font-size: 1rem;
}

/* ============================================
   SEO BLOCK
   ============================================ */
.seo-block {
  padding: 60px 0;
  background: var(--bg-soft);
  transition: background .3s;
}

.seo-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.seo-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.seo-card p {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.seo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.seo-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--text);
}

.seo-list i {
  color: var(--teal);
  font-size: .9rem;
}

/* ============================================
   FAQ
   ============================================ */
.faq-section {
  padding: 60px 0;
  background: var(--bg);
  transition: background .3s;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item:hover { border-color: var(--teal); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--card-bg);
  border: none;
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .2s;
}

.faq-question i {
  font-size: .8rem;
  color: var(--text-muted);
  transition: transform .3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question i { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-item.open .faq-answer { max-height: 300px; }

.faq-answer p {
  padding: 0 22px 18px;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   CTA FINAL
   ============================================ */
.cta-final {
  padding: 80px 0;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  text-align: center;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.section-tag.light {
  background: rgba(255,255,255,.15);
  color: white;
}

.cta-inner h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 12px;
}

.cta-inner p {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--dark);
  padding: 24px 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  transition: color .2s;
}

.footer-links a:hover { color: var(--teal); }

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .blog-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .seo-card { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: block; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 110px 0 60px; min-height: auto; }
}

@media (max-width: 480px) {
  .hero-featured-card { padding: 24px; }
  .seo-card { padding: 20px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { justify-content: center; }
}
