/* ============================================================
   Academia Alçada - Design System
   Cores: Laranja #F15A22 | Castanho #5C2A12 | Castanho claro #7A3B18
   ============================================================ */

:root {
    --gold: #F15A22;
    --gold-light: #FF8A4A;
    --gold-dark: #C2410C;
    --navy: #5C2A12;
    --purple: #7A3B18;
    --purple-light: #9A5230;
    --accent: #E08A4A;
    --white: #FFFFFF;
    --gray-50: #FBF8F6;
    --gray-100: #F4EEEA;
    --gray-200: #E8DFD8;
    --gray-300: #D4C6BB;
    --gray-500: #6B7289;
    --gray-700: #374151;
    --gray-900: #111827;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --shadow-sm: 0 1px 3px rgba(92,42,18,.08);
    --shadow-md: 0 4px 16px rgba(92,42,18,.12);
    --shadow-lg: 0 12px 40px rgba(92,42,18,.18);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all .3s cubic-bezier(.4,0,.2,1);
    --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --header-height: 72px;
}

[data-theme="dark"] {
    --white: #140E0B;
    --gray-50: #1C1410;
    --gray-100: #261C16;
    --gray-200: #3A2A20;
    --gray-300: #5A4638;
    --gray-500: #C4B0A4;
    --gray-700: #E8DDD6;
    --gray-900: #F7F1EC;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background .3s, color .3s;
}

.promo-bar {
    margin-top: var(--header-height);
    background: #121212;
    color: #fff;
    font-size: .8rem;
    line-height: 1.15;
    overflow: hidden;
}
.promo-bar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 0;
    padding: .18rem 1rem .18rem 0;
}
.promo-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 88%, transparent);
}
.promo-track {
    display: flex;
    width: max-content;
    animation: promo-slide 28s linear infinite;
}
.promo-group { display: flex; }
.promo-item {
    white-space: nowrap;
    padding: 0 2.25rem;
}
.promo-item i { color: var(--gold-light); margin-right: .4rem; }
.promo-bar a {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    color: var(--gold-light);
    font-weight: 700;
    white-space: nowrap;
    background: #121212;
    padding: .18rem 0 .18rem .9rem;
    box-shadow: -16px 0 12px 4px #121212;
}
.promo-marquee:hover .promo-track,
.promo-marquee:focus-within .promo-track { animation-play-state: paused; }
@keyframes promo-slide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .promo-track { animation: none; }
}

a { color: var(--purple); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

img, video { max-width: 100%; height: auto; display: block; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; color: var(--navy); }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: var(--gray-900); }

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: .5rem;
}
.section-subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
    max-width: 600px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(241,90,34,.4);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241,90,34,.5);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-navy {
    background: var(--navy);
    color: var(--white);
}
.btn-navy:hover { background: var(--purple); color: var(--white); }
.btn-sm { padding: .5rem 1.25rem; font-size: .875rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ---- Header ---- */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}
[data-theme="dark"] .header { background: rgba(20,14,11,.95); }
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}
.logo img {
    height: 52px;
    width: 52px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
}
.logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
    letter-spacing: .04em;
}
[data-theme="dark"] .logo-text { color: var(--gray-900); }
.logo-text small {
    display: block;
    font-size: .62rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: .16em;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: .95rem;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--gold);
    transition: width .3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--navy); }

