/* ======================================================
   course.css — Shared styles for NewGen Finance course
   ====================================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    background: #0b4a64;
    font-family: 'Assistant', 'Rubik', sans-serif;
    direction: rtl;
    color: #394140;
    min-height: 100vh;
}

/* ===== ANIMATED BACKGROUND ===== */
.gradient-layer {
    position: fixed;
    inset: 0;
    z-index: -5;
    background: #0b4a64;
    overflow: hidden;
    pointer-events: none;
}
.gradient-layer .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
}
.gradient-layer .blob-1 {
    width: 60vw; height: 60vw;
    top: -15%; left: -10%;
    background: radial-gradient(circle, rgba(22,128,160,0.5) 0%, transparent 70%);
    animation: blobMove1 20s ease-in-out infinite;
}
.gradient-layer .blob-2 {
    width: 50vw; height: 50vw;
    bottom: -20%; right: -15%;
    background: radial-gradient(circle, rgba(13,106,130,0.6) 0%, transparent 70%);
    animation: blobMove2 25s ease-in-out infinite;
}
.gradient-layer .blob-3 {
    width: 40vw; height: 40vw;
    top: 30%; left: 40%;
    background: radial-gradient(circle, rgba(22,128,160,0.25) 0%, transparent 70%);
    animation: blobMove3 22s ease-in-out infinite;
}
.gradient-layer .blob-4 {
    width: 35vw; height: 35vw;
    top: 60%; left: 10%;
    background: radial-gradient(circle, rgba(11,74,100,0.7) 0%, transparent 70%);
    animation: blobMove4 28s ease-in-out infinite;
}
@keyframes blobMove1 {
    0%, 100% { transform: translate(0,0) scale(1); }
    25%  { transform: translate(8vw,6vh) scale(1.1); }
    50%  { transform: translate(3vw,12vh) scale(0.95); }
    75%  { transform: translate(-5vw,4vh) scale(1.05); }
}
@keyframes blobMove2 {
    0%, 100% { transform: translate(0,0) scale(1); }
    25%  { transform: translate(-6vw,-8vh) scale(1.08); }
    50%  { transform: translate(-10vw,-3vh) scale(0.92); }
    75%  { transform: translate(-3vw,-10vh) scale(1.04); }
}
@keyframes blobMove3 {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%  { transform: translate(-8vw,5vh) scale(1.15); }
    66%  { transform: translate(6vw,-6vh) scale(0.9); }
}
@keyframes blobMove4 {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%  { transform: translate(10vw,-4vh) scale(1.1); }
    66%  { transform: translate(5vw,8vh) scale(0.95); }
}
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}
#courseBgCharts {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
}
.ticker-layer {
    position: fixed;
    left: 0; right: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    height: 22px;
    opacity: 0.07;
}
.ticker-layer.t1 { top: 18%; }
.ticker-layer.t2 { top: 45%; }
.ticker-layer.t3 { top: 72%; }
.ticker-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: tickerScroll 60s linear infinite;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(179,224,220,1);
}
.ticker-layer.t2 .ticker-track {
    animation-direction: reverse;
    animation-duration: 75s;
}
.ticker-layer.t3 .ticker-track { animation-duration: 55s; }
.ticker-item { display: flex; gap: 8px; align-items: center; }
.ticker-item .symbol { opacity: 0.6; }
.ticker-item .price { opacity: 0.9; }
.ticker-item .change { opacity: 0.7; }
.ticker-item .up { color: rgba(100,210,160,1); }
.ticker-item .down { color: rgba(210,120,120,0.8); }
@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
img { max-width: 100%; height: auto; }

