/* ===================================
   INKWELL — style.css
   =================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #26658C;
  --primary-dark: #1E3A5F;
  --primary-light: #4DA8DA;
  --bg: #F4F7FA;
  --bg-2: #FFFFFF;
  --bg-3: #EDF1F7;
  --text: #1a2332;
  --text-2: #4a5568;
  --text-3: #8896a5;
  --border: rgba(38,101,140,0.12);
  --shadow: 0 4px 24px rgba(30,58,95,0.08);
  --shadow-lg: 0 12px 48px rgba(30,58,95,0.14);
  --shadow-xl: 0 24px 80px rgba(30,58,95,0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', sans-serif;
}

[data-theme="dark"] {
  --bg: #0d1b2a;
  --bg-2: #1a2840;
  --bg-3: #162035;
  --text: #e8edf5;
  --text-2: #a8b8cc;
  --text-3: #6a80a0;
  --border: rgba(77,168,218,0.1);
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
  --shadow-xl: 0 24px 80px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s, color 0.4s;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }
input, textarea, select { font-family: var(--font-body); }

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

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; box-shadow: 0 4px 20px rgba(38,101,140,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(38,101,140,0.45);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary); 
}
.btn-outline:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.btn-danger { background: #e53e3e; color: white; }
.btn-danger:hover { background: #c53030; transform: translateY(-2px); }
.btn-lg { padding: 15px 36px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.icon-btn {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 50%; width: 42px; height: 42px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition); color: var(--text);
}
.icon-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }

/* ---- Section Styles ---- */
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; background: linear-gradient(135deg, rgba(38,101,140,0.12), rgba(77,168,218,0.12));
  color: var(--primary); padding: 6px 18px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 16px;
  border: 1px solid rgba(38,101,140,0.2);
}
.section-title {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2; margin-bottom: 16px; color: var(--text);
}
.section-title span { color: var(--primary); }
.section-sub { color: var(--text-2); font-size: 1.05rem; max-width: 480px; margin: 0 auto; }

/* ---- Loading Screen ---- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700;
  color: white; margin-bottom: 32px; letter-spacing: -0.02em;
}
.loader-bar {
  width: 200px; height: 3px; background: rgba(255,255,255,0.2);
  border-radius: 2px; overflow: hidden; margin: 0 auto;
}
.loader-fill {
  height: 100%; width: 0%; background: white; border-radius: 2px;
  animation: loaderAnim 1.4s ease-out forwards;
}
@keyframes loaderAnim { to { width: 100%; } }

/* ---- Reading Progress ---- */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 9998;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  width: 0%; transition: width 0.1s;
}

/* ---- Toast ---- */
#toast-container {
  position: fixed; bottom: 32px; right: 32px; z-index: 9997;
  display: flex; flex-direction: column; gap: 12px;
}
.toast {
  background: var(--bg-2); color: var(--text); padding: 14px 22px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary); font-size: 0.9rem; font-weight: 500;
  animation: toastIn 0.4s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px; word-break: break-word;
}
.toast.success { border-color: #48bb78; }
.toast.error { border-color: #e53e3e; }
.toast.out { animation: toastOut 0.35s forwards; }
@keyframes toastIn { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: none; } }
@keyframes toastOut { to { opacity:0; transform: translateX(40px); } }

/* ---- Scroll Top ---- */
#scroll-top {
  position: fixed; bottom: 32px; left: 32px; z-index: 100;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; border: none; cursor: pointer; font-size: 1.1rem;
  box-shadow: var(--shadow); transition: var(--transition);
  opacity: 0; visibility: hidden; display: flex; align-items: center; justify-content: center;
}
#scroll-top.visible { opacity: 1; visibility: visible; }
#scroll-top:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---- NAVBAR ---- */
#navbar {
  position: sticky; top: 0; z-index: 500;
  background: rgba(244,247,250,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  transition: var(--transition), background 0.4s;
}
[data-theme="dark"] #navbar { background: rgba(13,27,42,0.85); }
#navbar.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--primary); letter-spacing: -0.02em; white-space: nowrap;
}
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-link {
  padding: 7px 14px; border-radius: 50px; font-size: 0.9rem; font-weight: 500;
  color: var(--text-2); transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary); background: rgba(38,101,140,0.1);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- HERO ---- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding: 100px 24px 60px;
  max-width: 1160px; margin: 0 auto; gap: 60px;
}
.hero-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%;
  background: linear-gradient(135deg, rgba(38,101,140,0.08), rgba(77,168,218,0.12));
  animation: shapePulse 8s ease-in-out infinite alternate;
}
.shape-1 { width: 600px; height: 600px; top: -200px; right: -100px; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; bottom: -100px; left: -80px; animation-delay: 2s; }
.shape-3 { width: 180px; height: 180px; top: 30%; left: 10%; animation-delay: 4s; opacity: 0.5; }
.shape-4 { width: 120px; height: 120px; bottom: 20%; right: 15%; animation-delay: 6s; opacity: 0.4; }
@keyframes shapePulse { from { transform: scale(1) rotate(0deg); } to { transform: scale(1.1) rotate(15deg); } }

