/*
Theme Name: GeneratePress Child
Theme URI: https://telugugospellyrics.com/
Description: GeneratePress child theme for Telugu Gospel Lyrics — matches the front-page design system (colors, typography, header & footer).
Author: Telugu Gospel Lyrics
Author URI: https://telugugospellyrics.com/
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-child
*/

/* =====================================================
   DESIGN TOKENS — match front-page embed (#tgl-app)
   ===================================================== */
:root {
  --tgl-primary: #0A3A8A;
  --tgl-primary-glow: #1976D2;
  --tgl-secondary: #1976D2;
  --tgl-accent: #FFB300;
  --tgl-bg: #fafbff;
  --tgl-surface: #f1f5fb;
  --tgl-card: #ffffff;
  --tgl-text: #0f1a2e;
  --tgl-muted: #5b6478;
  --tgl-border: #e2e8f2;
  --tgl-shadow-soft: 0 4px 20px -6px rgba(10, 58, 138, 0.12);
  --tgl-shadow-elegant: 0 10px 40px -12px rgba(10, 58, 138, 0.25);
  --tgl-radius: 12px;
  --tgl-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pull Google fonts already used by the React/embed front page */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700;800;900&family=Noto+Sans+Telugu:wght@400;500;600;700&display=swap');

/* =====================================================
   GLOBAL BASE — applied site-wide
   ===================================================== */
body.tgl-theme {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--tgl-bg);
  color: var(--tgl-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.tgl-theme h1,
body.tgl-theme h2,
body.tgl-theme h3,
body.tgl-theme h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--tgl-primary);
  line-height: 1.2;
}
body.tgl-theme a { color: var(--tgl-secondary); text-decoration: none; }
body.tgl-theme a:hover { color: var(--tgl-primary); }
body.tgl-theme .font-telugu { font-family: 'Noto Sans Telugu', 'Inter', sans-serif; }

/* =====================================================
   HEADER (matches embed .tgl-header)
   ===================================================== */
.tgl-header { background: #fff; border-bottom: 1px solid var(--tgl-border); }
/* Make sure GeneratePress container styles never constrain our header */
body.tgl-theme .tgl-header { width: 100%; max-width: none; margin: 0; padding: 0; }
.tgl-header__top {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 16px 20px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap;
}
.tgl-header__brand { display: inline-flex; align-items: center; gap: 12px; }
.tgl-header__brand img { height: 48px; width: 48px; object-fit: contain; display: block; }
.tgl-header__title {
  font-family: 'Playfair Display', serif; font-weight: 800; font-size: 24px;
  color: var(--tgl-primary); letter-spacing: -0.01em; white-space: nowrap;
}

/* Horizontal nav — overrides default <ul> list styling that WP/GP injects */
.tgl-header__nav,
ul.tgl-header__nav,
nav.tgl-header__nav {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  margin: 0;
  list-style: none !important;
  border-top: 1px solid var(--tgl-border);
  background: var(--tgl-surface);
}
.tgl-header__nav > li,
.tgl-header__nav .menu-item {
  list-style: none !important;
  margin: 0;
  padding: 0;
  position: relative;
}
.tgl-header__nav > li::before,
.tgl-header__nav .menu-item::before { content: none !important; }
.tgl-header__nav > li > a,
.tgl-header__nav .menu-item > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--tgl-text); text-decoration: none;
  transition: var(--tgl-transition);
}
.tgl-header__nav > li > a:hover,
.tgl-header__nav .menu-item > a:hover {
  background: var(--tgl-primary); color: #fff;
}
/* WP-managed sub-menus */
.tgl-header__nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--tgl-border);
  border-radius: 10px; box-shadow: var(--tgl-shadow-elegant);
  padding: 6px; margin: 0;
  list-style: none !important;
  display: none; z-index: 60;
}
.tgl-header__nav .menu-item-has-children:hover > .sub-menu { display: block; }
.tgl-header__nav .sub-menu li { list-style: none !important; margin: 0; }
.tgl-header__nav .sub-menu li::before { content: none !important; }
.tgl-header__nav .sub-menu a {
  display: block; padding: 8px 12px; border-radius: 6px;
  font-size: 14px; color: var(--tgl-text); text-decoration: none;
}
.tgl-header__nav .sub-menu a:hover { background: var(--tgl-surface); color: var(--tgl-primary); }
.tgl-nav__item { position: relative; }
.tgl-nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--tgl-text); background: transparent; border: none; cursor: pointer;
  font-family: inherit; transition: var(--tgl-transition);
}
.tgl-nav__link:hover { background: var(--tgl-primary); color: #fff; }
.tgl-nav__item .caret { font-size: 10px; opacity: 0.7; }
.tgl-nav__sub {
  position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff;
  border: 1px solid var(--tgl-border); border-radius: 10px; box-shadow: var(--tgl-shadow-elegant);
  padding: 6px; display: none; z-index: 60;
}
.tgl-nav__item.has-sub:hover .tgl-nav__sub,
.tgl-nav__item.has-sub.open .tgl-nav__sub { display: block; }
.tgl-nav__sub a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--tgl-text); }
.tgl-nav__sub a:hover { background: var(--tgl-surface); color: var(--tgl-primary); }