/* ===== NAVBAR ===== */
.course-nav {
    background: #0c3d52;
    padding: 0 1.5rem;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.course-nav-brand { display: flex; align-items: center; gap: 0.7rem; }
.course-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #b3e0dc;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.course-nav-logo img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(179,224,220,0.12);
  padding: 4px;
  flex-shrink: 0;
}
.course-nav-links { display: flex; align-items: center; gap: 1rem; }
.course-nav-link { color: #fefefe; text-decoration: none; font-family: 'Assistant', sans-serif; font-size: 0.95rem; transition: color 0.2s; }
.course-nav-link:hover { color: #b3e0dc; }
.course-nav-signout {
    background: transparent;
    border: 1px solid rgba(240,248,250,0.35);
    color: #fefefe;
    font-family: 'Assistant', sans-serif;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.course-nav-signout:hover { border-color: #b3e0dc; color: #b3e0dc; }

/* ===== HAMBURGER BUTTON ===== */
.hbnav-btn {
    width: 40px; height: 40px;
    background: rgba(179,224,220,0.15);
    border: 1px solid rgba(179,224,220,0.3);
    border-radius: 10px; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
}
.hbnav-btn:hover { background: rgba(179,224,220,0.28); border-color: rgba(179,224,220,0.55); }
.hbnav-btn span { display: block; width: 22px; height: 2px; background: #fefefe; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hbnav-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hbnav-btn.open span:nth-child(2) { opacity: 0; }
.hbnav-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== SLIDE-IN CHAPTER PANEL ===== */
.hbnav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 999; }
.hbnav-overlay.open { display: block; }
.hbnav-panel {
    position: fixed; top: 62px; right: 0;
    height: calc(100vh - 62px); width: 270px;
    background: #0c3d52; z-index: 1000;
    transform: translateX(100%); transition: transform 0.3s ease;
    overflow-y: auto; padding: 1.5rem 1rem;
    box-shadow: -4px 0 20px rgba(0,0,0,0.35);
}
.hbnav-panel.open { transform: translateX(0); }
.hbnav-panel-title {
    color: #b3e0dc; font-family: 'Rubik', sans-serif;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(179,224,220,0.2);
}
.hbnav-item {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.75rem 0.85rem; border-radius: 10px;
    text-decoration: none; color: #fefefe;
    font-family: 'Assistant', sans-serif; font-size: 0.95rem;
    transition: background 0.18s; margin-bottom: 4px;
}
.hbnav-item:hover { background: rgba(179,224,220,0.12); }
.hbnav-item.active { background: rgba(179,224,220,0.18); font-weight: 700; }
.hbnav-item.disabled { opacity: 0.45; pointer-events: none; }
.hbnav-icon { width: 34px; height: 34px; background: rgba(179,224,220,0.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.hbnav-text { display: flex; flex-direction: column; }
.hbnav-name { font-size: 0.95rem; }
.hbnav-sub  { font-size: 0.75rem; color: #b3e0dc; opacity: 0.7; }
.hbnav-site-link { display: flex; align-items: center; padding: 0.55rem 0.85rem; border-radius: 8px; text-decoration: none; color: rgba(254,254,254,0.72); font-size: 0.88rem; font-family: 'Assistant', sans-serif; transition: background 0.18s; margin-bottom: 2px; }
.hbnav-site-link:hover { background: rgba(179,224,220,0.1); color: #fefefe; }
.hbnav-divider { height: 1px; background: rgba(179,224,220,0.15); margin: 0.85rem 0.5rem; }

/* ===== HERO ===== */
.course-hero { background: #0c3d52; padding: 3rem 1rem 2.5rem; text-align: center; }
.course-hero-title { font-family: 'Rubik', sans-serif; font-size: 2.2rem; font-weight: 700; color: #fefefe; margin-bottom: 1.5rem; }
.course-yt-hero {
    width: 100%; max-width: 700px; margin: 0 auto;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    aspect-ratio: 16/9;
}
.course-yt-hero iframe { width: 100%; height: 100%; border: none; display: block; }
.course-hero-badge {
    display: inline-block; margin-top: 1.5rem;
    background: #b3e0dc; color: #394140;
    font-family: 'Rubik', sans-serif; font-size: 1.15rem; font-weight: 700;
    padding: 0.5rem 2rem; border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===== CONTAINER ===== */
.course-container { max-width: 700px; margin: 0 auto; padding: 2rem 1rem 4rem; }

/* ===== CARDS ===== */
.course-card {
    background: rgba(236, 232, 229, 0.82);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s ease,
                background 0.4s ease;
}
.course-card:hover,
.course-card.tapped {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    background: rgba(236, 232, 229, 0.9);
}
.course-card * { max-width: 100%; box-sizing: border-box; }
.course-card-dark {
    background: #0c3d52;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s ease,
                background 0.4s ease;
}
.course-card-dark:hover,
.course-card-dark.tapped {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    background: #0e4560;
}
.course-section-title {
    font-family: 'Rubik', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    background: linear-gradient(90deg, #0c3d52, #1680a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(179,224,220,0.4);
}
.course-section-title-white {
    font-family: 'Rubik', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 1.25rem;
}
.course-card-dark-title { font-family: 'Rubik', sans-serif; font-size: 1.4rem; font-weight: 700; color: #fefefe; margin-bottom: 0.5rem; }
.course-card-dark-sub { color: rgba(179,224,220,0.8); font-size: 0.95rem; margin-bottom: 1.5rem; }
.course-card-text { font-family: 'Assistant', sans-serif; font-size: 1.05rem; line-height: 1.75; color: #6b7d7c; margin-bottom: 1.25rem; text-align: center; }
.course-caption-white { font-family: 'Assistant', sans-serif; font-size: 0.95rem; color: rgba(240,248,250,0.85); text-align: center; margin-top: 1rem; line-height: 1.65; }

/* ===== YOUTUBE EMBEDS ===== */
.course-yt-main { width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.2); margin-bottom: 1.25rem; }
.course-yt-main iframe { width: 100%; height: 100%; border: none; display: block; }
.course-yt-main:last-child { margin-bottom: 0; }

/* ===== SIDE BY SIDE ===== */
.course-sidebyside { display: flex; gap: 1rem; margin-top: 1.25rem; }
.course-sidebyside > * { flex: 1; min-width: 0; }

/* ===== EXPANSION VIDEO WIDGET ===== */
.course-expvid { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.28); }
.course-expvid iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
.course-expvid-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.76);
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 1rem;
    color: #fff; font-family: 'Assistant', sans-serif; font-size: 0.9rem; font-weight: 600; line-height: 1.5;
    z-index: 10; cursor: pointer; transition: background 0.2s;
}
.course-expvid-overlay:hover { background: rgba(0,0,0,0.88); }
.course-expvid-tag {
    position: absolute; top: 8px; right: 8px;
    background: #b3e0dc; color: #000;
    font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 20px;
    z-index: 20; pointer-events: none;
}

/* ===== BUTTONS ===== */
.course-btn { display: inline-block; font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 1rem; padding: 0.75rem 1.75rem; border-radius: 30px; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none; }
.course-btn-gold { display: inline-block; background: #b3e0dc; color: #394140; font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 1.1rem; padding: 0.8rem 2.5rem; border-radius: 30px; text-decoration: none; box-shadow: 0 4px 14px rgba(179,224,220,0.45); transition: all 0.2s; }
.course-btn-gold:hover { background: #8fc9c4; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(179,224,220,0.55); }
.course-btn-outline { display: inline-block; background: transparent; border: 2px solid rgba(240,248,250,0.45); color: #fefefe; font-family: 'Assistant', sans-serif; font-size: 1rem; padding: 0.65rem 2rem; border-radius: 30px; text-decoration: none; transition: all 0.2s; }
.course-btn-outline:hover { border-color: #b3e0dc; color: #b3e0dc; }
.course-btn-secondary { display: inline-block; background: rgba(179,224,220,0.15); color: #b3e0dc; border: 1.5px solid rgba(179,224,220,0.4); font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 1rem; padding: 0.75rem 1.75rem; border-radius: 30px; text-decoration: none; transition: all 0.2s; cursor: pointer; }
.course-btn-secondary:hover { background: rgba(179,224,220,0.25); border-color: #b3e0dc; }

/* ===== BOTTOM NAV ===== */
.course-bottom-nav { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

/* ===== TRADINGVIEW WRAP ===== */
.course-tv-wrap { border-radius: 10px; overflow: hidden; margin: 1rem 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 560px) {
    .course-sidebyside { flex-direction: column; }
}
@media (max-width: 600px) {
    .course-container { padding: 1rem 0.75rem 3rem; }
    .course-hero { padding: 1.75rem 1.25rem; }
    .course-hero-title { font-size: 1.8rem; }
    .course-card { padding: 1.5rem 1.25rem; }
    .course-nav { padding: 0 0.75rem; }
    .course-nav-logo { font-size: 0.95rem; }
    .course-nav-logo img { height: 32px; width: 32px; }
}
@media (max-width: 480px) {
    .course-hero-title { font-size: 1.75rem; }
    .course-card { padding: 1.25rem; }
    .course-card-dark { padding: 1.25rem; }
    .course-section-title { font-size: 1.3rem; }
    .course-nav-link { display: none; }
}