.mega-item { position: static; }
.mega-trigger {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: none;
    border: 0;
    padding: 0;
    color: var(--gray-700);
    font-weight: 500;
    font-size: .95rem;
    cursor: pointer;
    font-family: inherit;
}
.mega-trigger i { font-size: .65rem; transition: transform .2s; }
.mega-item.is-open .mega-trigger,
.mega-item:hover .mega-trigger { color: var(--navy); }
.mega-item.is-open .mega-trigger i { transform: rotate(180deg); }
.mega-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 22px 40px rgba(28, 29, 31, .12);
    z-index: 1002;
    padding: 1.35rem 0 1.5rem;
}
.mega-item.is-open .mega-menu { display: block; }
@media (min-width: 1101px) {
    .mega-item:hover .mega-menu { display: block; }
}
.mega-menu-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(200px, .7fr);
    gap: 2rem;
}
.mega-label {
    margin: 0 0 .75rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gray-500);
}
.mega-cats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
}
.mega-cats a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .75rem;
    border-radius: 12px;
    border: 1px solid #efe8e3;
    color: var(--navy);
    font-weight: 650;
}
.mega-cats a::after { display: none; }
.mega-cats a i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f7f1ec;
    color: var(--gold);
    flex-shrink: 0;
}
.mega-cats a span { display: flex; flex-direction: column; line-height: 1.2; font-weight: 700; }
.mega-cats a small { font-weight: 500; color: var(--gray-500); font-size: .75rem; }
.mega-cats a:hover { background: #faf7f5; border-color: #e7d5cb; }
.mega-side {
    border-left: 1px solid var(--gray-200);
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.mega-side a {
    padding: .45rem 0;
    font-weight: 600;
    color: var(--navy);
}
.mega-side a::after { display: none; }
[data-theme="dark"] .mega-menu { background: #1c1410; border-top-color: rgba(255,255,255,.08); }
[data-theme="dark"] .mega-cats a { border-color: rgba(255,255,255,.1); color: #fff; }
[data-theme="dark"] .mega-side { border-left-color: rgba(255,255,255,.1); }
[data-theme="dark"] .mega-side a { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-category-link {
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray-700);
}
.header-search-form {
    display: none;
}
.home-udemy .header {
    background: #fff;
    backdrop-filter: none;
}
.home-udemy .header-inner {
    max-width: 1360px;
    gap: 1rem;
}
.home-udemy .nav {
    flex: 1;
    gap: 1rem;
}
.home-udemy .header-search-form {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 520px;
    border: 1px solid #1c1d1f;
    border-radius: 999px;
    padding: .45rem .9rem;
    background: #fff;
}
.home-udemy .header-search-form i { color: #6a6f73; margin-right: .55rem; }
.home-udemy .header-search-form input {
    border: 0;
    outline: 0;
    width: 100%;
    font-size: .92rem;
    color: #1c1d1f;
}
.home-udemy .nav-links a,
.home-udemy .mega-trigger { font-size: .87rem; color: #1c1d1f; }
.home-udemy .btn-navy {
    background: #1c1d1f;
    border-color: #1c1d1f;
}
.home-udemy .btn-navy:hover { background: #000; }

.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-700);
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.mobile-toggle {
    display: none;
    background: none; border: none;
    font-size: 1.5rem;
    color: var(--navy);
    cursor: pointer;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 50%, #3D1A0C 100%);
    padding-top: var(--header-height);
}
.hero-udemy { min-height: calc(100vh - var(--header-height) - 42px); }
.home-udemy .hero {
    min-height: 0;
    align-items: center;
    padding: 2.5rem 0 2rem;
    background: #fff;
    overflow: visible;
}
.home-udemy .hero-video-bg,
.home-udemy .hero-glow,
.home-udemy .hero-glow-2 { display: none; }
.home-udemy .hero-content {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .72fr);
    gap: 3.5rem;
    align-items: center;
    width: min(1120px, calc(100% - 2rem));
    padding: 0;
}
.home-udemy .hero-text {
    background: transparent;
    color: #1c1d1f;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
.home-udemy .hero-text::before { display: none; }
.home-udemy .hero-text h1 {
    color: #1c1d1f;
    font-size: clamp(2.2rem, 4.6vw, 3.3rem);
    line-height: 1.08;
    margin-bottom: 1rem;
}
.home-udemy .hero-text p { color: #2d2f31; margin-bottom: 1.2rem; }
.home-udemy .hero-kicker {
    background: #f6f7f9;
    color: #2d2f31;
    border-color: #e7eaee;
}
.home-udemy .hero-buttons .btn-outline {
    border-color: #1c1d1f;
    color: #1c1d1f;
}
.home-udemy .hero-buttons .btn-outline:hover {
    background: #1c1d1f;
    color: #fff;
}
.home-udemy .hero-trust-list { color: #3e4143; }
.home-udemy .hero-visual .hero-card {
    background: linear-gradient(180deg, #3a2418 0%, #24160f 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .12);
    border-top: 3px solid #F15A22;
}

.home-udemy .hero-search {
    border: 2px solid #eaedf2;
    box-shadow: 0 8px 24px rgba(28,29,31,.1);
}
.home-udemy .hero-search:focus-within {
    border-color: #1c1d1f;
    box-shadow: 0 0 0 4px rgba(28,29,31,.08);
}
.home-udemy .hero-search button {
    background: #1c1410;
    color: #fff;
    font-weight: 700;
}
.home-udemy .hero-buttons .btn {
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.home-udemy .hero-buttons .btn-gold {
    background: #F15A22;
    box-shadow: none;
}
.home-udemy .hero-floating-chip { display: none; }

.home-udemy .hero-trust-list span {
    background: #f5f7fa;
    border: 1px solid #e4e8ee;
    border-radius: 999px;
    padding: .32rem .6rem;
    font-size: .8rem;
}

.home-udemy .hero-visual {
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}
.hero-round {
    position: relative;
    width: min(100%, 380px);
    aspect-ratio: 1;
    margin: 0 auto 1.6rem;
}
.hero-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(241,90,34,0) 0deg, rgba(241,90,34,0) 230deg, #F15A22 300deg, #fff 360deg);
    animation: hero-orbit 7s linear infinite;
}
.hero-orbit::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #fff;
}
.home-udemy .hero-visual .hero-carousel {
    position: absolute;
    inset: 18px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    padding: 1.7rem 2rem 1.35rem;
    text-align: center;
    border: 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.hero-carousel-kicker {
    margin: 0 0 .45rem;
    color: rgba(255,255,255,.75);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero-round-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #5C2A12;
    box-shadow: 0 8px 18px rgba(0,0,0,.16);
    cursor: pointer;
}
.hero-round-btn.is-prev { left: 2px; }
.hero-round-btn.is-next { right: 2px; }
.hero-round-btn:hover { background: #F15A22; color: #fff; }
.hero-carousel-viewport { overflow: hidden; width: 100%; }
.hero-carousel-track {
    display: flex;
    transition: transform .45s ease;
}
.hero-slide {
    flex: 0 0 100%;
    min-width: 0;
    color: #fff;
    display: grid;
    justify-items: center;
    gap: .28rem;
    text-align: center;
}
.hero-slide img,
.hero-slide-fallback {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 0 .2rem;
    background: rgba(255,255,255,.1);
}
.hero-slide-fallback {
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    color: #F15A22;
}
.hero-slide strong {
    font-size: .98rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-slide em {
    font-style: normal;
    color: rgba(255,255,255,.72);
    font-size: .8rem;
}
.hero-slide small {
    color: rgba(255,255,255,.78);
    font-size: .75rem;
}
.hero-slide small i { color: #F15A22; }
.hero-slide b { color: #F15A22; font-size: .95rem; }
.hero-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1.35rem;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: .4rem;
}
.hero-carousel-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d7d3d0;
    cursor: pointer;
}
.hero-carousel-dots button.is-active { background: #F15A22; }
.hero-carousel-empty { color: rgba(255,255,255,.8); margin: 0; }
@keyframes hero-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .hero-carousel-track { transition: none; }
    .hero-orbit { animation: none; }
}
.home-udemy .hero-stats-row { margin-top: 1rem; gap: .65rem; }
.home-udemy .hero-stat {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    padding: .7rem .35rem;
}
.home-udemy .hero-stat strong {
    font-size: 1.9rem;
}

.home-udemy .chip-one,
.home-udemy .chip-two { display: none; }
@keyframes pulseChip {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.1); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}
.hero-video-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="g" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r=".5" fill="rgba(255,255,255,.03)"/></pattern></defs><rect fill="url(%23g)" width="100" height="100"/></svg>');
    opacity: .5;
}
.hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241,90,34,.15) 0%, transparent 70%);
    top: -100px; right: -100px;
    animation: pulse 4s ease-in-out infinite;
}
.hero-glow-2 {
    width: 450px;
    height: 450px;
    left: -120px;
    top: auto;
    bottom: -120px;
    background: radial-gradient(circle, rgba(75,180,230,.18) 0%, transparent 72%);
    animation-delay: 1s;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: .5; }
    50% { transform: scale(1.1); opacity: .8; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeUp .8s ease;
}
.hero-text h1 span { color: var(--gold); }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .9rem;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hero-text p {
    font-size: 1.2rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 2.5rem;
    animation: fadeUp .8s ease .2s both;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeUp .8s ease .4s both;
}
.hero-trust-list {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255,255,255,.85);
    font-size: .88rem;
}
.hero-trust-list span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust-list i { color: var(--gold); }
.hero-search {
    display: flex;
    align-items: center;
    gap: .7rem;
    background: #fff;
    border-radius: 999px;
    padding: .45rem .5rem .45rem 1rem;
    max-width: 560px;
    margin-bottom: 1.25rem;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.hero-search i { color: var(--gray-500); }
.hero-search input {
    border: 0;
    outline: none;
    flex: 1;
    font-size: .95rem;
}
.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: .6rem 1rem;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
}
.hero-search button:hover { background: var(--purple); }

.hero-visual {
    position: relative;
    animation: fadeUp .8s ease .3s both;
}
.hero-card {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}
.hero-card-interactive {
    transform-style: preserve-3d;
    transition: transform .25s ease, box-shadow .25s ease;
}
.hero-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: #fff;
}
.home-udemy .hero-carousel .hero-slide img {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin: 0 0 .2rem;
    background: rgba(255,255,255,.1);
}
.hero-floating-chip {
    position: absolute;
    padding: .6rem .95rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: .78rem;
    backdrop-filter: blur(10px);
    animation: floatY 4.5s ease-in-out infinite;
}
.hero-floating-chip i { color: var(--gold); margin-right: .25rem; }
.chip-one { top: -15px; right: 20px; }
.chip-two { bottom: -14px; left: 0; animation-delay: 1s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.hero-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,.05);
    border-radius: var(--radius);
}
.hero-stat strong {
    display: block;
    font-size: 1.75rem;
    color: var(--gold);
    font-weight: 800;
}
.hero-stat span { font-size: .8rem; color: rgba(255,255,255,.7); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Sections ---- */
.section { padding: 5rem 0; }
.section-alt { background: var(--gray-50); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .section-subtitle { margin: .75rem auto 0; }
.trust-strip {
    margin-top: -36px;
    position: relative;
    z-index: 5;
}
.brand-strip {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}
.brand-strip p {
    text-align: center;
    color: var(--gray-500);
    font-size: .9rem;
    padding-top: 1.2rem;
}
.brand-strip-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    text-align: center;
    padding: .85rem 0 1.2rem;
}
.brand-strip-grid span {
    font-weight: 800;
    letter-spacing: .07em;
    color: #3a3a5c;
    font-size: .82rem;
    opacity: .8;
}
.trust-strip-grid {
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
}
.trust-strip-grid > div {
    padding: 1.2rem 1rem;
    text-align: center;
    border-right: 1px solid var(--gray-100);
}
.trust-strip-grid > div:last-child { border-right: 0; }
.trust-strip-grid strong {
    display: block;
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: .4rem;
    color: var(--navy);
}
.trust-strip-grid span { font-size: .84rem; color: var(--gray-500); }

/* ---- Course Cards ---- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.75rem;
}

.catalog-filters {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.catalog-filters-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}
.catalog-filters-btn { white-space: nowrap; }

.course-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    cursor: pointer;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.course-card-img {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, var(--purple), var(--navy));
    overflow: hidden;
}
.course-card-img img { width: 100%; height: 100%; object-fit: cover; }
.course-card-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--gold);
    color: var(--navy);
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .75rem;
    border-radius: 50px;
}
.course-card-body { padding: 1.25rem; }
.course-card-category {
    font-size: .8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.course-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
[data-theme="dark"] .course-card-title { color: var(--gray-900); }
.course-card-instructor {
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: .75rem;
}
.course-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    border-top: 1px solid var(--gray-200);
}
.course-rating { color: var(--gold); font-size: .85rem; font-weight: 600; }
.course-price { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
[data-theme="dark"] .course-price { color: var(--gold); }
.course-price-old {
    font-size: .85rem;
    color: var(--gray-500);
    text-decoration: line-through;
    margin-right: .5rem;
}

/* ---- Udemy-like Shelf ---- */
.udemy-tabs {
    position: relative;
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid #dfe3e8;
    overflow-x: auto;
    scrollbar-width: none;
}
.udemy-tabs::-webkit-scrollbar { display: none; }
.udemy-tabs button {
    position: relative;
    z-index: 1;
    border: 0;
    background: transparent;
    color: #6a6f73;
    font-weight: 600;
    font-size: .95rem;
    padding: .7rem 0;
    white-space: nowrap;
    cursor: pointer;
    transition: color .25s ease;
}
.udemy-tabs button:hover { color: #1c1d1f; }
.udemy-tabs button.active { color: #1c1d1f; }
.udemy-tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 40px;
    background: #1c1d1f;
    border-radius: 2px;
    transition: transform .28s cubic-bezier(.4,0,.2,1), width .28s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}

.udemy-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.15rem;
}
.udemy-course-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d1d7dc;
    border-radius: 12px;
    overflow: hidden;
    color: #1c1d1f;
    text-decoration: none;
    opacity: 0;
    transform: translateY(14px) scale(.98);
    transition:
        opacity .35s ease,
        transform .35s cubic-bezier(.22,1,.36,1),
        box-shadow .3s ease,
        border-color .3s ease;
}
.udemy-course-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: var(--card-delay, 0ms);
}
.udemy-course-card.is-hiding {
    opacity: 0;
    transform: translateY(8px) scale(.97);
    pointer-events: none;
    transition-delay: 0ms;
}
.udemy-course-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 18px 40px rgba(28,29,31,.16);
    border-color: #b8c0c8;
    color: #1c1d1f;
}
.udemy-course-image {
    position: relative;
    height: 148px;
    background: #eceff3;
    overflow: hidden;
}
.udemy-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.udemy-course-card:hover .udemy-course-image img {
    transform: scale(1.08);
}
.udemy-image-placeholder {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(241,90,34,.35), transparent 45%),
        linear-gradient(135deg, #7A3B18, #5C2A12 55%, #3D1A0C);
}
.udemy-play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #5C2A12;
    display: grid;
    place-items: center;
    font-size: .95rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    opacity: 0;
    transform: scale(.7);
    transition: opacity .28s ease, transform .28s cubic-bezier(.22,1,.36,1), background .2s ease;
    z-index: 2;
}
.udemy-play-btn i { margin-left: 2px; }
.udemy-course-card:hover .udemy-play-btn {
    opacity: 1;
    transform: scale(1);
}
.udemy-course-card:hover .udemy-play-btn:hover,
.udemy-course-card:hover .udemy-play-btn {
    background: var(--gold);
    color: var(--navy);
}
.udemy-image-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .6s ease;
    pointer-events: none;
    z-index: 1;
}
.udemy-course-card:hover .udemy-image-shine {
    transform: translateX(120%);
}
.udemy-course-body {
    padding: 1rem .95rem .95rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.udemy-course-body h3 {
    font-size: 1.02rem;
    line-height: 1.3;
    margin-bottom: .35rem;
    color: #1c1d1f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    transition: color .2s ease;
}
.udemy-course-card:hover .udemy-course-body h3 { color: #5624d0; }
.udemy-course-author {
    font-size: .8rem;
    color: #6a6f73;
    margin-bottom: .55rem;
}
.udemy-course-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}
.badge-bestseller {
    background: #d1f0ea;
    color: #0f766e;
    font-size: .68rem;
    padding: .2rem .45rem;
    border-radius: 4px;
    font-weight: 700;
}
.badge-rating {
    font-size: .75rem;
    color: #b4690e;
    font-weight: 700;
}
.badge-rating i { margin-right: .15rem; }
.badge-reviews {
    font-size: .73rem;
    color: #6a6f73;
}
.udemy-course-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.udemy-course-price {
    font-weight: 800;
    color: #1c1d1f;
    font-size: 1.05rem;
    display: flex;
    align-items: baseline;
    gap: .4rem;
}
.udemy-price-old {
    font-size: .78rem;
    font-weight: 600;
    color: #8a8f94;
    text-decoration: line-through;
}
.udemy-course-cta {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f7;
    color: #5624d0;
    display: grid;
    place-items: center;
    font-size: .75rem;
    transition: background .25s ease, transform .25s ease, color .25s ease;
}
.udemy-course-card:hover .udemy-course-cta {
    background: #5624d0;
    color: #fff;
    transform: translateX(3px);
}
.udemy-more-wrap { margin-top: 1.4rem; }
.udemy-link-more {
    color: #5624d0;
    font-weight: 700;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: gap .25s ease, color .2s ease;
}
.udemy-link-more:hover {
    color: #3d1a9c;
    gap: .65rem;
}
.udemy-empty-state {
    text-align: center;
    color: #6a6f73;
    padding: 2rem 1rem;
    font-size: .95rem;
}

[data-theme="dark"] .udemy-course-card {
    background: #15142a;
    border-color: #2f2d49;
}
[data-theme="dark"] .udemy-course-body h3,
[data-theme="dark"] .udemy-course-price { color: #f2f3f5; }
[data-theme="dark"] .udemy-course-card:hover .udemy-course-body h3 { color: var(--gold); }
[data-theme="dark"] .udemy-course-author,
[data-theme="dark"] .badge-reviews { color: #a6a9b8; }
[data-theme="dark"] .udemy-tabs { border-color: #353352; }
[data-theme="dark"] .udemy-tabs button { color: #adb1bf; }
[data-theme="dark"] .udemy-tabs button:hover,
[data-theme="dark"] .udemy-tabs button.active { color: #fff; }
[data-theme="dark"] .udemy-tab-indicator { background: var(--gold); }
[data-theme="dark"] .udemy-course-cta { background: #24233a; color: var(--gold); }
[data-theme="dark"] .udemy-course-card:hover .udemy-course-cta {
    background: var(--gold);
    color: var(--navy);
}

/* ---- Categories ---- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}
.category-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}
.category-card:hover {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(241,90,34,.05), rgba(122,59,24,.05));
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.category-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--navy), var(--purple));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    color: var(--gold);
    font-size: 1.5rem;
}
.category-card h4 { font-size: .9rem; color: var(--navy); margin-bottom: .25rem; }
[data-theme="dark"] .category-card h4 { color: var(--gray-900); }
.category-card span { font-size: .8rem; color: var(--gray-500); }

/* ---- Value Props ---- */
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.value-card {
    display: block;
    color: inherit;
    text-decoration: none;
    background: linear-gradient(145deg, var(--white), var(--gray-50));
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}
.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(241,90,34,.5);
}
.value-card i {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(241,90,34,.12);
    color: var(--gold-dark);
    margin-bottom: .9rem;
}
.value-card h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.value-card p { color: var(--gray-500); font-size: .92rem; }

/* ---- Stats Banner ---- */
.stats-banner {
    background: linear-gradient(135deg, var(--navy), var(--purple));
    padding: 4rem 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-item strong {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: .5rem;
}
.stat-item span { color: rgba(255,255,255,.8); font-size: 1rem; }

/* ---- Testimonials ---- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.75rem;
}
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
}
.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    color: var(--gold);
    opacity: .3;
    position: absolute;
    top: .5rem; left: 1.5rem;
    line-height: 1;
    font-family: Georgia, serif;
}
.testimonial-text {
    font-style: italic;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.testimonial-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: var(--navy);
    font-size: 1.1rem;
}
.testimonial-author strong { display: block; color: var(--navy); font-size: .95rem; }
[data-theme="dark"] .testimonial-author strong { color: var(--gray-900); }
.testimonial-author span { font-size: .8rem; color: var(--gray-500); }
.stars { color: var(--gold); font-size: .9rem; margin-bottom: .5rem; }

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: .75rem;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border: none;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
[data-theme="dark"] .faq-question { color: var(--gray-900); background: var(--gray-100); }
.faq-question:hover { background: var(--gray-50); }
.faq-question i { color: var(--gold); transition: transform .3s; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s;
    padding: 0 1.5rem;
    color: var(--gray-500);
}
.faq-item.open .faq-answer { max-height: 200px; padding: 0 1.5rem 1.25rem; }

/* ---- Footer ---- */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,.8);
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer .logo img { height: 72px; width: 72px; }
.footer-brand p { margin: 1rem 0 1.5rem; font-size: .9rem; line-height: 1.7; }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    transition: var(--transition);
}
.footer-social a:hover { background: var(--gold); color: #fff; }
.footer h5 { color: var(--gold); font-size: 1rem; margin-bottom: 1.25rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: .6rem; }
.footer ul a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer ul a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 2rem;
    padding-right: 5.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: .85rem;
}
.footer-credit { color: rgba(255,255,255,.85); }
.footer-credit:hover { color: var(--gold); }
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 4.75rem;
    }
}

/* ---- Auth Pages ---- */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: var(--header-height);
}
.auth-visual {
    background: linear-gradient(135deg, var(--navy), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.auth-visual-content { text-align: center; color: var(--white); position: relative; z-index: 2; }
.auth-visual img {
    width: 168px;
    height: 168px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 2rem;
    background: #fff;
}
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--white);
}
.auth-form { width: 100%; max-width: 420px; }
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .85rem;
    line-height: 1.45;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    cursor: pointer;
}
.auth-terms input { margin-top: .2rem; flex: none; }
.auth-terms span { min-width: 0; }
.auth-form h2 { font-size: 2rem; margin-bottom: .5rem; }
.auth-form p { color: var(--gray-500); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .5rem;
    color: var(--gray-700);
}
.form-control {
    width: 100%;
    padding: .875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--gray-50);
    color: var(--gray-900);
    transition: var(--transition);
    font-family: var(--font);
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(241,90,34,.15);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: .9rem;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* ---- Dashboard Layout ---- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}
.sidebar {
    width: 260px;
    background: var(--navy);
    color: var(--white);
    padding: 1.5rem 0;
    flex-shrink: 0;
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    overflow-y: auto;
}
.sidebar-nav { list-style: none; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1.5rem;
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255,255,255,.08);
    color: var(--gold);
    border-left-color: var(--gold);
}
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: var(--gray-50);
    min-width: 0;
}