@media (max-width: 520px) {
  .tgl-header__title { font-size: 20px; }
  .tgl-header__brand img { height: 40px; width: 40px; }
}

/* =====================================================
   MAIN CONTAINER — single & archive
   ===================================================== */
.tgl-main { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

/* SINGLE POST */
.tgl-single {
  max-width: 860px; margin: 0 auto;
  background: var(--tgl-card);
  border: 1px solid var(--tgl-border);
  border-radius: var(--tgl-radius);
  box-shadow: var(--tgl-shadow-soft);
  padding: 40px;
}
.tgl-single__title {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 8px;
  text-align: center;
}
.tgl-single__meta {
  text-align: center; color: var(--tgl-muted);
  font-size: 13px; margin-bottom: 28px;
  padding-bottom: 18px; border-bottom: 1px solid var(--tgl-border);
}
.tgl-single__content { font-size: 16px; line-height: 1.8; color: var(--tgl-text); }
.tgl-single__content h2,
.tgl-single__content h3 { margin: 28px 0 12px; }
.tgl-single__content p { margin: 0 0 16px; }
.tgl-single__content a { color: var(--tgl-secondary); }
.tgl-single__content a:hover { text-decoration: underline; }
.tgl-single__content img { max-width: 100%; height: auto; border-radius: var(--tgl-radius); margin: 16px 0; }
.tgl-single__content blockquote {
  border-left: 4px solid var(--tgl-primary);
  background: var(--tgl-surface);
  margin: 20px 0; padding: 14px 18px; border-radius: 8px; color: var(--tgl-text);
}

/* ARCHIVE */
.tgl-archive__header { text-align: center; margin: 0 auto 28px; max-width: 860px; }
.tgl-archive__title {
  font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px;
}
.tgl-archive__desc { color: var(--tgl-muted); font-size: 15px; }

.english-alphabet-posts {
  max-width: 860px; margin: 0 auto;
  background: var(--tgl-card);
  border: 1px solid var(--tgl-border);
  border-radius: var(--tgl-radius);
  box-shadow: var(--tgl-shadow-soft);
  padding: 28px 32px;
}
.english-alphabet-posts .post-title {
  margin: 0; padding: 12px 4px;
  border-bottom: 1px solid var(--tgl-border);
  font-size: 15px; line-height: 1.5;
}
.english-alphabet-posts .post-title:last-child { border-bottom: 0; }
.english-alphabet-posts .post-title a {
  color: var(--tgl-text); font-weight: 600; transition: color var(--tgl-transition);
}
.english-alphabet-posts .post-title a:hover { color: var(--tgl-primary); }

/* Pagination */
.tgl-pagination { display: flex; justify-content: center; margin: 30px 0 0; }
.tgl-pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tgl-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--tgl-border);
  background: #fff; color: var(--tgl-text); font-weight: 600; font-size: 14px;
  transition: var(--tgl-transition);
}
.tgl-pagination .page-numbers:hover,
.tgl-pagination .page-numbers.current {
  background: var(--tgl-primary); color: #fff; border-color: var(--tgl-primary);
}

/* =====================================================
   FOOTER (matches React <Footer />)
   ===================================================== */
.tgl-footer { background: var(--tgl-bg); border-top: 1px solid var(--tgl-border); margin-top: 60px; }
.tgl-footer__inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.tgl-footer__grid {
  display: grid; gap: 40px; padding: 56px 0;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .tgl-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .tgl-footer__grid { grid-template-columns: repeat(5, 1fr); }
  .tgl-footer__brandcol { grid-column: span 2 / span 2; }
}
.tgl-footer__col h3 {
  font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--tgl-text); margin: 0 0 16px;
}
.tgl-footer__col ul { list-style: none; padding: 0; margin: 0; }
.tgl-footer__col ul li { margin-bottom: 10px; }
.tgl-footer__col ul a { font-size: 14px; color: var(--tgl-muted); transition: color var(--tgl-transition); }
.tgl-footer__col ul a:hover { color: var(--tgl-primary); }

.tgl-footer__brand { display: flex; align-items: center; gap: 8px; }
.tgl-footer__brand img { height: 36px; width: 36px; object-fit: contain; }
.tgl-footer__brand span { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; color: var(--tgl-primary); }
.tgl-footer__about { color: var(--tgl-muted); font-size: 14px; line-height: 1.7; margin: 16px 0 0; max-width: 28rem; }