.hero-content { flex: 1; min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(38,101,140,0.12), rgba(77,168,218,0.08));
  border: 1px solid rgba(38,101,140,0.25); color: var(--primary);
  padding: 8px 18px; border-radius: 50px; font-size: 0.82rem; font-weight: 600;
  margin-bottom: 24px; animation: fadeInUp 0.7s 0.3s both;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 800; line-height: 1.12; margin-bottom: 24px; color: var(--text);
  animation: fadeInUp 0.7s 0.5s both;
}
.hero-highlight { color: var(--primary); }
.cursor {
  display: inline-block; color: var(--primary-light);
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-subtitle {
  font-size: 1.05rem; color: var(--text-2); max-width: 480px;
  margin-bottom: 36px; animation: fadeInUp 0.7s 0.7s both;
}
.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px;
  animation: fadeInUp 0.7s 0.9s both;
}
.hero-stats {
  display: flex; align-items: center; gap: 24px;
  animation: fadeInUp 0.7s 1.1s both;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

.hero-visual {
  flex: 0 0 420px; position: relative; display: flex;
  align-items: center; justify-content: center;
  animation: fadeInRight 0.9s 0.6s both;
}
.hero-illustration { width: 100%; filter: drop-shadow(0 20px 40px rgba(38,101,140,0.15)); }
.hero-card-float {
  position: absolute; background: var(--bg-2);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-lg); font-size: 0.82rem;
  max-width: 180px; border: 1px solid var(--border);
}
.card-1 { top: 10%; left: -40px; animation: floatY 5s ease-in-out infinite; }
.card-2 { bottom: 15%; right: -30px; animation: floatY 5s ease-in-out infinite 2.5s; }
.float-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-light); margin-bottom: 8px; }
.float-icon { font-size: 1.2rem; margin-bottom: 6px; }
.hero-card-float p { color: var(--text); font-weight: 500; margin-bottom: 4px; }
.hero-card-float span { color: var(--text-3); font-size: 0.76rem; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes fadeInUp { from { opacity:0; transform: translateY(30px); } to { opacity:1; transform: none; } }
@keyframes fadeInRight { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: none; } }

/* ---- BLOG SECTION ---- */
.blogs-section { padding: 100px 0; }

.search-filter { margin-bottom: 48px; }
.search-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: 50px; overflow: hidden; margin-bottom: 20px;
  box-shadow: var(--shadow); transition: var(--transition);
}
.search-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(38,101,140,0.1); }
.search-icon { padding: 0 16px; font-size: 1rem; }
.search-wrap input {
  flex: 1; padding: 15px 0; border: none; background: none;
  font-size: 0.95rem; color: var(--text); outline: none;
}
.search-wrap input::placeholder { color: var(--text-3); }
.search-clear {
  padding: 8px 16px; background: none; border: none; cursor: pointer;
  color: var(--text-3); font-size: 0.9rem; transition: var(--transition);
}
.search-clear:hover { color: var(--primary); }

