/*
Theme Name: Trang In Tech
Theme URI: https://example.com/trangintech
Author: Trang In Tech
Author URI: https://example.com
Description: Custom high-performance theme for Trang In Tech with native YouTube API integration and optimized frontend.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trangintech
*/

:root{
  --bg: #fff0f5; /* Soft Pink */
  --text: #111111;
  --muted: #555555;
  --accent-red: #ff0000; /* YouTube */
  --accent-blue: #1877f2; /* Socials */
  --brand: #e91e63; /* Brand pink */
  --card: #ffffff;
  --border: #e6e6e6;
  --shadow: 0 2px 14px rgba(0,0,0,0.06);
}

html.dark{
  --bg: #0f1115;
  --text: #e6e6e6;
  --muted: #a0a0a0;
  --card: #151821;
  --border: #232634;
  --shadow: 0 2px 14px rgba(0,0,0,0.35);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}

.container{width:min(1200px, 92%);margin:0 auto}

/* Header */
/* --- Header --- */
.site-header { position: sticky; top: 0; z-index: 50; background-color: var(--bg); border-bottom: 1px solid var(--border); }
.header-flex { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.site-logo a { font-weight: 700; letter-spacing: 1px; font-size: 18px; color: var(--brand); text-decoration: none; }
.main-navigation { flex-grow: 1; display: flex; justify-content: center; text-align: center; }
#primary-menu { display: flex !important; flex-direction: row !important; list-style: none !important; margin: 0 !important; padding: 0 !important; gap: 28px; }
.main-navigation > ul:not(:first-of-type) { display: none !important; }
#primary-menu li { margin: 0 !important; padding: 0 !important; list-style-type: none !important; }
#primary-menu a { position: relative; color: var(--text); font-weight: 600; text-decoration: none; padding-bottom: 4px; }
#primary-menu a::after { content: ''; position: absolute; width: 100%; transform: scaleX(0); height: 2px; bottom: 0; left: 0; background-color: var(--brand); transform-origin: bottom left; transition: transform 0.5s ease-out; }
#primary-menu a:hover::after { transform: scaleX(1); transform-origin: bottom left; }
#primary-menu li.current-menu-item a { color: var(--brand); }
#primary-menu li.current-menu-item a::after { transform: scaleX(1); background-color: var(--brand); }
.header-actions { display: flex; align-items: center; }
body > nav.main-navigation,
body > div > nav.main-navigation {
    display: none !important;
}
/* Dark/Light mode toggle */
.theme-toggle-button { background: transparent; border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.theme-toggle-button svg { color: var(--text); }
.moon-icon { display: none; }
html.dark .sun-icon { display: none; }
html.dark .moon-icon { display: block; }
html.dark .theme-toggle-button { border-color: var(--brand); }
html.dark .theme-toggle-button svg { color: #fff; }
.hamburger{display:none}

@media (max-width: 860px){
  .main-navigation{display:none}
  .hamburger{display:grid}
  /* Mobile drawer styles can be added here if needed */
}

/* Hero */
.hero{display:grid;grid-template-columns:1.1fr 1fr;gap:40px;align-items:center;padding:54px 0}
.hero-left{position:relative}
.blob{
  width:100%;aspect-ratio:1/1;max-width:520px;margin:auto;background:linear-gradient(135deg,#ffd6e7, #ffeaf3);
  border-radius: 55% 45% 55% 45% / 60% 40% 60% 40%;
  filter: drop-shadow(0 20px 40px rgba(255,0,100,.15));
  display:grid;place-items:center;overflow:hidden
}
.blob img{width:100%;height:100%;object-fit:contain;}
.hero-right h1{font-size:clamp(28px,4vw,40px);margin:0 0 8px;font-weight:700}
.hero-right h2{font-size:clamp(18px,2.2vw,22px);margin:0 0 14px;color:var(--muted);font-weight:600}
.hero-right p{margin:0 0 16px;color:var(--muted)}
.socials{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.socials a{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:var(--card)}

@media (max-width: 960px){
  .hero{grid-template-columns:1fr;gap:28px;padding:34px 0}
}

/* Sections */
.section{padding:28px 0 14px}
.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap;gap:16px;width:100%}
.section-title h3{margin:0;font-size:22px;flex-shrink:0}
.filter-tabs{display:flex;gap:8px}
.filter-btn{background:transparent;border:1px solid var(--border);padding:6px 14px;border-radius:20px;cursor:pointer;font-weight:600;font-size:14px;color:var(--text);transition:all 0.3s ease}
.filter-btn:hover{border-color:var(--brand);color:var(--brand)}
.filter-btn.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
.card-body{padding:10px}
.card-title{font-size:16px;margin:0 0 6px}
.card-meta{font-size:12px;color:var(--muted)}

/* Most Popular Podcast - 4 columns */
#podcast-popular .grid{grid-template-columns:repeat(4,1fr)}

/* Podcast & Blog sections - 3 columns */
#podcast-latest .grid,
#blog .grid{grid-template-columns:repeat(3,1fr)}

@media (max-width: 1000px){
  #podcast-popular .grid{grid-template-columns:repeat(3,1fr)}
  #podcast-latest .grid,
  #blog .grid{grid-template-columns:repeat(2,1fr)}
  .grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width: 760px){
  #podcast-popular .grid{grid-template-columns:repeat(2,1fr)}
  #podcast-latest .grid,
  #blog .grid{grid-template-columns:repeat(2,1fr)}
  .grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width: 520px){
  #podcast-popular .grid,
  #podcast-latest .grid,
  #blog .grid,
  .grid{grid-template-columns:1fr}
}

.thumbnail{width:100%;aspect-ratio:16/9;object-fit:cover;background:#eee}


/* Podcast grid responsive overhaul */
.podcast-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr)) !important}

/* See all / view full buttons */
.see-all-link{
  display:inline-block;
  background-color:transparent;
  border:none;
  padding:8px 12px;
  border-radius:12px;
  color:var(--text);
  font-weight:500;
  font-size:13px;
  margin-top:16px;
  text-decoration:none;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
  transition:all 0.3s ease;
  cursor:pointer;
  width:fit-content;
}
.see-all-link:hover{
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
  transform:translateY(-1px);
}
html.dark .see-all-link{
  box-shadow:0 2px 8px rgba(0,0,0,0.3);
}
html.dark .see-all-link:hover{
  box-shadow:0 4px 12px rgba(0,0,0,0.4);
}
.section > .see-all-link{
  display:block;
  float:none;
  clear:both;
}

/* Generic responsive video wrapper */
.video-embed{position:relative;width:100%;max-width:1200px;margin:0 auto}
.video-embed iframe{position:absolute;inset:0;width:100%;height:100%}
.video-embed::before{content:"";display:block;aspect-ratio:16/9}


/* Skeleton */
.skeleton{position:relative;overflow:hidden;background:#e9e9e9}
.skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);animation:shimmer 1.2s infinite}
@keyframes shimmer{100%{transform:translateX(100%)}}

/* Footer */
.site-footer{margin-top:20px;border-top:1px solid var(--border);padding:0;background:var(--bg)}
.site-footer .links{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:8px}
.site-footer p{margin:6px 0;color:var(--muted)}



/* --- Footer --- */
.site-footer {
    padding-top: 10px; /* further reduce top padding */
}
.footer-top {
    padding-bottom: 10px; /* further reduce */
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Change to space-between */
    list-style: none;
    margin: 0;
    padding: 0;
    font-weight: 600;
    width: 100%; /* Ensure it takes full width */
}
.footer-divider {
    border: 0;
    height: 1px;
    background-color: var(--border);
    margin: 0;
}
.footer-main {
    padding: 15px 0; /* further reduce */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* reduce gap */
    text-align: center;
}
.footer-intro {
    max-width: 600px;
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}
.footer-cta {
    font-weight: 700;
    letter-spacing: 0.5px;
}
.footer-socials {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.footer-socials a svg {
    width: 24px;
    height: 24px;
}
.footer-copyright {
    background-color: transparent; /* remove misaligned bar */
    padding: 10px 0; /* half size */
    border-top: 1px solid var(--border);



/* YouTube Player Modal */
.youtube-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-modal .modal-content {
  width: 90%;
  max-width: 960px;
  background: none;
  padding: 0;
}

.youtube-modal .close-button {
  color: #fff;
  opacity: 0.8;
  font-size: 40px;
  top: -10px;
  right: -5px;
}

.youtube-modal .close-button:hover {
  opacity: 1;
}

    text-align: center;
}
.footer-copyright p {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}
/* Social Icon Hover Colors */
.footer-socials a { color: var(--text); transition: color 0.3s ease; }
.footer-socials a[aria-label="Facebook"]:hover { color: #1877F2; }
.footer-socials a[aria-label="Instagram"]:hover { color: #E4405F; }
.footer-socials a[aria-label="LinkedIn"]:hover { color: #0A66C2; }
.footer-socials a[aria-label="YouTube"]:hover { color: #FF0000; }
.footer-socials a[aria-label="TikTok"]:hover { color: #000000; }
html.dark .footer-socials a[aria-label="TikTok"]:hover { color: #ffffff; }
.footer-socials a[aria-label="Podcast"]:hover { color: #9933CC; }




/* Force transparent background for archive headers like Book Review */
.archive-header, .page-header {
    background: transparent !important;
    border-bottom: 1px solid #ffc1d5 !important;
}