/* Menu inferior do aluno (tablet/telemóvel) */
.student-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
}
.student-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    padding: .45rem .2rem;
    font-size: .65rem;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: none;
}
.student-bottom-nav a i { font-size: 1.1rem; }
.student-bottom-nav a.active { color: var(--navy); }
.student-bottom-nav a.active i { color: var(--gold); }

body.student-area .ai-chat-widget { bottom: 72px; }

.dashboard-main {
    min-height: calc(100vh - var(--header-height));
    overflow-x: clip;
}
.dash-page-title {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    margin-bottom: 1rem;
}
.dash-empty {
    color: var(--gray-500);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.table-responsive .data-table {
    box-shadow: none;
    min-width: 640px;
}
.data-table code,
.cert-card code {
    word-break: break-all;
    white-space: normal;
}
.cert-verify { color: #b45309; font-weight: 700; }

.cert-cards { display: none; gap: .9rem; }
.cert-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: .85rem;
}
.cert-card-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}
.cert-card-top strong {
    color: var(--navy);
    font-size: 1rem;
    line-height: 1.35;
}
.cert-card-top span {
    color: var(--gray-500);
    font-size: .85rem;
    white-space: nowrap;
}
.cert-card-meta {
    display: grid;
    gap: .55rem;
}
.cert-card-meta small {
    display: block;
    color: var(--gray-500);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}