.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab {
  padding: 8px 18px; border-radius: 50px; font-size: 0.82rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--bg-2);
  color: var(--text-2); cursor: pointer; transition: var(--transition);
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* Blog Card */
.blog-card {
  background: var(--bg-2); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition);
  cursor: pointer; animation: cardIn 0.5s ease both;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(38,101,140,0.25);
}
@keyframes cardIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: none; } }

.card-image {
  aspect-ratio: 16/9; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.blog-card:hover .card-image img { transform: scale(1.06); }
.card-image-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.card-cat-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(38,101,140,0.9); color: white;
  padding: 4px 12px; border-radius: 50px; font-size: 0.72rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.card-body { padding: 24px; }
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card-author {
  display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-3);
}
.author-avatar {
  width: 28px; height: 28px; border-radius: 50%; 
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-date { font-size: 0.78rem; color: var(--text-3); }
.card-title {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin-bottom: 10px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-excerpt {
  font-size: 0.88rem; color: var(--text-2); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 20px;
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.card-tag {
  padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 500;
  background: rgba(38,101,140,0.1); color: var(--primary); border: 1px solid rgba(38,101,140,0.15);
}
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.read-more {
  font-size: 0.85rem; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 6px; transition: var(--transition);
}
.read-more:hover { gap: 10px; }
.card-actions { display: flex; gap: 8px; }
.card-action-btn {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--border);
  cursor: pointer; font-size: 0.85rem; transition: var(--transition); color: var(--text-2);
}
.card-action-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.card-action-btn.liked { background: rgba(229,62,62,0.12); color: #e53e3e; border-color: rgba(229,62,62,0.25); }
.like-count { font-size: 0.72rem; }

/* Empty State */
.empty-state {
  text-align: center; padding: 80px 24px; grid-column: 1/-1;
}
.empty-icon { font-size: 4rem; margin-bottom: 20px; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 12px; }
.empty-state p { color: var(--text-2); margin-bottom: 28px; }

/* ---- CATEGORIES ---- */
.categories-section {
  padding: 100px 0;
  background: var(--bg-3);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--bg-2); border-radius: var(--radius);
  padding: 28px 24px; border: 1px solid var(--border);
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
  text-align: center;
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(38,101,140,0.04), rgba(77,168,218,0.06));
}
.cat-icon { font-size: 2.2rem; margin-bottom: 14px; }
.cat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.cat-card p { font-size: 0.82rem; color: var(--text-2); margin-bottom: 12px; line-height: 1.5; }
.cat-count {
  font-size: 0.75rem; font-weight: 600; color: var(--primary);
  background: rgba(38,101,140,0.1); padding: 3px 12px; border-radius: 50px;
}

/* ---- ABOUT ---- */
.about-section { padding: 100px 0; }
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.about-text .section-title { text-align: left; }
.about-text p { color: var(--text-2); margin-bottom: 16px; }
.about-features { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.ab-feat {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 500;
}
.ab-feat span { color: var(--primary); }
.about-card {
  background: var(--bg-2); border-radius: var(--radius-lg);
  padding: 32px; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.about-card-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.about-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.about-card-header strong { display: block; font-size: 0.95rem; }
.about-card-header span { font-size: 0.8rem; color: var(--text-3); }
.about-card > p {
  font-size: 1.05rem; color: var(--text-2); font-style: italic;
  margin-bottom: 24px; line-height: 1.7; border-left: 3px solid var(--primary);
  padding-left: 16px;
}
.about-stats-row { display: flex; gap: 24px; }
.ab-stat { text-align: center; flex: 1; }
.ab-stat strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--primary); }
.ab-stat span { font-size: 0.78rem; color: var(--text-3); }

/* ---- CONTACT ---- */
.contact-section { padding: 100px 0; background: var(--bg-3); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--bg-2); padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.ci-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.contact-item p { font-size: 0.85rem; color: var(--text-2); }

.contact-form {
  background: var(--bg-2); padding: 36px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 0.9rem; outline: none;
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(38,101,140,0.1);
  background: var(--bg-2);
}
.contact-form .form-group { margin-bottom: 18px; }

/* ---- FOOTER ---- */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.85);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 48px; margin-bottom: 56px;
}
.footer-logo {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  color: white; margin-bottom: 16px;
}
.footer-brand p { font-size: 0.88rem; opacity: 0.7; line-height: 1.7; margin-bottom: 24px; }
.social-links { display: flex; gap: 10px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; transition: var(--transition);
}
.social-btn:hover { background: var(--primary-light); border-color: transparent; transform: translateY(-3px); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; color: white; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.85rem; opacity: 0.7; transition: var(--transition); }
.footer-col a:hover { opacity: 1; color: var(--primary-light); padding-left: 4px; }
.footer-newsletter p { font-size: 0.85rem; opacity: 0.7; margin-bottom: 14px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1; padding: 11px 16px; border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.08);
  color: white; font-size: 0.85rem; outline: none; font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input:focus { border-color: var(--primary-light); background: rgba(255,255,255,0.12); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; opacity: 0.6;
}

