/*
Theme Name: Learn Spanish
Theme URI: https://learnspanish.co.il/
Author: Dlions
Author URI: https://dlions.co.il/
Description: תבנית פורטל ומגזין לימוד ספרדית מקצועית בהשראת עיתונות ומגזינים מובילים - מותאמת ללמידה, קורסים ומאמרים, עם עיצוב ספרדי יוקרתי, תפריטי וורדפרס מלאים, סרגל נגישות מובנה וקישורים בולטים.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: learnspanish
Domain Path: /languages
Tags: education, spanish, language-learning, news, magazine, rtl-language-support, custom-menu, featured-images, responsive-layout
*/

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700;800&family=Heebo:wght@400;500;700;800;900&display=swap');

:root {
  --primary: #b91c1c;             /* Spanish Crimson / Sangria */
  --primary-hover: #991b1b;
  --primary-light: #fef2f2;
  --secondary: #0f172a;           /* Deep Academic Slate */
  --secondary-light: #1e293b;
  --accent-gold: #d97706;          /* Spanish Gold / Amber */
  --accent-gold-light: #fef3c7;
  --accent-blue: #0066cc;          /* Mandatory Link Color */
  --accent-blue-hover: #004499;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 10px 25px rgba(15,23,42,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-heading: 'Heebo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Assistant', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1220px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------------------------------- *
 * Accessibility Utility Classes
 * ------------------------------------------------------------------------- */
body.a11y-font-large { font-size: 18px !important; }
body.a11y-font-xlarge { font-size: 20px !important; }
body.a11y-font-small { font-size: 14px !important; }

body.a11y-high-contrast {
  background-color: #000000 !important;
  color: #ffffff !important;
}
body.a11y-high-contrast * {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
}

body.a11y-invert {
  filter: invert(100%) hue-rotate(180deg);
}

body.a11y-grayscale {
  filter: grayscale(100%);
}

body.a11y-readable-font * {
  font-family: Arial, Tahoma, sans-serif !important;
}

body.a11y-highlight-links a {
  background-color: #ffeb3b !important;
  color: #000000 !important;
  text-decoration: underline !important;
  font-weight: 800 !important;
}

body.a11y-stop-anim * {
  animation: none !important;
  transition: none !important;
}

/* ------------------------------------------------------------------------- *
 * Header: Top Educational Utility + Spanish Academic Brand + Navigation
 * ------------------------------------------------------------------------- */
.site-header {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  position: relative;
  z-index: 100;
}

/* Spanish Academic Top Bar */
.top-study-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-study-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.study-badge {
  background: var(--accent-gold);
  color: #000;
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  margin-left: 8px;
}
.top-study-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-study-links a {
  color: #cbd5e1;
}
.top-study-links a:hover {
  color: #ffffff;
}

/* Main Brand Row */
.main-header-row {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-flag-badge {
  background: linear-gradient(135deg, var(--primary) 0%, #7f1d1d 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.4rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border-bottom: 4px solid var(--accent-gold);
  letter-spacing: -0.5px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-titles {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.brand-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Header Promotion Pill */
.header-academic-pill {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-right: 4px solid var(--accent-gold);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-academic-pill a {
  color: var(--primary);
  font-weight: 800;
}
.header-academic-pill a:hover {
  text-decoration: underline;
}

/* Daily Phrase Ticker (Spanish Word of the Day) */
.phrase-ticker-bar {
  background: #fffbeb;
  border-top: 1px solid #fef3c7;
  border-bottom: 1px solid #fde68a;
  display: flex;
  align-items: center;
}
.phrase-ticker-badge {
  background: var(--accent-gold);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.9rem;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.phrase-ticker-content {
  flex: 1;
  overflow: hidden;
  padding: 0 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #78350f;
  white-space: nowrap;
}
.phrase-ticker-content span.es-phrase {
  color: var(--primary);
  font-weight: 800;
  direction: ltr;
  display: inline-block;
}

/* Primary Navigation Menu (WordPress Native) */
.nav-wrap {
  background: var(--secondary);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-navigation {
  flex: 1;
}
.main-nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.main-nav-list > li > a {
  display: block;
  padding: 13px 18px;
  color: #f1f5f9;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.main-nav-list > li > a:hover,
.main-nav-list > li.current-menu-item > a,
.main-nav-list > li.current-menu-ancestor > a {
  background: rgba(255,255,255,0.06);
  border-bottom-color: var(--accent-gold);
  color: #fef08a;
}
.main-nav-list ul.sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  min-width: 230px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  display: none;
  z-index: 999;
  border-top: 3px solid var(--primary);
}
.main-nav-list li:hover > ul.sub-menu {
  display: block;
}
.main-nav-list ul.sub-menu li a {
  padding: 10px 16px;
  display: block;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-color);
}
.main-nav-list ul.sub-menu li a:hover {
  background: var(--primary-light);
  color: var(--primary);
  padding-right: 22px;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 10px;
}

/* Header Search Input */
.header-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.header-search-box input[type="search"] {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: #ffffff;
  padding: 6px 14px 6px 36px;
  font-size: 0.85rem;
  width: 170px;
  transition: all 0.3s;
  outline: none;
}
.header-search-box input[type="search"]::placeholder {
  color: #94a3b8;
}
.header-search-box input[type="search"]:focus {
  background: rgba(255,255,255,0.2);
  width: 220px;
  border-color: var(--accent-gold);
}
.header-search-box button {
  position: absolute;
  left: 10px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

/* ------------------------------------------------------------------------- *
 * Front Page: Academic Spanish Magazine Layout
 * ------------------------------------------------------------------------- */
.home-study-section {
  padding: 24px 0 44px;
}

/* Study Levels Fast Bar (Spanish Proficiency A1 to C2) */
.levels-banner {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.levels-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.levels-badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.level-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-main);
  transition: all 0.2s;
}
.level-pill:hover,
.level-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Section Title Headings */
.section-heading-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}
.section-heading {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--secondary);
  border-right: 5px solid var(--primary);
  padding-right: 12px;
  line-height: 1;
}
.section-sublink {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
}
.section-sublink:hover {
  text-decoration: underline;
}

/* Split Hero Grid: Lead Article + Side Study Lessons */
.hero-study-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 22px;
  margin-bottom: 34px;
}

.lead-study-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-color);
}
.lead-study-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.lead-study-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1e293b;
}
.lead-study-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.lead-study-card:hover .lead-study-thumb img {
  transform: scale(1.04);
}
.lead-study-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.lead-study-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lead-study-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.25;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.lead-study-card:hover .lead-study-title {
  color: var(--primary);
}
.lead-study-excerpt {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.study-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* Side Stacked Lessons */
.side-lessons-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-lesson-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}
.side-lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.side-lesson-thumb {
  width: 120px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #cbd5e1;
}
.side-lesson-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-lesson-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.side-lesson-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
}
.side-lesson-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.side-lesson-card:hover .side-lesson-title {
  color: var(--primary);
}