.cert-card-btn,
.cert-actions .btn {
    justify-content: center;
}
.cert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.cert-actions .btn {
    padding: .45rem .75rem;
    font-size: .85rem;
}
.proof-linkedin { color: #0A66C2; }
.proof-linkedin:hover { color: #084e96; }

.proof-page { padding-top: calc(var(--header-height) + 2.5rem); }
.proof-wrap { max-width: 920px; }
.proof-banner,
.proof-card,
.proof-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.proof-banner {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}
.proof-banner i { font-size: 1.35rem; margin-top: .15rem; }
.proof-banner strong { display: block; margin-bottom: .2rem; }
.proof-banner p { color: var(--gray-500); margin: 0; }
.proof-banner.is-valid { background: #ecfdf3; border-color: #a7f3d0; }
.proof-banner.is-valid i, .proof-banner.is-valid strong { color: #047857; }
.proof-banner.is-revoked,
.proof-banner.is-expired { background: #fff7ed; border-color: #fed7aa; }
.proof-banner.is-revoked i, .proof-banner.is-revoked strong,
.proof-banner.is-expired i, .proof-banner.is-expired strong { color: #c2410c; }
.proof-banner.is-invalid { background: #fef2f2; border-color: #fecaca; }
.proof-banner.is-invalid i, .proof-banner.is-invalid strong { color: #b91c1c; }
.proof-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.proof-kicker {
    color: var(--gold-dark);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .35rem;
}
.proof-main h2 { font-size: 1.7rem; line-height: 1.2; margin-bottom: .35rem; }
.proof-course { font-size: 1.05rem; margin-bottom: 1rem; }
.proof-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1rem;
    margin: 0 0 1.1rem;
}
.proof-facts div { min-width: 0; }
.proof-facts dt {
    color: var(--gray-500);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.proof-facts dd { margin: .15rem 0 0; font-weight: 600; word-break: break-word; }
.proof-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .75rem; }
.proof-note { color: var(--gray-500); font-size: .9rem; margin: 0; }
.proof-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    text-align: center;
    color: var(--gray-500);
    font-size: .8rem;
}
.proof-qr svg { width: 148px; height: 148px; background: #fff; border-radius: 12px; }
.proof-form { padding: 1.25rem; }
.proof-form label { display: block; font-weight: 600; margin-bottom: .55rem; }
.proof-form-row { display: flex; gap: .6rem; }
.proof-form-row .form-control { flex: 1; }
@media (max-width: 720px) {
    .proof-card, .proof-facts, .proof-form-row { grid-template-columns: 1fr; display: grid; }
    .proof-form-row { display: grid; }
    .proof-qr { order: -1; }
}

/* ---- Stats Cards ---- */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.stat-card-icon.gold { background: rgba(241,90,34,.15); color: var(--gold-dark); }
.stat-card-icon.navy { background: rgba(92,42,18,.1); color: var(--navy); }
.stat-card-icon.accent { background: rgba(75,180,230,.15); color: var(--accent); }
.stat-card-icon.green { background: rgba(16,185,129,.15); color: var(--success); }
.stat-card-value { font-size: 1.75rem; font-weight: 800; color: var(--navy); line-height: 1; }
[data-theme="dark"] .stat-card-value { color: var(--gray-900); }
.stat-card-label { font-size: .85rem; color: var(--gray-500); margin-top: .25rem; }

/* ---- Admin Dashboard Premium ---- */
.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(120deg, #5C2A12, #7A3B18);
    color: #fff;
    border-radius: 18px;
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow-lg);
}
.admin-hero h1 { color: #fff; margin: 0; font-size: 1.55rem; }
.admin-hero p { margin: .35rem 0 0; color: rgba(255,255,255,.8); font-size: .92rem; }
.admin-hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.admin-topbar-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(120deg, #3D1A0C, #5C2A12 58%, #7A3B18);
    color: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}
.admin-topbar-card h1 { margin: .15rem 0; color: #fff; font-size: 1.2rem; }
.admin-topbar-card p { margin: 0; color: rgba(255,255,255,.85); font-size: .82rem; }
.admin-topbar-greet { font-size: .8rem !important; opacity: .95; }
.admin-topbar-mini-stats { display: flex; gap: 1rem; text-align: right; }
.admin-topbar-mini-stats strong { display: block; color: #fff; font-size: 1.2rem; line-height: 1; }
.admin-topbar-mini-stats span { font-size: .7rem; color: rgba(255,255,255,.78); text-transform: uppercase; letter-spacing: .08em; }

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.admin-kpi-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: .95rem 1rem;
    box-shadow: var(--shadow-sm);
}
.admin-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(92,42,18,.08);
    color: var(--navy);
}
.admin-kpi-card h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--navy);
}
.admin-kpi-card p {
    margin: .1rem 0 0;
    font-size: .82rem;
    color: var(--gray-500);
}
.admin-kpi-grid-four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.admin-kpi-card {
    border: 0;
    color: #fff;
    border-radius: 12px;
    padding: .95rem 1rem;
    background: linear-gradient(120deg, #F15A22, #E08A4A);
    box-shadow: 0 8px 20px rgba(26,54,95,.18);
}
.admin-kpi-card h3, .admin-kpi-card p { color: #fff; margin: 0; }
.admin-kpi-card p { opacity: .85; font-size: .75rem; margin-top: .15rem; }
.admin-kpi-card .admin-kpi-icon { background: rgba(255,255,255,.22); color: #fff; }
.admin-kpi-card.card-blue { background: linear-gradient(120deg, #F15A22, #FF8A4A); }
.admin-kpi-card.card-navy { background: linear-gradient(120deg, #3D1A0C, #5C2A12); }
.admin-kpi-card.card-red { background: linear-gradient(120deg, #7A3B18, #9A5230); }
.admin-kpi-card.card-purple { background: linear-gradient(120deg, #C2410C, #E08A4A); }
.admin-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: .7rem;
    margin-bottom: 1rem;
}
.admin-shortcut {
    border: 1px solid var(--gray-200);
    background: #fff;
    border-radius: 10px;
    padding: .8rem .65rem;
    text-align: center;
    color: var(--gray-700);
    font-size: .78rem;
    display: grid;
    gap: .3rem;
}
.admin-shortcut i { color: #2f7fd0; font-size: 1rem; }
.admin-shortcut span { font-weight: 600; }
.admin-shortcut:hover { border-color: #9db8dc; transform: translateY(-2px); color: var(--navy); }

.admin-panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.admin-panels-grid-2 { grid-template-columns: 1.2fr .8fr; }
.admin-panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    min-height: 290px;
}
.admin-panel header {
    margin-bottom: .8rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--gray-100);
}
.admin-panel h3 {
    margin: 0;
    font-size: .98rem;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.admin-panel header small { color: var(--gray-500); font-size: .76rem; }
.admin-panel canvas {
    height: 220px !important;
}
.admin-content-bars { display: grid; gap: .45rem; margin-top: .5rem; }
.admin-content-bars div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--gray-700);
    border-top: 1px solid var(--gray-100);
    padding-top: .35rem;
}
.admin-content-bars strong { color: var(--navy); font-size: .86rem; }

.admin-content-bars strong { color: var(--navy); font-size: .86rem; }

/* ---- Course Manage ---- */
.course-manage-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.course-manage-top h1 { margin: .2rem 0; font-size: 1.55rem; }
.course-manage-top p { margin: 0; color: var(--gray-500); }
.course-manage-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: .2rem;
}
.course-manage-top-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.course-manage-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.course-manage-tabs a {
    padding: .7rem 1rem;
    color: var(--gray-500);
    font-weight: 600;
    font-size: .9rem;
    border-bottom: 2px solid transparent;
}
.course-manage-tabs a.active {
    color: var(--navy);
    border-bottom-color: var(--gold);
}
.course-manage-section { display: none; }
.course-manage-section.is-active { display: block; }
.course-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    color: var(--gray-700);
    margin: .4rem 0;
}
.course-thumb-preview {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: .7rem;
}
.module-create-form {
    display: flex;
    gap: .7rem;
    align-items: end;
    flex-wrap: wrap;
}
.module-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}
.module-card-head {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: flex-start;
    margin-bottom: .8rem;
}
.module-card-head h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.module-card-head small { color: var(--gray-500); font-size: .78rem; }
.module-card-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.module-panel {
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: 12px;
    padding: .9rem;
    margin-bottom: .8rem;
}
.module-edit-grid,
.lesson-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    align-items: end;
}
.lesson-list { display: grid; gap: .55rem; }
.lesson-item {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    align-items: center;
    padding: .7rem .8rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: #fff;
}
.lesson-item-main { display: flex; gap: .7rem; align-items: center; }
.lesson-item-main strong { display: block; font-size: .9rem; }
.lesson-item-main small { color: var(--gray-500); font-size: .75rem; }
.lesson-type {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(122,59,24,.08);
    color: var(--navy);
    display: grid;
    place-items: center;
}
.lesson-item-actions { display: flex; gap: .35rem; }
.lesson-empty {
    margin: 0;
    color: var(--gray-500);
    font-size: .88rem;
    padding: .5rem 0;
}
@media (max-width: 992px) {
    .module-edit-grid,
    .lesson-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .course-manage-top { flex-direction: column; }
    .module-card-head { flex-direction: column; }
    .module-edit-grid,
    .lesson-form-grid { grid-template-columns: 1fr; }
    .module-create-form { flex-direction: column; align-items: stretch; }
}

.admin-ranking-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.admin-ranking-item:last-child { border-bottom: 0; }
.admin-ranking-item .rank {
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(241,90,34,.2);
    color: #8a5a00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .82rem;
}
.admin-ranking-item strong {
    display: block;
    font-size: .88rem;
}
.admin-ranking-item small {
    color: var(--gray-500);
    font-size: .75rem;
}

.admin-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}
.admin-quick-actions a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .7rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: .84rem;
    color: var(--gray-700);
    background: var(--gray-50);
}
.admin-quick-actions a:hover {
    border-color: var(--gold);
    color: var(--navy);
    background: #fffdf7;
}

/* ---- Modern Course Form ---- */
.course-form-modern {
    background: transparent;
    margin-bottom: 1rem;
}
.course-management-panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1rem;
}
.course-management-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 .8rem;
}
.course-management-head h3 {
    margin: 0;
    font-size: .98rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.course-management-divider {
    border-top: 1px dashed var(--gray-300);
    margin: 1rem 0;
}
.admin-list-panel {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid #d8deea;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}
[data-theme="dark"] .admin-list-panel {
    background: linear-gradient(180deg, #1a1930 0%, #121126 100%);
    border-color: #2f2d4c;
}
.course-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr);
    gap: 1rem;
}
.course-form-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1rem;
}
.course-form-section h3 {
    font-size: 1rem;
    margin: 0 0 .8rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.course-lang-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: .8rem;
}
.course-lang-switch button {
    border: 0;
    background: var(--gray-50);
    padding: .55rem;
    font-weight: 600;
    font-size: .82rem;
    color: var(--gray-500);
}
.course-lang-switch button.active {
    background: #fff;
    color: var(--accent);
}
.course-form-side { display: grid; gap: .9rem; align-content: start; }
.course-form-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1rem;
}
.course-form-card h4 {
    font-size: .95rem;
    margin: 0 0 .75rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.course-upload-drop {
    border: 1px dashed var(--gray-300);
    border-radius: 12px;
    min-height: 130px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--gray-500);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.course-upload-drop:hover {
    border-color: var(--accent);
    background: rgba(75,180,230,.06);
}
.course-upload-drop i { font-size: 1.35rem; color: var(--accent); margin-bottom: .2rem; }
.course-upload-drop span { font-weight: 700; font-size: .88rem; }
.course-upload-drop small { font-size: .78rem; }
.course-upload-video { min-height: 110px; }
.course-video-preview {
    width: 100%;
    margin-top: .7rem;
    border-radius: 10px;
    background: #000;
    max-height: 180px;
}
.course-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
}
.student-form-modern {
    background: transparent;
}
.student-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
}
@media (max-width: 992px) {
    .student-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .student-form-grid { grid-template-columns: 1fr; }
}

/* ---- Tables ---- */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}
.data-table th {
    background: var(--gray-50);
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: .85rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--gray-200);
}
.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
}
.data-table tr:hover td { background: var(--gray-50); }

.badge {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 700;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #DBEAFE; color: #1E40AF; }

/* ---- Progress Bar ---- */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 50px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 50px;
    transition: width .6s ease;
}

/* ---- AI Chat Widget ---- */
.ai-chat-widget {
    position: fixed;
    bottom: 2rem; right: 2rem;
    z-index: 999;
}
.ai-chat-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    font-size: 1.5rem;
    color: var(--navy);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.ai-chat-btn:hover { transform: scale(1.1); }

/* ---- Course detail (responsive) ---- */
.course-detail-page {
    padding: calc(var(--header-height) + 1.5rem) 0 3rem;
    background: var(--gray-50);
    min-height: 60vh;
    overflow-x: clip;
}
.course-detail-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
}
.course-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 320px);
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}
.course-detail-main,
.course-detail-aside {
    min-width: 0;
    max-width: 100%;
}
.course-detail-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    max-width: 100%;
}
.course-detail-media {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--navy), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.course-detail-media video,
.course-detail-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}
.course-detail-media-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 220px;
}
.course-detail-media-fallback i {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--gold);
    opacity: .65;
}
.course-detail-body {
    padding: clamp(1.1rem, 3vw, 2rem);
}
.course-detail-body h1 {
    font-size: clamp(1.35rem, 3.5vw, 2rem);
    margin: .75rem 0 .5rem;
    line-height: 1.25;
    word-break: break-word;
}
.course-detail-body h3 {
    margin: 1.75rem 0 .85rem;
    font-size: 1.1rem;
}
.course-detail-subtitle {
    color: var(--gray-500);
    font-size: clamp(1rem, 2.4vw, 1.1rem);
    margin-bottom: 1.1rem;
}
.course-detail-meta {
    display: flex;
    gap: .85rem 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    color: var(--gray-500);
}
.course-detail-meta .fa-star { color: var(--gold); }
.course-detail-text {
    color: var(--gray-700);
    line-height: 1.8;
}
.course-detail-objectives {
    list-style: none;
    padding: 0;
    margin: 0;
}
.course-detail-objectives li {
    padding: .4rem 0;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}