.tgl-socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.tgl-socials a {
  width: 40px; height: 40px; border-radius: 8px;
  display: inline-grid; place-items: center;
  background: #fff; color: var(--tgl-muted);
  border: 1px solid var(--tgl-border); transition: var(--tgl-transition);
}
.tgl-socials a:hover {
  background: var(--brand, var(--tgl-primary)); color: #fff;
  border-color: transparent; transform: translateY(-2px);
  box-shadow: var(--tgl-shadow-soft);
}
.tgl-socials a svg { width: 16px; height: 16px; }

.tgl-footer__bottom {
  border-top: 1px solid var(--tgl-border); padding: 22px 0;
  text-align: center; color: var(--tgl-muted); font-size: 12px;
}
.tgl-footer__bottom a { color: var(--tgl-secondary); }
.tgl-footer__bottom a:hover { color: var(--tgl-primary); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .tgl-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .tgl-single { padding: 28px 20px; }
  .english-alphabet-posts { padding: 20px 18px; }
}
@media (max-width: 600px) {
  .tgl-footer__grid { grid-template-columns: 1fr; }
  .tgl-main { padding: 24px 16px; }
}

/* Hide GeneratePress default header/footer when our custom ones are active */
body.tgl-theme .site-header.tgl-hidden,
body.tgl-theme .site-footer.tgl-hidden { display: none !important; }

/* =====================================================
   SINGLE / ARCHIVE LAYOUT WITH SIDEBAR
   ===================================================== */
.tgl-single-wrap {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  max-width: 1200px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 20px;
  box-sizing: border-box;
}
/* Force centering regardless of GP "separate / one container" content layout */
body.tgl-theme.separate-containers .site-content,
body.tgl-theme.one-container .site-content,
body.tgl-theme .site-content,
body.tgl-theme .content-area,
body.tgl-theme #primary,
body.tgl-theme .tgl-main {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}
body.tgl-theme .inside-article,
body.tgl-theme .inside-article > .tgl-single-wrap {
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (min-width: 1024px) {
  .tgl-single-wrap { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}
.tgl-single-wrap .tgl-single,
.tgl-single-wrap .english-alphabet-posts,
.tgl-single-wrap .tgl-archive__header { max-width: none; margin-left: 0; margin-right: 0; }

/* Sidebar widgets */
.tgl-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 20px; }
@media (max-width: 1023px) { .tgl-sidebar { position: static; } }

.tgl-widget {
  background: var(--tgl-card);
  border: 1px solid var(--tgl-border);
  border-radius: var(--tgl-radius);
  box-shadow: var(--tgl-shadow-soft);
  padding: 20px;
}
.tgl-widget__title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--tgl-primary);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tgl-border);
  letter-spacing: 0.02em;
}

/* Follow Us */
.tgl-follow { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tgl-follow a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: #fff !important; font-weight: 600; font-size: 14px;
  text-align: center; transition: var(--tgl-transition);
  font-family: 'Inter', sans-serif;
}
.tgl-follow a:hover { transform: translateY(-2px); box-shadow: var(--tgl-shadow-soft); opacity: 0.95; }

/* All Categories */
.tgl-cats { list-style: none; padding: 0; margin: 0; max-height: 540px; overflow-y: auto; }
.tgl-cats li {
  padding: 8px 4px;
  border-bottom: 1px solid var(--tgl-border);
  font-size: 14px;
  display: flex; justify-content: space-between; gap: 8px;
}
.tgl-cats li:last-child { border-bottom: 0; }
.tgl-cats a {
  color: var(--tgl-secondary); font-weight: 500;
  flex: 1; min-width: 0; word-break: break-word;
}
.tgl-cats a:hover { color: var(--tgl-primary); text-decoration: underline; }
.tgl-cats .count { color: var(--tgl-muted); font-size: 13px; flex-shrink: 0; }

/* Custom scrollbar for categories */
.tgl-cats::-webkit-scrollbar { width: 6px; }
.tgl-cats::-webkit-scrollbar-track { background: var(--tgl-surface); border-radius: 3px; }
.tgl-cats::-webkit-scrollbar-thumb { background: var(--tgl-border); border-radius: 3px; }
.tgl-cats::-webkit-scrollbar-thumb:hover { background: var(--tgl-muted); }

/* Hierarchical categories (parent / children) */
.tgl-cats .tgl-cats--children {
  list-style: none;
  padding: 6px 0 6px 14px;
  margin: 6px 0 0;
  border-left: 2px solid var(--tgl-border);
  max-height: none;
  overflow: visible;
  width: 100%;
}
.tgl-cats .tgl-cats--children li {
  padding: 6px 4px;
  font-size: 13px;
}
.tgl-cats .tgl-cat { flex-wrap: wrap; }
.tgl-cats .tgl-cat--depth-0 > a { font-weight: 600; color: var(--tgl-primary); }