/* ---- MODALS ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(13,27,42,0.65);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-2); border-radius: var(--radius-lg);
  width: 100%; max-width: 680px; max-height: 90vh;
  overflow-y: auto; border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  transform: scale(0.92) translateY(24px);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 820px; }
.modal-sm { max-width: 440px; }
.modal-header {
  padding: 24px 28px; display: flex;
  align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--bg-2); z-index: 1;
}
.modal-header h2 { font-family: var(--font-display); font-size: 1.4rem; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--bg-3); cursor: pointer; font-size: 0.9rem;
  color: var(--text-2); transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #fee2e2; color: #e53e3e; }
.modal-body { padding: 28px; }
.modal-body .form-group { margin-bottom: 18px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; }

/* Blog Read View */
.read-cover {
  width: 100%; aspect-ratio: 16/7; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 28px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.read-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.read-cat {
  background: rgba(38,101,140,0.1); color: var(--primary);
  padding: 4px 14px; border-radius: 50px; font-size: 0.78rem; font-weight: 600;
}
.read-author { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); }
.read-date { font-size: 0.82rem; color: var(--text-3); margin-left: auto; }
.read-title {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 28px; color: var(--text);
}
.read-content {
  font-size: 1.02rem; color: var(--text-2); line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
}
.read-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.read-actions { display: flex; gap: 12px; margin-top: 24px; }

/* Char counter */
.char-counter { font-size: 0.75rem; color: var(--text-3); font-weight: 400; float: right; }

/* ---- Fade-in scroll ---- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(38,101,140,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero { flex-direction: column; min-height: auto; padding: 120px 24px 80px; text-align: center; }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-subtitle { text-align: center; }
  .hero-visual { flex: none; width: 100%; max-width: 380px; order: -1; }
  .hero-card-float.card-1 { left: 0; }
  .hero-card-float.card-2 { right: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .about-text .section-title { text-align: center; }
  .about-features { align-items: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 680px) {
  .nav-links { display: none; position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-2);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 12px 0; z-index: 499; }
  .nav-links.open { display: flex; animation: slideDown 0.3s ease; }
  @keyframes slideDown { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: none; } }
  .nav-link { padding: 12px 24px; border-radius: 0; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .hero-actions { justify-content: center; }
  .blog-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-overlay { padding: 12px; }
  .modal-body { padding: 20px; }
  #toast-container { right: 16px; bottom: 16px; }
  #scroll-top { left: 16px; bottom: 72px; }
}

@media (max-width: 400px) {
  .cat-grid { grid-template-columns: 1fr; }
}