/* Magazine Cards Grid (3 Columns) */
.study-magazine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.study-mag-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}
.study-mag-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.study-mag-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #cbd5e1;
}
.study-mag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.study-mag-card:hover .study-mag-thumb img {
  transform: scale(1.05);
}
.study-mag-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.study-mag-badge {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.study-mag-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--secondary);
  margin-bottom: 8px;
}
.study-mag-card:hover .study-mag-title {
  color: var(--primary);
}
.study-mag-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.study-mag-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 2-Column Content Feed + Academic Sidebar */
.home-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

.latest-lessons-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.lesson-row-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}
.lesson-row-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.lesson-row-thumb {
  width: 200px;
  height: 130px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #cbd5e1;
}
.lesson-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lesson-row-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.lesson-row-cat {
  color: var(--accent-gold);
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.lesson-row-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.3;
  margin-bottom: 8px;
}
.lesson-row-card:hover .lesson-row-title {
  color: var(--primary);
}
.lesson-row-excerpt {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Sidebar Widgets */
.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.widget-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.widget-card-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--secondary);
  border-right: 4px solid var(--primary);
  padding-right: 10px;
  margin-bottom: 16px;
  line-height: 1;
}

/* Ranked Popular Guides (1, 2, 3...) */
.popular-study-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.popular-study-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.popular-study-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.rank-badge {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.popular-study-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--secondary);
}
.popular-study-title:hover {
  color: var(--primary);
}

