/* ==========================================================================
   MULTILINGUAL MASTERY — Main Stylesheet
   ==========================================================================
   
   TABLE OF CONTENTS
   1. Fonts & Variables
   2. CSS Reset
   3. Base / Typography
   4. Utility Classes
   5. Header
   6. Footer
   7. Layout Patterns
      - Hero (60/40)
      - Subhero (40/60)
      - Colored Section + Grid
      - Split Section
      - Reviews Grid
   8. Responsive
   ========================================================================== */


/* ==========================================================================
   1. FONTS & VARIABLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

:root {
  /* Brand Colors */
  --color-primary:    #021238;   /* Navy — main brand, header border, headings */
  --color-accent:     #4da6ab;   /* Teal — CTAs, highlights, hover states */
  --color-accent-light: #e8f4f5; /* Teal tint — backgrounds, hover fills */
  --color-link:       #bd7773;   /* Dusty rose — body link color */
  --color-text:       #333;      /* Default body text */
  --color-muted:      #666;      /* Secondary text, captions */
  --color-border:     #e0e0e0;   /* Borders, dividers */
  --color-bg-light:   #f5f5f5;   /* Light section backgrounds */
  --color-white:      #fff;

  /* Typography */
  --font-body:    'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Merriweather', Georgia, serif;

  /* Layout */
  --max-width:      1320px;
  --content-width:  780px;       /* Comfortable reading width for article content */

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  3rem;
  --space-xl:  4rem;
  --space-section: max(6vh, 3rem);
}


/* ==========================================================================
   2. CSS RESET
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}


/* ==========================================================================
   3. BASE / TYPOGRAPHY
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  max-width: 75ch;
  margin-inline: auto;
  margin-bottom: 1rem;
  text-wrap: balance;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  text-decoration: underline;
  color: var(--color-accent);
}

ul, ol {
  list-style: none;
}

/* Article content — restore list styles inside post content */
.post-content ul,
.post-content ol {
  list-style: revert;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0 0;
}

button {
  font: inherit;
  cursor: pointer;
}

/* Entry title (post headings) */
.entry-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}


/* ==========================================================================
   4. UTILITY CLASSES
   ========================================================================== */

.text-center  { text-align: center; max-width: unset;}
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.text-white   { color: var(--color-white); }
.text-muted   { color: var(--color-muted); }

.mb-xl { margin-bottom: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-xs { margin-bottom: var(--space-xs); }

.mt-xl { margin-top: var(--space-xl); }
.mt-lg { margin-top: var(--space-lg); }
.mt-md { margin-top: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); }

.py-xl { padding-top: var(--space-xl);  padding-bottom: var(--space-xl); }
.py-lg { padding-top: var(--space-lg);  padding-bottom: var(--space-lg); }
.py-md { padding-top: var(--space-md);  padding-bottom: var(--space-md); }

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

/* Pill / tag */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-accent-light);
  color: var(--color-primary);
  border-radius: 20px;
  padding: 2px 10px;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}

.full-width img {
  margin: 2em auto;
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */

.site-header {
  background: var(--color-white);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.branding a {
  text-decoration: none;
}

.branding .logo {
  max-width: 200px;
  height: auto;
}

.tagline {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 4px;
}

/* Nav */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 7px 11px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover {
  background: var(--color-accent-light);
  color: var(--color-primary);
  text-decoration: none;
}

/* YouTube CTA button in nav */
.nav-youtube .youtube-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: var(--color-white) !important;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 0.15s;
}

.nav-youtube .youtube-btn:hover {
  background: var(--color-accent) !important;
  color: var(--color-white) !important;
  text-decoration: none;
}

/* Notice banner */
.notice-banner {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-sm);
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.notice-banner a {
  color: var(--color-white);
  text-decoration: underline;
}

.notice-banner p {
  margin: 0;
}

/* ── Contact Modal ───────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 18, 56, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay:target {
  display: flex;
}

.modal-box {
  position: relative;
  width: min(680px, 92vw);
  height: min(640px, 88vh);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(2, 18, 56, 0.35);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-navy);
  text-decoration: none;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--color-teal);
  color: #fff;
}


/* ==========================================================================
   6. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--color-bg-light);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.equity-statement {
  text-align: center;
  margin-bottom: var(--space-md);
}

.pride-flag {
  max-width: 300px;
  margin: 0 auto var(--space-sm);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}

.copyright {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer-nav ul {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}


/* ==========================================================================
   7. LAYOUT PATTERNS
   ========================================================================== */

/* ── Site content wrapper ── */
.site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) clamp(1rem, 4vw, 2rem);
}

