/* ==========================================================================
   Pratiche Auto Verbano — Modern Design System
   ========================================================================== */

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --primary: #1A365D;
  --primary-light: #2A4A7F;
  --primary-dark: #0F2240;
  --secondary: #E8F0F8;
  --accent: #F66035;
  --accent-hover: #E54E1B;
  --accent-glow: rgba(246, 96, 53, 0.35);
  --text-main: #2D3748;
  --text-light: #718096;
  --text-muted: #A0AEC0;
  --bg-white: #FFFFFF;
  --bg-off: #F7FAFC;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, .15);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, .25);
  --radius: 16px;
  --radius-lg: 24px;
  --transition: all .3s cubic-bezier(.4, 0, .2, 1);
  --max-w: 1200px;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  line-height: 1.7;
  background: var(--secondary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  line-height: 1.2;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  padding: .85rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
  padding: .6rem 5%;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.logo span {
  color: var(--accent);
}

/* Navigation */
.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-list a {
  font-weight: 500;
  font-size: .95rem;
  color: var(--text-main);
  position: relative;
  padding: .25rem 0;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s ease;
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.nav-list a:hover {
  color: var(--accent);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.4rem;
  background: var(--accent);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: var(--transition);
}

.header-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: white;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero Section ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 7rem 5% 4.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(246, 96, 53, .15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .05) 0%, transparent 50%);
  pointer-events: none;
}

.hero.hero-image {
  background-size: cover;
  background-position: center;
}

.hero.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 54, 93, .85) 0%, rgba(15, 34, 64, .75) 100%);
  pointer-events: none;
}

.hero>* {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: white;
  margin-bottom: 1.2rem;
  letter-spacing: -.5px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: .9;
  line-height: 1.7;
}

.hero-sub {
  padding: 4rem 5% 2.5rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 2.2rem;
  background: var(--accent);
  color: white;
  border: 2px solid transparent;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--accent-glow);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: none;
  color: white;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, .12);
  border-color: white;
  box-shadow: none;
  color: white;
}

.btn-small {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.3rem;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50px;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-small:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(26, 54, 93, .3);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 12px 28px rgba(26, 54, 93, .35);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── Stats / Trust Bar ────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: -3rem auto 0;
  padding: 0 5%;
  position: relative;
  z-index: 2;
}

.stat-card {
  background: var(--bg-white);
  padding: 1.8rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, .04);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: .85rem;
  color: var(--text-light);
  margin-top: .3rem;
}

/* ── Services Section ─────────────────────────────────────────────────────── */
.services {
  padding: 5rem 5%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: .8rem;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.service-card {
  background: var(--bg-white);
  padding: 2.2rem 1.8rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, .04);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  opacity: 0;
  transition: opacity .3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), #ff8a65);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.3rem;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 6px 15px var(--accent-glow);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: .6rem;
}

.service-card p {
  color: var(--text-light);
  font-size: .93rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* ── CTA Section ──────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 5rem 5%;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  right: -100px;
  top: -100px;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  color: white;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.cta-content p {
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* ── Content Section (Subpages) ───────────────────────────────────────────── */
.content-section {
  padding: 3.5rem 5%;
  background: var(--bg-white);
  max-width: 1000px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  line-height: 1.8;
}

.content-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section h3 {
  font-size: 1.25rem;
  margin-bottom: .8rem;
  margin-top: 1.5rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-main);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.history-card {
  background: var(--bg-off);
  padding: 2.5rem;
  border-radius: var(--radius);
  border-bottom: 4px solid var(--accent);
}

.history-card h3 {
  margin-top: 0;
}

.values-list {
  list-style: none;
  padding: 0;
}

.values-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.values-list li i {
  color: var(--accent);
  margin-top: .25rem;
  flex-shrink: 0;
}

/* Calendar Card */
.calendar-card {
  background: linear-gradient(135deg, var(--secondary), #dfeaf5);
  padding: 2.5rem;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 2rem;
  border-left: 5px solid var(--accent);
}

.calendar-card h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  margin-top: 0;
}

.calendar-item {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin: .5rem 0;
}

/* Info Boxes */
.info-box {
  margin-top: 2rem;
  padding: 1.8rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: var(--bg-white);
}

.info-box.alt {
  background: var(--bg-off);
  border: none;
}

.info-box h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  margin-top: 0;
}

/* Info Card */
.info-card {
  background: var(--bg-off);
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 5px solid var(--accent);
  margin-bottom: 2rem;
}

.info-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  margin-top: 0;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.info-grid .info-card {
  border-left: none;
  border: 1px solid #e2e8f0;
  background: var(--bg-white);
  transition: var(--transition);
}

.info-grid .info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.info-grid .info-card h3 {
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: .2rem;
}

.info-grid .info-card ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.info-grid .info-card li {
  margin-bottom: .5rem;
}

/* Highlight Box */
.highlight-box {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  border-left: 5px solid var(--primary);
}

/* Warning Box */
.warning-box {
  border: 2px solid #fc8181;
  background: #fff5f5;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

/* Tax Highlight */
.tax-highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 3rem;
}

.tax-highlight h2 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  margin-top: 0;
}

/* Service Box */
.service-box {
  background: var(--bg-white);
  border: 1px solid #e2e8f0;
  padding: 2.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  transition: var(--transition);
}

.service-box:hover {
  box-shadow: var(--shadow);
}