/* Quick Daily Vocab / Flash Cards Widget */
.vocab-widget-box {
  background: linear-gradient(135deg, #fef2f2 0%, #fffbeb 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}
.vocab-word-es {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  direction: ltr;
  display: block;
}
.vocab-trans-he {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 4px;
}
.vocab-example {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  direction: ltr;
}

/* ------------------------------------------------------------------------- *
 * Category / Archive Template (Permanent Dedicated Category Design)
 * ------------------------------------------------------------------------- */
.category-page-header {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px;
  margin: 24px 0 28px;
  border-right: 6px solid var(--primary);
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.category-main-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--secondary);
  margin-bottom: 8px;
  line-height: 1.2;
}
.category-main-desc {
  font-size: 1.05rem;
  color: #475569;
  max-width: 800px;
  line-height: 1.6;
}
.category-stats-bar {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 36px 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.pagination .page-numbers:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ------------------------------------------------------------------------- *
 * Single Post Template:
 * CRITICAL REQUIREMENT: IN POST CONTENT, ALL ANCHOR LINKS MUST BE BLUE!
 * ------------------------------------------------------------------------- */
.single-article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 36px;
  margin: 24px 0 36px;
  border: 1px solid var(--border-color);
}

.breadcrumbs-trail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumbs-trail a {
  color: var(--text-main);
}
.breadcrumbs-trail a:hover {
  color: var(--primary);
}

.study-cat-pill {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.single-title {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.22;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.single-subtitle {
  font-size: 1.25rem;
  color: #475569;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 22px;
  border-right: 4px solid var(--accent-gold);
  padding-right: 14px;
}

.single-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.author-study-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-study-info img {
  border-radius: 50%;
  width: 44px;
  height: 44px;
  object-fit: cover;
}
.author-study-meta {
  display: flex;
  flex-direction: column;
}
.author-study-meta .author-title {
  font-weight: 800;
  color: var(--secondary);
  font-size: 0.95rem;
}
.author-study-meta .date-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.social-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  gap: 6px;
}
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-copy { background: #475569; }

.single-featured-thumb {
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.single-featured-thumb img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* ------------------------------------------------------------------------- *
 * MANDATORY REQUIREMENT: IN POST CONTENT, ALL ANCHOR TEXT MUST BE BLUE!
 * ------------------------------------------------------------------------- */
.entry-content,
.single-post-content,
.article-content {
  font-size: 1.15rem;
  line-height: 1.85;
  color: #1e293b;
}

.entry-content a,
.single-post-content a,
.article-content a,
.single-article-card .entry-content a {
  color: var(--accent-blue) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.entry-content a:hover,
.single-post-content a:hover,
.article-content a:hover,
.single-article-card .entry-content a:hover {
  color: var(--accent-blue-hover) !important;
  text-decoration: none !important;
  background-color: #ebf5ff;
  border-radius: 2px;
}

.entry-content a:visited,
.single-post-content a:visited,
.article-content a:visited {
  color: #0052a3 !important;
}

.entry-content p {
  margin-bottom: 1.5em;
}

.entry-content h2 {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--secondary);
  margin: 1.8em 0 0.8em;
  border-right: 4px solid var(--primary);
  padding-right: 12px;
  line-height: 1.3;
}

.entry-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 1.5em 0 0.6em;
}

.entry-content ul,
.entry-content ol {
  margin: 1.2em 0;
  padding-right: 28px;
}

.entry-content ul li {
  list-style: disc;
  margin-bottom: 0.6em;
}

.entry-content ol li {
  list-style: decimal;
  margin-bottom: 0.6em;
}

.entry-content blockquote {
  margin: 2em 0;
  padding: 16px 24px;
  background: #fffbeb;
  border-right: 5px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  color: #78350f;
  font-style: normal;
}

/* Post Tags */
.tags-collection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.tag-item {
  background: #f1f5f9;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}
.tag-item:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Author Box */
.author-card-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 32px 0;
}
.author-card-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.author-card-details h4 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--secondary);
  margin-bottom: 6px;
}
.author-card-details p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

/* Related Lessons Grid */
.related-lessons-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px solid var(--border-color);
}
.related-lessons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.related-lesson-card {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}
.related-lesson-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.related-lesson-thumb {
  height: 130px;
  background: #cbd5e1;
}
.related-lesson-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-lesson-body {
  padding: 12px;
}
.related-lesson-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.35;
}
.related-lesson-card:hover .related-lesson-title {
  color: var(--primary);
}