/* ── Article / post content ── */
.post-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.post-content h2,
.post-content h3 {
  margin-top: var(--space-md);
}

.post-content iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  aspect-ratio: 500 / 272;
  height: auto;
  border-radius: 6px;
}

/* ── Hero: 60% text / 40% image ── */
.hero {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) 0;
}

.hero-image img {
  width: 100%;
  border-radius: 8px;
}

/* ── Subhero: 40% image / 60% text ── */
.subhero {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) 0;
}

.subhero-image img {
  width: 100%;
  border-radius: 8px;
}

/* ── Colored section + 4-up grid ── */
.section-colored {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-xl) clamp(1rem, 4vw, 2rem);
  box-shadow: 0 0 0 100vmax var(--color-primary);
  clip-path: inset(0 -100vmax);
}

.section-colored h1,
.section-colored h2,
.section-colored h3 {
  color: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.grid-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.grid-card {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-md);
  border-radius: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}

/* ── Split section: 50/50 with teal bg ── */
.section-split {
  background: var(--color-accent);
  color: var(--color-white);
  padding: var(--space-xl) clamp(1rem, 4vw, 2rem);
  box-shadow: 0 0 0 100vmax var(--color-accent);
clip-path: inset(0 -100vmax);
}

.section-split h1,
.section-split h2,
.section-split h3 {
  color: var(--color-white);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.split-image img {
  width: 100%;
  border-radius: 36px;
}

/* ── Reviews grid ── */
.reviews-section {
  padding: var(--space-xl) 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.review-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.review-card img {
  width: 100%;
}

.review-card-content {
  padding: var(--space-md);
}

/* ==========================================================================
   POST COMPONENTS
   ========================================================================== */

/* Featured image — top of post pages and app cards */
.featured-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: var(--space-md);
  display: block;
}

/* Affiliate disclaimer styling */
.affiliate-disclaimer {
  font-style: italic;
  font-size: .75rem;
}

/*Language List Styling*/
.language-list {
    column-count: 2;
    column-gap: 2rem;
}

.language-list:has(li:nth-child(16)) {
    column-count: 3;
}

.language-list li {
    break-inside: avoid;
}

/* Affiliate button — centered, styled as primary CTA */
.affiliate-btn {
  display: table;
  margin: var(--space-md) auto;
  padding: 12px 28px;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
}
.affiliate-btn a {
  color: #fff;
}
.affiliate-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}

/* Video comparison — two videos side by side, stacks on mobile */
.video-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.video-comparison iframe,
.video-comparison video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  border: none;
}

@media (max-width: 768px) {
  .video-comparison {
    grid-template-columns: 1fr;
  }
}

img.emoji {
  width: 1em;
  display: inline-block;
}


/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .grid-four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Header */
  .site-header {
    position: static; /* Unstick on mobile to save screen space */
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 4px;
  }

  .main-nav a {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
  }

  /* Layouts — stack on mobile */
  .hero,
  .subhero,
  .split-layout {
    grid-template-columns: 1fr;
  }

  /* Subhero: image above text on mobile */
  .subhero-image { order: 1; }
  .subhero-content { order: 2; }
}

@media (max-width: 576px) {
  .grid-four {
    grid-template-columns: 1fr;
  }
}