/*
Theme Name: EncycloVoice
Theme URI: https://encyclovoice.com
Author: Furkan Jussab
Author URI: https://encyclovoice.com
Description: Custom theme for EncycloVoice - Articles. Voice. Video.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: encyclovoice
*/

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --navy: #0d1f3c;
  --green: #2e7d32;
  --white: #ffffff;
  --light-grey: #f5f5f5;
  --dark-text: #1a1a1a;
  --mid-grey: #666666;
  --border: #e0e0e0;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', Arial, sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.2rem; font-size: 1rem; line-height: 1.8; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--navy);
  width: 100%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-social a {
  color: rgba(255,255,255,0.7);
  margin-right: 14px;
  font-size: 16px;
  transition: color 0.2s;
}
.header-social a:hover { color: var(--white); }

.header-logo { text-align: center; }
.header-logo img { height: 55px; margin: 0 auto; }
.header-logo-text {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 24px;
  font-weight: 600;
}
.header-logo-text span { color: var(--green); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-actions a {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.header-actions a:hover { color: var(--white); }

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: block;
  padding: 14px 18px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

/* Dropdown */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy);
  min-width: 180px;
  border-top: 2px solid var(--green);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s, background 0.2s;
}

.nav-menu .sub-menu li a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  padding-left: 22px;
}

.nav-tools { display: flex; align-items: center; gap: 16px; }
.nav-tools button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s;
}
.nav-tools button:hover { color: var(--white); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

/* ============================================
   TICKER
   ============================================ */
.news-ticker {
  background: var(--green);
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.ticker-label {
  background: rgba(0,0,0,0.2);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 3px;
  margin-right: 16px;
  flex-shrink: 0;
}

.ticker-content {
  color: rgba(255,255,255,0.95);
  font-size: 12px;
  animation: ticker-scroll 40s linear infinite;
  display: inline-block;
}

@keyframes ticker-scroll {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.hero-main .hero-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-main .hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 30px 24px 24px;
}

.hero-main .cat-tag {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.hero-main .hero-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 8px;
}

.hero-main .hero-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.hero-side {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.hero-side-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.2s;
}
.hero-side-item:hover { background: var(--light-grey); }
.hero-side-item:last-child { border-bottom: none; }

.hero-side-item .cat-tag {
  display: inline-block;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-side-item .side-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 6px;
}

.hero-side-item .side-meta {
  font-size: 11px;
  color: var(--mid-grey);
}

/* ============================================
   CATEGORY SECTIONS
   ============================================ */
.category-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--navy);
}

.section-header .see-all {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-header .see-all:hover { text-decoration: underline; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card { cursor: pointer; }

.article-card .card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
  background: var(--light-grey);
}

.article-card .card-image-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card .cat-tag {
  display: inline-block;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.article-card .card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.article-card:hover .card-title { color: var(--green); }

.article-card .card-meta {
  font-size: 11px;
  color: var(--mid-grey);
}

/* ============================================
   ENCYCLOGAMES BANNER
   ============================================ */
.games-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  border-radius: 8px;
  padding: 24px 30px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.games-banner-text h3 {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.games-banner-text p {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  margin: 0;
}

.games-banner-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.games-banner-links a {
  background: var(--green);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
}
.games-banner-links a:hover { background: #1b5e20; color: var(--white); }

.games-banner-links a.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
}
.games-banner-links a.outline:hover { background: rgba(255,255,255,0.1); }

/* ============================================
   MAIN CONTENT + SIDEBAR LAYOUT
   ============================================ */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.main-content { min-width: 0; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { }

.sidebar-widget {
  background: var(--light-grey);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.sidebar-widget .recent-post {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-widget .recent-post:last-child { border-bottom: none; }

.sidebar-widget .recent-post img {
  width: 60px;
  height: 50px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.sidebar-widget .recent-post-title {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--navy);
  line-height: 1.4;
}

.newsletter-widget {
  background: var(--navy);
  color: var(--white);
}

.newsletter-widget h3 {
  color: var(--white);
  border-bottom-color: var(--green);
}

.newsletter-widget p {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 12px;
}

.newsletter-widget input[type="email"] {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 8px;
  font-family: var(--font-sans);
}

.newsletter-widget button {
  width: 100%;
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 9px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
}
.newsletter-widget button:hover { background: #1b5e20; }

/* ============================================
   SINGLE ARTICLE
   ============================================ */
.single-article { max-width: 780px; }

.article-header { margin-bottom: 24px; }

.article-category {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--mid-grey);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.article-featured-image {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 28px;
  max-height: 460px;
  object-fit: cover;
}

.article-body { font-size: 1.05rem; line-height: 1.85; color: #2a2a2a; }
.article-body h2 { font-size: 1.5rem; margin: 2rem 0 1rem; color: var(--navy); }
.article-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.8rem; color: var(--navy); }
.article-body p { margin-bottom: 1.4rem; }
.article-body a { color: var(--green); text-decoration: underline; }
.article-body blockquote {
  border-left: 4px solid var(--green);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--light-grey);
  font-style: italic;
  color: var(--mid-grey);
}

.video-placeholder {
  background: var(--navy);
  border-radius: 6px;
  padding: 30px;
  text-align: center;
  margin: 30px 0;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.video-placeholder p { margin: 0; color: rgba(255,255,255,0.7); }

.share-section {
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.share-section h4 {
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--mid-grey);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-articles {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--navy);
}

.related-articles h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============================================
   ARCHIVE / CATEGORY PAGE
   ============================================ */
.archive-header {
  background: var(--navy);
  padding: 30px 20px;
  margin-bottom: 30px;
}

.archive-header h1 {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy);
  color: var(--white);
  margin-top: 50px;
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .footer-logo { margin-bottom: 12px; }
.footer-brand .footer-logo img { height: 45px; }
.footer-brand .footer-logo-text {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--white);
}
.footer-brand .footer-logo-text span { color: var(--green); }

.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.footer-social { display: flex; gap: 12px; }
.footer-social a {
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--white); }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* ============================================
   GAME PAGE (no header/footer chrome)
   ============================================ */
.game-header {
  background: var(--navy);
  text-align: center;
  padding: 14px 0;
}
.game-header img { height: 50px; margin: 0 auto; }
.game-header a:hover { opacity: 0.85; }

/* ============================================
   UTILITY
   ============================================ */
.cat-tag-green {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  transition: background 0.2s;
}
.btn-primary:hover { background: #1b5e20; color: var(--white); }

.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; border-left: none; border-top: 1px solid var(--border); }
  .hero-side-item { border-bottom: none; border-right: 1px solid var(--border); }
  .hero-side-item:last-child { border-right: none; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-top { flex-wrap: wrap; gap: 10px; }
  .header-social { order: 2; }
  .header-logo { order: 1; width: 100%; text-align: center; }
  .header-actions { order: 3; }
  .nav-menu { display: none; flex-direction: column; width: 100%; }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: none; background: rgba(255,255,255,0.05); }
  .nav-toggle { display: flex; }
  .nav-inner { flex-wrap: wrap; }
  .article-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .games-banner { flex-direction: column; text-align: center; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  h1 { font-size: 1.7rem; }
  .article-title { font-size: 1.6rem; }
  .hero-main { min-height: 280px; }
  .hero-main .hero-image { height: 280px; }
}