/**
 * The English Class — Main Global Theme Stylesheet
 * Primary Orange: #f25c27, Navy: #0e1738, Footer: #080e22, Peach: #fff7f2
 */

/* ========================================================
   CSS VARIABLES & GLOBAL RESETS
   ======================================================== */
:root {
  --primary-orange: #f25c27;
  --primary-hover: #ee4710;
  --primary-gradient: linear-gradient(135deg, #f25c27 0%, #ee4710 100%);
  --primary-glow: rgba(242, 92, 39, 0.35);
  --navy-dark: #0e1738;
  --navy-deep: #080e22;
  --navy-cta: #0f193d;
  --text-main: #1a2238;
  --text-muted: #64748b;
  --text-light: #8c9bb3;
  --peach-bg: #fff7f2;
  --peach-badge: #fdeee8;
  --peach-border: #fedacf;
  --card-gradient: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, #ffede4 100%);
  --card-border: rgba(242, 92, 39, 0.16);
  --border-light: #e5e8f0;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.site-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================================
   GLOBAL NAVBAR (EXACT FROM INDEX.PHP)
   ======================================================== */
.site-header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-main);
  padding: 10px 0;
  position: relative;
  transition: color 0.25s ease;
  display: inline-block;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--primary-orange);
}

.nav-link.active {
  color: var(--primary-orange);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-orange);
  border-radius: 2px;
}

/* Mobile Hamburger Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.mobile-menu-toggle:hover {
  color: var(--primary-orange);
  background: #fdf1ec;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: absolute;
  top: 76px;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 20px 24px 28px;
  z-index: 999;
}

.mobile-drawer.active {
  display: block;
  animation: navSlideDown 0.3s ease forwards;
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.mobile-nav-link {
  font-size: 15.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary-orange);
  background-color: #fdf1ec;
}

/* ========================================================
   GLOBAL FOOTER (EXACT FROM INDEX.PHP)
   ======================================================== */
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
  color: var(--text-light);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-copy {
  color: var(--text-light);
  font-size: 13.5px;
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: #b0bfd6;
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-orange);
}

/* ========================================================
   SUBPAGE HERO / BANNER
   ======================================================== */
.subpage-hero {
  background: linear-gradient(180deg, #ffffff 0%, #fffbf8 50%, #fff2eb 100%);
  padding: 44px 0 36px;
  text-align: center;
  border-bottom: 1px solid rgba(242, 92, 39, 0.08);
  position: relative;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--peach-badge);
  color: #63301d;
  border: 1px solid var(--peach-border);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(242, 92, 39, 0.06);
}

.subpage-title {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.subpage-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ========================================================
   SEARCH BAR COMPONENT
   ======================================================== */
.search-bar-wrap {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 580px;
  background: #ffffff;
  border: 2px solid #fedacf;
  border-radius: 50px;
  padding: 5px 6px 5px 20px;
  box-shadow: 0 4px 18px rgba(242, 92, 39, 0.08);
  transition: all 0.25s ease;
  position: relative;
}

.search-form:focus-within {
  border-color: var(--primary-orange);
  box-shadow: 0 6px 24px rgba(242, 92, 39, 0.18);
  transform: translateY(-1px);
}

.search-icon-prefix {
  color: #a0aec0;
  font-size: 16px;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: transparent;
  min-width: 0;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-clear-btn {
  color: #94a3b8;
  font-size: 14px;
  padding: 6px 10px;
  margin-right: 4px;
  text-decoration: none;
  border-radius: 50%;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  color: var(--primary-orange);
}

.search-submit-btn {
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(242, 92, 39, 0.28);
  flex-shrink: 0;
}

.search-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242, 92, 39, 0.4);
}

/* Search results info */
.results-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.results-count {
  font-weight: 600;
  color: var(--navy-dark);
}

.results-query-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fdeee8;
  color: #a43e18;
  padding: 3px 12px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 13.5px;
}