.service-box h2 {
  margin-top: 0;
}

.doc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-top: 1.5rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
}

.doc-item i {
  color: var(--accent);
}

/* Services List (categories page) */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
  margin-top: 2rem;
}

.service-category {
  background: var(--bg-white);
  border: 1px solid #e2e8f0;
  padding: 2rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.service-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-category h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: .5rem;
  margin-top: 0;
}

.service-category ul {
  list-style: none;
  padding: 0;
}

.service-category li {
  padding: .45rem 0;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .95rem;
}

.service-category li i {
  color: var(--accent);
  margin-top: .2rem;
}

.service-category.cta-card {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.service-category.cta-card h3 {
  color: white;
  border-color: var(--accent);
}

/* ── Contact Page ─────────────────────────────────────────────────────────── */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 3rem;
  padding: 3.5rem 5%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.contact-info h2 {
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.info-item i {
  font-size: 1.2rem;
  color: var(--accent);
  width: 48px;
  height: 48px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-item strong {
  display: block;
  margin-bottom: .15rem;
}

.info-item p {
  margin: 0;
  color: var(--text-light);
  font-size: .95rem;
}

.info-item a {
  color: var(--text-light);
}

.info-item a:hover {
  color: var(--accent);
}

.contact-form {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.contact-form h3 {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 500;
  font-size: .95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: .95rem;
  transition: var(--transition);
  background: var(--bg-off);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-white);
}

.form-group textarea {
  height: 140px;
  resize: vertical;
}

.map-container {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: none;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: white;
  padding: 4rem 5% 2rem;
  border-top: 4px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  position: relative;
  padding-bottom: .5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.footer-col p {
  opacity: .75;
  font-size: .9rem;
  margin-bottom: .4rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: .5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, .75);
  font-size: .9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: .3rem;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 1.5rem;
  opacity: .5;
  font-size: .85rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── WhatsApp Widget ──────────────────────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .4);
  z-index: 999;
  transition: var(--transition);
  color: white;
  font-size: 1.5rem;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, .5);
  color: white;
}

/* ── Back to Top ──────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
  font-size: 1rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ── Scroll Animations ────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    padding: .75rem 4%;
  }

  .hamburger {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100dvh;
    background: var(--bg-white);
    flex-direction: column;
    justify-content: center;
    gap: 1.8rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    transition: right .35s cubic-bezier(.4, 0, .2, 1);
  }

  .nav-list.open {
    right: 0;
  }

  .nav-list a {
    font-size: 1.15rem;
  }

  .header-cta {
    display: none;
  }

  .hero {
    padding: 5rem 4% 3rem;
  }

  .stats-bar {
    margin-top: -2rem;
    padding: 0 4%;
    grid-template-columns: 1fr 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .doc-list {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
    padding: 2rem 4%;
  }

  .services-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stats-bar {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}

/* ── Mobile Nav Overlay ───────────────────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Blog Grid & Cards ───────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 0;
}

.blog-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.blog-card-image {
  display: block;
  height: 200px;
  overflow: hidden;
  background: var(--bg-off);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--bg-off));
  color: var(--primary);
  font-size: 2.5rem;
  opacity: .4;
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  font-size: .8rem;
  color: var(--text-light);
  margin-bottom: .75rem;
}

.blog-card-meta i {
  color: var(--accent);
  margin-right: .25rem;
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0 0 .65rem;
  line-height: 1.35;
}

.blog-card-title a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.blog-card-title a:hover {
  color: var(--accent);
}

.blog-card-excerpt {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}

/* ── Single Post ─────────────────────────────────────────────────────────── */
.post-meta-hero {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: .9rem;
  opacity: .85;
}

.post-meta-hero i {
  margin-right: .3rem;
}

.single-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 5%;
}

.single-post-thumbnail {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.single-post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.single-post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.single-post-content h2 {
  margin-top: 2.5rem;
  color: var(--primary);
}

.single-post-content h3 {
  margin-top: 2rem;
  color: var(--primary);
}

.single-post-content p {
  margin-bottom: 1.2rem;
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.single-post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-off);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* Post Tags */
.single-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.single-post-tags>i {
  color: var(--text-light);
  font-size: .9rem;
}

.post-tag {
  display: inline-block;
  padding: .3rem .8rem;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.post-tag:hover {
  background: var(--accent);
  color: white;
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.post-nav-link {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-off);
  transition: var(--transition);
}

.post-nav-link:hover {
  background: var(--secondary);
}

.post-nav-link.next {
  text-align: right;
}

.post-nav-label {
  display: block;
  font-size: .75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .35rem;
}

.post-nav-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
}

.post-nav-link a:hover {
  color: var(--accent);
}

/* Related Posts */
.related-posts {
  background: var(--bg-off);
  padding: 3rem 5%;
}

.related-posts h2 {
  text-align: center;
  margin-bottom: 2rem;
}

/* Latest Posts (Homepage) */
.latest-posts {
  padding: 4rem 0 2rem;
  background: var(--bg-off);
}

/* Blog Pagination */
.blog-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: .4rem;
  padding-top: 2rem;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  border-radius: 8px;
  background: var(--bg-white);
  border: 1px solid #e2e8f0;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.blog-pagination .nav-links {
  display: flex;
  gap: .4rem;
}

/* No Posts */
.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

/* ── Blog Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-meta-hero {
    flex-direction: column;
    gap: .5rem;
    align-items: center;
  }
}