/* Comments Section */
.comments-section-wrap {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
}
.comment-form .submit {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.comment-form .submit:hover {
  background: var(--primary-hover);
}

/* ------------------------------------------------------------------------- *
 * Footer: Mandatory Links & Academic Spanish Portal Design
 * ------------------------------------------------------------------------- */
.site-footer {
  background: var(--secondary);
  color: #94a3b8;
  margin-top: 60px;
  border-top: 4px solid var(--accent-gold);
}

.footer-top {
  padding: 50px 0 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-grid-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 36px;
}
.footer-widget-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 18px;
  border-right: 3px solid var(--primary);
  padding-right: 10px;
  line-height: 1;
}
.footer-about-text {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 16px;
  color: #cbd5e1;
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav-list li a {
  color: #94a3b8;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.footer-nav-list li a:hover {
  color: #ffffff;
  padding-right: 6px;
}

.footer-partners-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-partners-group a {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-partners-group a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.footer-bottom {
  padding: 20px 0;
  background: #090d16;
  font-size: 0.85rem;
  color: #64748b;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal-links-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-legal-links-row a {
  color: #cbd5e1;
  font-weight: 600;
}
.footer-legal-links-row a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ------------------------------------------------------------------------- *
 * Floating Accessibility Toolbar
 * ------------------------------------------------------------------------- */
.a11y-floating-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  transition: transform 0.2s, background-color 0.2s;
}
.a11y-floating-trigger:hover {
  transform: scale(1.08);
  background: var(--primary-hover);
}
.a11y-floating-trigger svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.a11y-drawer-modal {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.25);
  z-index: 100000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--accent-gold);
}
.a11y-drawer-modal.active {
  right: 0;
}
.a11y-head {
  background: var(--secondary);
  color: #ffffff;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.a11y-head h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.a11y-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
}
.a11y-content {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.a11y-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--secondary);
  cursor: pointer;
  text-align: right;
  transition: all 0.2s;
}
.a11y-action-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.a11y-action-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.a11y-foot {
  padding: 16px 20px;
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.a11y-reset-all {
  background: #e2e8f0;
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  color: var(--text-main);
}
.a11y-reset-all:hover {
  background: #cbd5e1;
}
.a11y-statement-anchor {
  text-align: center;
  font-size: 0.85rem;
  color: var(--accent-blue);
  font-weight: 700;
  text-decoration: underline;
}

.a11y-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 99999;
  display: none;
}
.a11y-overlay.active {
  display: block;
}

/* ------------------------------------------------------------------------- *
 * Responsive Adjustments
 * ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-study-grid {
    grid-template-columns: 1fr;
  }
  .home-layout-grid {
    grid-template-columns: 1fr;
  }
  .study-magazine-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-study-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .main-header-row {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
  .header-academic-pill {
    display: none;
  }
  .mobile-toggle-btn {
    display: block;
  }
  .site-navigation {
    display: none;
    width: 100%;
  }
  .site-navigation.is-open {
    display: block;
  }
  .main-nav-list {
    flex-direction: column;
    align-items: stretch;
    background: #1e293b;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .main-nav-list > li > a {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 12px 20px;
  }
  .main-nav-list ul.sub-menu {
    position: static;
    box-shadow: none;
    background: #0f172a;
  }
  .study-magazine-grid {
    grid-template-columns: 1fr;
  }
  .lesson-row-card {
    flex-direction: column;
  }
  .lesson-row-thumb {
    width: 100%;
    height: 180px;
  }
  .single-title {
    font-size: 1.85rem;
  }
  .single-article-card {
    padding: 20px 16px;
  }
  .related-lessons-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-legal-links-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  .a11y-drawer-modal {
    width: 290px;
  }
}