.results-reset-link {
  color: var(--primary-orange);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.results-reset-link:hover {
  text-decoration: underline;
}

/* ========================================================
   PAGINATION COMPONENT
   ======================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 60px;
  width: 100%;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.page-item {
  display: inline-block;
}

.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.page-button:hover:not(.disabled):not(.active) {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
  background: #fff7f2;
  transform: translateY(-1px);
}

.page-button.active {
  background: var(--primary-gradient);
  border-color: var(--primary-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(242, 92, 39, 0.35);
}

.page-button.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 42px;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 700;
}

/* ========================================================
   CARDS GRID (ARTICLES & PICTURE DESCRIPTION)
   ======================================================== */
.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 20px 0 40px;
}

.theme-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(242, 92, 39, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
}

.theme-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(242, 92, 39, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: rgba(242, 92, 39, 0.35);
}

.theme-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
}

.theme-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.theme-card:hover .theme-card-thumb img {
  transform: scale(1.04);
}

.theme-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(14, 23, 56, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 50px;
}

.theme-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #fff7f2 100%);
}

.theme-card-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.theme-card:hover .theme-card-title {
  color: var(--primary-orange);
}

.theme-card-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.theme-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-orange);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.theme-card-action:hover {
  color: var(--primary-hover);
  gap: 12px;
}

/* Empty State */
.empty-state-box {
  text-align: center;
  padding: 60px 24px;
  background: #ffffff;
  border: 1.5px dashed #fedacf;
  border-radius: 20px;
  margin: 30px auto;
  max-width: 580px;
}

.empty-state-icon {
  font-size: 48px;
  color: #f25c27;
  margin-bottom: 16px;
  opacity: 0.85;
}

.empty-state-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.empty-state-text {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

/* ========================================================
   MODERN AUDIO LESSONS CARDS
   ======================================================== */
.audio-lessons-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 0 40px;
  max-width: 900px;
  margin: 0 auto;
}

.audio-lesson-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(242, 92, 39, 0.04);
  transition: all 0.25s ease;
  scroll-margin-top: 100px;
}

.audio-lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(242, 92, 39, 0.09);
  border-color: rgba(242, 92, 39, 0.35);
}

.audio-lesson-card:target {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 4px rgba(242, 92, 39, 0.2);
}

.audio-card-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.audio-icon-circle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #fdeee8;
  color: var(--primary-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid #fedacf;
}

.audio-card-main {
  flex: 1;
  min-width: 0;
}

.audio-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 6px;
  line-height: 1.35;
}

.audio-card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.audio-native-player {
  width: 100%;
  height: 38px;
  border-radius: 20px;
  outline: none;
  margin-bottom: 12px;
}

.audio-action-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fdf1ec;
  border: 1px solid #fedacf;
  color: #63301d;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.audio-btn:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
}

.audio-btn.copied {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

.audio-card-thumb {
  width: 120px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ========================================================
   RESPONSIVE MEDIA QUERIES (TABLETS & PHONES)
   ======================================================== */
@media (max-width: 991px) {
  .nav-desktop {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .subpage-title {
    font-size: 32px;
  }
}

@media (max-width: 767px) {
  .site-header {
    height: 68px;
  }
  .header-inner {
    height: 68px;
  }
  .mobile-drawer {
    top: 68px;
  }
  .brand-logo img {
    height: 36px;
  }
  .subpage-hero {
    padding: 30px 0 24px;
  }
  .subpage-title {
    font-size: 26px;
  }
  .subpage-subtitle {
    font-size: 14.5px;
  }
  .search-form {
    padding: 4px 5px 4px 16px;
  }
  .search-input {
    font-size: 14px;
  }
  .search-submit-btn {
    padding: 8px 16px;
    font-size: 13.5px;
  }
  .modern-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
  .audio-card-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .audio-card-thumb {
    width: 100%;
    height: 180px;
    order: -1;
  }
  .audio-icon-circle {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .footer-links {
    justify-content: center;
    gap: 12px 18px;
  }
}

@media (max-width: 480px) {
  .site-container {
    padding: 0 16px;
  }
  .subpage-title {
    font-size: 23px;
  }
  .search-submit-btn span {
    display: none;
  }
  .search-submit-btn {
    padding: 8px 12px;
  }
  .page-button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
}
