/**
 * StylingCV Standard Page & Blog Templates
 * Version: 2026.02
 *
 * These templates provide consistent styling across all English pages and blog posts.
 * Based on the resume-templates page design pattern.
 *
 * Usage:
 * - Pages: Wrap content in <div class="scv-page">
 * - Blog Posts: Wrap content in <div class="scv-blog">
 *
 * Brand Colors:
 * - Teal Primary: #268599
 * - Coral Primary: #e8885e
 * - Navy Dark: #16344c
 * - Transitional: #618480
 * - Gradient: linear-gradient(135deg, #268599 0%, #618480 50%, #e8885e 100%)
 */

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
.scv-page *,
.scv-blog * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.scv-page,
.scv-blog {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: #1e293b;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

/* Light Hero (Default for Pages) */
.scv-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f7f7 50%, #fff5f2 100%);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 1.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid #e2e8f0;
}

/* Dark Hero (Alternative) */
.scv-hero--dark {
  background: linear-gradient(135deg, #16344c 0%, #1e4a5f 50%, #16344c 100%);
  border: none;
  position: relative;
  overflow: hidden;
}

.scv-hero--dark::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(38,133,153,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.scv-hero--dark h1,
.scv-hero--dark .scv-hero__title {
  color: #ffffff;
}

.scv-hero--dark .scv-hero__subtitle {
  color: rgba(255,255,255,0.85);
}

/* Hero Title */
.scv-hero__title,
.scv-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: #16344c;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* Hero Subtitle */
.scv-hero__subtitle {
  font-size: 1.15rem;
  color: #475569;
  max-width: 680px;
  margin: 0 auto 2rem;
}

/* Hero Stats Row */
.scv-hero__stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.scv-stat {
  background: #ffffff;
  padding: 1.25rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}

.scv-hero--dark .scv-stat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}

.scv-stat__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: #268599;
  display: block;
}

.scv-hero--dark .scv-stat__number {
  background: linear-gradient(135deg, #268599, #e8885e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.scv-stat__label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.scv-hero--dark .scv-stat__label {
  color: rgba(255,255,255,0.7);
}

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

/* Primary Button (Gradient) */
.scv-btn {
  display: inline-block;
  background: linear-gradient(135deg, #268599 0%, #618480 50%, #e8885e 100%);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.scv-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(38, 133, 153, 0.3);
  color: #ffffff;
}

/* Secondary Button (Outline) */
.scv-btn--outline {
  background: transparent;
  color: #268599;
  border: 2px solid #268599;
}

.scv-btn--outline:hover {
  background: #268599;
  color: #ffffff;
}

/* White Button (for dark backgrounds) */
.scv-btn--white {
  background: #ffffff;
  color: #268599;
}

.scv-btn--white:hover {
  background: #f0fdfa;
  box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}

/* ==========================================================================
   SECTION STRUCTURE
   ========================================================================== */
.scv-section {
  margin-bottom: 3rem;
}

/* Section Header (Centered) */
.scv-section__header {
  text-align: center;
  margin-bottom: 2rem;
}

.scv-section__badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(38,133,153,0.1);
  color: #268599;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.scv-section__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #16344c;
  margin-bottom: 0.5rem;
}

.scv-section__divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #268599, #e8885e);
  margin: 20px auto 0;
  border-radius: 2px;
}

.scv-section__desc {
  color: #475569;
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.05rem;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

/* Cards Grid */
.scv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.scv-cards--3col {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.scv-cards--4col {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Card */
.scv-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.scv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* Card Icon */
.scv-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(38,133,153,0.15), rgba(232,136,94,0.15));
}

.scv-card__icon--teal { background: rgba(38,133,153,0.15); }
.scv-card__icon--coral { background: rgba(232,136,94,0.15); }
.scv-card__icon--navy { background: rgba(22,52,76,0.15); }

/* Card Title */
.scv-card__title,
.scv-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #16344c;
  margin-bottom: 0.75rem;
}