.course-detail-objectives .fa-check {
    color: var(--success);
    margin-top: .2rem;
    flex-shrink: 0;
}
.course-module-block {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: .75rem;
    overflow: hidden;
}
.course-module-head {
    padding: .9rem 1.1rem;
    background: var(--gray-50);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.course-module-head small {
    color: var(--gray-500);
    font-weight: 400;
}
.course-lesson-row {
    padding: .7rem 1.1rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
}
.course-lesson-row i { color: var(--gray-500); flex-shrink: 0; }
.course-lesson-row .badge { margin-left: auto; }
.course-detail-muted { color: var(--gray-500); }
.course-review {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.course-review-head {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .45rem;
}
.course-review-head .testimonial-avatar {
    width: 40px;
    height: 40px;
    font-size: .9rem;
}
.course-review p {
    color: var(--gray-700);
    font-size: .9rem;
    margin: 0;
}

.course-buy-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    position: sticky;
    top: calc(var(--header-height) + 1rem);
    width: 100%;
    box-sizing: border-box;
}
.course-buy-price {
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .65rem;
    line-height: 1.2;
    word-break: break-word;
}
.course-buy-price span {
    display: inline-block;
    margin-left: .35rem;
    font-size: 1rem;
    color: var(--gray-500);
    text-decoration: line-through;
    font-weight: 400;
}
.course-buy-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: .75rem;
    display: inline-flex !important;
    box-sizing: border-box;
}
.course-buy-guarantee {
    text-align: center;
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: 1.25rem;
}
.course-buy-includes {
    border-top: 1px solid var(--gray-200);
    padding-top: 1.1rem;
}
.course-buy-includes > p {
    font-weight: 700;
    margin-bottom: .85rem;
    font-size: .95rem;
}
.course-buy-includes ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .9rem;
    color: var(--gray-700);
}
.course-buy-includes li {
    padding: .4rem 0;
    display: flex;
    align-items: center;
    gap: .55rem;
}
.course-buy-includes i {
    color: var(--gold);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.course-buy-instructor {
    border-top: 1px solid var(--gray-200);
    padding-top: 1.1rem;
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
}
.course-buy-instructor strong {
    display: block;
    font-size: .9rem;
}
.course-buy-instructor p {
    font-size: .8rem;
    color: var(--gray-500);
    margin: 0;
}

/* ---- Header: tablet + mobile (≤1100px) ---- */
@media (max-width: 1100px) {
    .header-inner {
        padding: 0 1rem;
        gap: .5rem;
    }
    .logo img { height: 44px; width: 44px; }
    .logo-text { font-size: .95rem; }
    .logo-text small { font-size: .55rem; }

    .nav {
        display: none;
        flex: unset;
        gap: 0;
    }
    .nav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem 1.1rem 1.25rem;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--gray-200);
        z-index: 1001;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    [data-theme="dark"] .nav.open {
        background: var(--gray-50, #15132a);
        border-bottom-color: rgba(255,255,255,.08);
    }
    .nav-links {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .nav.open .nav-links {
        display: grid;
        gap: .15rem;
    }
    .nav.open .nav-links a,
    .nav.open .mega-trigger {
        display: flex;
        width: 100%;
        padding: .7rem .35rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--gray-100);
        justify-content: space-between;
    }
    .mega-menu {
        position: static;
        box-shadow: none;
        border: 0;
        padding: .35rem 0 .5rem;
    }
    .mega-item:hover .mega-menu { display: none; }
    .mega-item.is-open .mega-menu { display: block; }
    .mega-menu-inner { grid-template-columns: 1fr; padding: 0; gap: 1rem; }
    .mega-cats { grid-template-columns: 1fr; }
    .mega-side { border-left: 0; padding-left: 0; }
    .nav.open .nav-links li:last-child a { border-bottom: 0; }
    .header-actions { display: none; }
    .nav.open .header-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
        padding-top: .35rem;
    }
    .nav.open .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .nav.open .header-actions .theme-toggle {
        align-self: flex-start;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        border: 1px solid var(--gray-200);
        background: var(--gray-50);
        font-size: 1.25rem;
        color: var(--navy);
        flex-shrink: 0;
    }
    .mobile-toggle[aria-expanded="true"] {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy);
    }

    .header-category-link,
    .header-search-form,
    .home-udemy .header-search-form,
    .home-udemy .header-category-link {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { display: none; }
    .home-udemy .hero-visual {
        display: block;
        width: min(100%, 360px);
        max-width: 100%;
        margin: 1.25rem auto 0;
        justify-self: center;
    }
    .hero-round { width: 100%; margin-bottom: 2rem; }
    .hero-buttons { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .value-grid { grid-template-columns: 1fr 1fr; }
    .trust-strip-grid { grid-template-columns: 1fr 1fr; }
    .brand-strip-grid { grid-template-columns: repeat(3, 1fr); }
    .udemy-cards-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
    .home-udemy .hero-content { grid-template-columns: 1fr; width: min(760px, calc(100% - 1.5rem)); gap: 1.75rem; }
    .home-udemy .hero-text { max-width: 760px; margin: 0 auto; }
    .admin-kpi-grid,
    .admin-kpi-grid-four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
    .admin-panels-grid,
    .admin-panels-grid-2 { grid-template-columns: 1fr; }
    .admin-shortcuts-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
    .course-form-grid { grid-template-columns: 1fr; }

    .catalog-filters-form {
        grid-template-columns: 1fr 1fr;
    }
    .catalog-filters-form .form-group:first-child {
        grid-column: 1 / -1;
    }
    .catalog-filters-btn {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .course-detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .course-detail-aside {
        order: -1;
    }
    .course-buy-card {
        position: static;
        max-width: 100%;
    }
    .course-detail-container {
        padding-left: .85rem;
        padding-right: .85rem;
    }
}

@media (max-width: 1100px) {
    /* Área do aluno: menu vertical oculto → navegação pelo rodapé */
    .dashboard-layout:not(.student-player-layout) > .sidebar {
        display: none !important;
    }
    .dashboard-layout:not(.student-player-layout) > .dashboard-main {
        margin-left: 0 !important;
        padding: 1rem .9rem 5.5rem;
    }
    body.student-area .student-bottom-nav {
        display: grid;
    }
    body.student-area .footer {
        margin-bottom: 4rem;
    }
    body.student-area.student-chat .footer {
        display: none;
    }
    body.student-area.student-chat .ai-chat-widget {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-form-side { align-items: flex-start; padding: 1.25rem 1rem 5.5rem; }
    .auth-form h2 { font-size: 1.55rem; }
    .header-inner { padding: 0 .9rem; }
    .logo img { height: 42px; width: 42px; }
    .logo-text { font-size: .92rem; }
    .logo-text small { font-size: .55rem; }

    .course-detail-page { padding: calc(var(--header-height) + 1rem) 0 2rem; }
    .course-detail-grid { gap: 1rem; }
    .course-buy-card { padding: 1.1rem; border-radius: 14px; }
    .course-detail-body { padding: 1rem; }
    .course-buy-price span { display: block; margin: .25rem 0 0; }
    .catalog-filters-form { grid-template-columns: 1fr; }

    .sidebar { display: none; }
    .dashboard-main { margin-left: 0; padding: 1rem .9rem 5.5rem; }
    .cert-cards { display: grid; }
    .cert-table-wrap { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .value-grid { grid-template-columns: 1fr; }
    .trust-strip-grid > div { border-right: 0; border-bottom: 1px solid var(--gray-100); }
    .trust-strip-grid > div:last-child { border-bottom: 0; }
    .hero-trust-list { justify-content: center; }
    .promo-bar-inner { gap: .75rem; padding-right: .9rem; }
    .brand-strip-grid { grid-template-columns: 1fr 1fr; }
    .hero { min-height: auto; }
    .hero-content { padding: 2rem .9rem 2.2rem; gap: 1.25rem; }
    .hero-text h1 { font-size: clamp(1.9rem, 9vw, 2.4rem); }
    .hero-text p { font-size: 1rem; margin-bottom: 1.2rem; }
    .hero-buttons { gap: .6rem; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-search {
        max-width: 100%;
        width: 100%;
        padding: .35rem .35rem .35rem .75rem;
    }
    .hero-search input { min-width: 0; font-size: .88rem; }
    .hero-search button { padding: .5rem .8rem; font-size: .82rem; }
    .hero-kicker { font-size: .72rem; }
    .hero-trust-list { justify-content: center; gap: .45rem; }
    .hero-trust-list span { font-size: .72rem; }

    .home-udemy .hero-text {
        padding: 1.15rem;
        border-radius: 12px;
        box-shadow: 0 10px 26px rgba(28,29,31,.15);
    }
    .home-udemy .hero-text h1 {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
        line-height: 1.12;
    }
    .home-udemy .hero-trust-list span {
        width: 100%;
        justify-content: center;
    }
    .trust-strip { margin-top: 0; }
    .trust-strip-grid { border-radius: 12px; }
    .udemy-tabs { gap: .75rem; }
    .udemy-tabs button { font-size: .85rem; }
    .udemy-cards-grid { grid-template-columns: 1fr; }
    .udemy-course-image { height: 170px; }
    .ai-chat-widget { bottom: 1rem; right: 1rem; }
    .ai-chat-btn { width: 52px; height: 52px; font-size: 1.2rem; }
    .admin-hero { flex-direction: column; align-items: flex-start; }
    .admin-hero h1 { font-size: 1.3rem; }
    .admin-topbar-card { flex-direction: column; }
    .admin-topbar-mini-stats { width: 100%; justify-content: space-between; text-align: center; }
    .admin-kpi-grid { grid-template-columns: 1fr; }
    .admin-kpi-grid-four { grid-template-columns: 1fr; }
    .admin-shortcuts-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .admin-quick-actions { grid-template-columns: 1fr; }
    .admin-panel { min-height: 250px; }
}

@media (max-width: 480px) {
    .home-udemy .hero-visual .hero-carousel { padding: 1.15rem 1.35rem .95rem; }
    .hero-slide img,
    .hero-slide-fallback { width: 56px; height: 56px; }
    .hero-slide strong { font-size: .86rem; }
    .hero-round-btn { width: 32px; height: 32px; }
    .container { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 420px) {
    .promo-bar { font-size: .78rem; }
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .brand-strip-grid { grid-template-columns: 1fr; }
    .section { padding: 3rem 0; }
    .section-title { font-size: 1.45rem; }
}

/* ---- Animations ---- */
.fade-in { animation: fadeUp .6s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---- Espaços publicitários ---- */
.anuncio {
    position: relative;
    z-index: 4;
    clear: both;
    display: block;
    width: min(1100px, calc(100% - 2rem));
    margin: 1rem auto;
    box-sizing: border-box;
    isolation: isolate;
}
.anuncio[data-zona="topo"] {
    margin-top: calc(var(--header-height) + .85rem);
}
.anuncio[data-zona="topo"] + main .promo-bar {
    margin-top: 0;
    padding-top: 0 !important;
}
.anuncio[data-zona="topo"] + main .hero { padding-top: 2.5rem; }
.anuncio[data-zona="topo"] + main > .section:first-child,
.anuncio[data-zona="topo"] + main > section:first-child:not(.promo-bar) {
    padding-top: 2.25rem !important;
}
.anuncio[data-zona="rodape"] { margin-bottom: 1.25rem; }
.course-detail-page .anuncio {
    margin: 1.25rem auto 0;
}
.anuncio[data-zona="topo"],
.anuncio[data-zona="cursos"],
.anuncio[data-zona="blog"] { width: min(728px, calc(100% - 2rem)); }
.anuncio[data-zona="inicio"],
.anuncio[data-zona="rodape"] { width: min(970px, calc(100% - 2rem)); }
.anuncio[data-zona="curso"],
.anuncio-quadrado { width: min(300px, 100%); }
.anuncio-faixa { min-height: 90px; }
.anuncio-viewport {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(92, 42, 18, .12);
    background: #fff;
}
.anuncio-track { display: flex; transition: transform .45s ease; }
.anuncio-slide { flex: 0 0 100%; min-width: 0; }
.anuncio a { display: block; }
.anuncio img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    background: #1c1410;
}
.anuncio[data-zona="topo"] img,
.anuncio[data-zona="cursos"] img,
.anuncio[data-zona="blog"] img { aspect-ratio: 728 / 90; }
.anuncio[data-zona="inicio"] img,
.anuncio[data-zona="rodape"] img { aspect-ratio: 970 / 90; }
.anuncio[data-zona="curso"] img,
.anuncio-quadrado img { aspect-ratio: 300 / 250; height: auto; }
.anuncio-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #5C2A12;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    cursor: pointer;
}
.anuncio-nav.is-prev { left: 6px; }
.anuncio-nav.is-next { right: 6px; }
.anuncio-nav:hover { background: #F15A22; color: #fff; }
.anuncio-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: .35rem;
}
.anuncio-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    box-shadow: 0 0 0 1px rgba(0,0,0,.35);
    cursor: pointer;
}
.anuncio-dots button.is-active { background: #F15A22; }
@media (prefers-reduced-motion: reduce) {
    .anuncio-track { transition: none; }
}
.anuncio-reserva {
    min-height: 90px;
    border: 1.5px dashed rgba(92, 42, 18, .35);
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    color: var(--navy);
    text-align: center;
    padding: .75rem 1rem;
}
.anuncio-quadrado .anuncio-reserva { min-height: 250px; }
.anuncio-reserva span { font-weight: 700; letter-spacing: .02em; }
.anuncio-reserva small { color: var(--gray-500); }
[data-theme="dark"] .anuncio-reserva,
[data-theme="dark"] .anuncio-viewport,
[data-theme="dark"] .anuncio img { color: #fff; background: #1c1410; border-color: rgba(255,255,255,.2); }

@media (max-width: 768px) {
    .anuncio { width: calc(100% - 1rem); }
    .anuncio[data-zona="topo"] { margin-top: calc(var(--header-height) + .6rem); }
    .anuncio[data-zona="topo"],
    .anuncio[data-zona="cursos"],
    .anuncio[data-zona="blog"],
    .anuncio[data-zona="inicio"],
    .anuncio[data-zona="rodape"] { width: calc(100% - 1rem); }
    .anuncio[data-zona="curso"] { width: min(300px, calc(100% - 1rem)); }
    .home-udemy .hero { padding: 1.25rem 0 1.75rem; }
    .home-udemy .hero-text { padding: 1.35rem; }
}