/* Card Text */
.scv-card p {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Card Tag */
.scv-card__tag {
  display: inline-block;
  background: #f1f5f9;
  color: #334155;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.scv-card__tag strong { color: #268599; }

/* ==========================================================================
   FEATURE SECTION (ATS-style highlight)
   ========================================================================== */
.scv-feature {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f7f7 100%);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(38,133,153,0.2);
}

.scv-feature__title {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #16344c;
  margin-bottom: 0.5rem;
}

.scv-feature__subtitle {
  text-align: center;
  color: #475569;
  max-width: 650px;
  margin: 0 auto 2rem;
}

.scv-feature__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.scv-feature__item {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid rgba(38,133,153,0.15);
}

.scv-feature__check {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #268599, #618480);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: bold;
  flex-shrink: 0;
}

.scv-feature__item h4 {
  color: #16344c;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.scv-feature__item p {
  color: #475569;
  font-size: 0.9rem;
  margin: 0;
}

/* ==========================================================================
   STEPS
   ========================================================================== */
.scv-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.scv-step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  position: relative;
}

.scv-step__number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #268599, #e8885e);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.scv-step h4 {
  color: #16344c;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.scv-step p {
  color: #64748b;
  font-size: 0.9rem;
}

/* ==========================================================================
   CONTENT BLOCK (Long-form content)
   ========================================================================== */
.scv-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.scv-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #16344c;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.scv-content h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #268599;
  margin: 1.75rem 0 0.75rem;
}

.scv-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #16344c;
  margin: 1.5rem 0 0.5rem;
}

.scv-content p {
  color: #334155;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
}

.scv-content ul,
.scv-content ol {
  color: #334155;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.scv-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.scv-content strong { color: #16344c; }

.scv-content a {
  color: #268599;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.scv-content a:hover {
  border-bottom-color: #268599;
}

/* Quick Answer Block (for AEO/GEO) */
.scv-content__answer {
  background: linear-gradient(135deg, rgba(38,133,153,0.08), rgba(232,136,94,0.08));
  border-left: 4px solid #268599;
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: #16344c;
  line-height: 1.7;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.scv-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.scv-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.scv-table th {
  background: #16344c;
  color: #ffffff;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.scv-table td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.9rem;
}

.scv-table tr:last-child td { border-bottom: none; }
.scv-table tr:hover td { background: #f8fafc; }

.scv-table .rate-high { color: #268599; font-weight: 600; }
.scv-table .rate-med { color: #e8885e; font-weight: 600; }
.scv-table .rate-low { color: #dc2626; font-weight: 600; }

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.scv-faq {
  margin-top: 1.5rem;
}

.scv-faq__item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.scv-faq__question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: #16344c;
  font-size: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.scv-faq__answer {
  padding: 1.25rem 1.5rem;
  color: #475569;
  line-height: 1.7;
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.scv-cta {
  background: linear-gradient(135deg, #268599 0%, #618480 50%, #e8885e 100%);
  border-radius: 1.5rem;
  padding: 4rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

.scv-cta h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.scv-cta p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 2rem;
}

/* ==========================================================================
   TAGS & PILLS
   ========================================================================== */
.scv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scv-tag {
  background: rgba(38,133,153,0.1);
  color: #268599;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Quick Nav Pills */
.scv-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.scv-pill {
  display: inline-block;
  padding: 10px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 25px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.scv-pill:hover {
  background: #268599;
  color: #ffffff;
  border-color: #268599;
}

/* ==========================================================================
   COMPARISON / BEFORE-AFTER
   ========================================================================== */
.scv-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
}

.scv-comparison__before {
  padding: 2rem;
  background: #fef8f8;
  border-right: 1px solid #e5e5e5;
}

.scv-comparison__after {
  padding: 2rem;
  background: #f8fdf8;
}

.scv-comparison__label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.scv-comparison__before .scv-comparison__label {
  background: #fecaca;
  color: #dc2626;
}

.scv-comparison__after .scv-comparison__label {
  background: #bbf7d0;
  color: #16a34a;
}

/* ==========================================================================
   INDUSTRY/CATEGORY CARDS
   ========================================================================== */
.scv-industry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.scv-industry__card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  transition: border-color 0.2s;
}

.scv-industry__card:hover {
  border-color: #268599;
}

.scv-industry__top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.scv-industry__emoji { font-size: 1.35rem; }

.scv-industry__name {
  font-weight: 700;
  color: #16344c;
  font-size: 1rem;
}

.scv-industry__desc {
  color: #475569;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   BLOG POST SPECIFIC STYLES
   ========================================================================== */
.scv-blog .scv-hero {
  padding: 3rem 2rem;
  margin-bottom: 2rem;
}

.scv-blog .scv-hero__title {
  font-size: 2.5rem;
}

/* Blog Meta (date, author, reading time) */
.scv-blog__meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.scv-blog__meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

.scv-blog__meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

/* Table of Contents */
.scv-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.scv-toc__title {
  font-weight: 700;
  color: #16344c;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.scv-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.scv-toc__list li {
  margin-bottom: 0.5rem;
}

.scv-toc__list a {
  color: #268599;
  text-decoration: none;
  font-size: 0.95rem;
}

.scv-toc__list a:hover {
  text-decoration: underline;
}

/* Author Box */
.scv-author {
  display: flex;
  gap: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
  margin-top: 3rem;
}

.scv-author__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #268599, #e8885e);
  flex-shrink: 0;
}

.scv-author__name {
  font-weight: 700;
  color: #16344c;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.scv-author__title {
  color: #268599;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.scv-author__bio {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .scv-hero__title,
  .scv-hero h1 {
    font-size: 2rem;
  }

  .scv-hero {
    padding: 3rem 1.5rem;
  }

  .scv-hero__stats {
    gap: 1rem;
  }

  .scv-stat {
    padding: 1rem 1.25rem;
  }

  .scv-content {
    padding: 1.5rem;
  }

  .scv-section__title {
    font-size: 1.5rem;
  }

  .scv-cards {
    grid-template-columns: 1fr;
  }

  .scv-comparison {
    grid-template-columns: 1fr;
  }

  .scv-comparison__before {
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
  }

  .scv-author {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .scv-blog__meta {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.scv-text-center { text-align: center; }
.scv-text-teal { color: #268599; }
.scv-text-coral { color: #e8885e; }
.scv-text-navy { color: #16344c; }

.scv-mb-0 { margin-bottom: 0; }
.scv-mb-1 { margin-bottom: 1rem; }
.scv-mb-2 { margin-bottom: 2rem; }
.scv-mb-3 { margin-bottom: 3rem; }

.scv-mt-0 { margin-top: 0; }
.scv-mt-1 { margin-top: 1rem; }
.scv-mt-2 { margin-top: 2rem; }
.scv-mt-3 { margin-top: 3rem; }

/* Gradient Text */
.scv-gradient-text {
  background: linear-gradient(135deg, #268599 0%, #618480 50%, #e8885e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   RTL / ARABIC OVERRIDES
   ========================================================================== */
.scv-page[dir="rtl"],
.scv-blog[dir="rtl"] {
  font-family: '29LTZaridSansAL', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

.scv-page[dir="rtl"] .scv-hero h1,
.scv-page[dir="rtl"] .scv-hero__title,
.scv-page[dir="rtl"] .scv-section__title,
.scv-page[dir="rtl"] .scv-card h3,
.scv-page[dir="rtl"] .scv-card__title,
.scv-page[dir="rtl"] .scv-cta h2,
.scv-page[dir="rtl"] .scv-feature__title {
  font-family: '29LTZaridSansAL', 'Tajawal', Georgia, serif;
}

.scv-page[dir="rtl"] .scv-faq__question {
  font-family: '29LTZaridSansAL', 'Tajawal', sans-serif;
}

/* Hide empty <p> tags inserted by wpautop inside card grids */
.scv-cards > p:empty,
.scv-cards > p:not(:has(a.scv-card)) {
  display: none;
}

/* Card as link (hub pages) */
a.scv-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

a.scv-card::after {
  content: '\2190';
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  font-size: 1.25rem;
  color: #268599;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateX(8px);
}

.scv-page[dir="rtl"] a.scv-card::after {
  content: '\2192';
  left: auto;
  right: 1.5rem;
  transform: translateX(-8px);
}

a.scv-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

a.scv-card:hover h3 {
  color: #268599;
}

a.scv-card h3 {
  transition: color 0.2s;
}

a.scv-card p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
