/* ==============================================================
   TADARUS TUTOR - STYLESHEET
   Platform Belajar Alquran Privat
   ============================================================== */

/* ==================== ROOT & RESET ==================== */
:root {
    --dried-sage: #7A816C;
    --dried-sage-light: #8E9580;
    --dusty-rose: #D1A9A5;
    --faded-rust: #AE6965;
    --warm-oak: #A58B71;
    --bone: #E5DFD6;
    --bone-dark: #D8D0C5;
    --white: #FFFFFF;
    --text-main: #3D3D3D;
    --text-light: #6B6B6B;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.1);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-fast: all 0.2s ease;
    --nav-height: 70px;
    --bottom-nav-height: 0px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bone);
    color: var(--text-main);
    margin: 0;
    line-height: 1.7;
    overflow-x: hidden;
    padding-bottom: var(--bottom-nav-height);
    min-height: 100vh;
    min-height: 100dvh;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== SCROLLBAR (WINDOWS) ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bone);
}

::-webkit-scrollbar-thumb {
    background: var(--dried-sage-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dried-sage);
}

/* ==================== NAVBAR - DESKTOP ==================== */
nav {
    background: rgba(229, 223, 214, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 0 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(122, 129, 108, 0.08);
    height: var(--nav-height);
    transition: var(--transition);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 100%;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 2px solid var(--dried-sage);
    border-radius: 10px;
    transition: var(--transition);
    background: none;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background-color: var(--dried-sage);
}

.menu-toggle:hover span {
    background-color: var(--bone);
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--dried-sage);
    border-radius: 2px;
    transition: var(--transition);
    display: block;
}

/* ===== LOGO ===== */
.logo {
    font-weight: 800;
    color: var(--dried-sage);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    height: 100%;
    user-select: none;
}

.logo-text {
    line-height: 1;
    display: flex;
    flex-direction: column;
}

.logo-text .logo-main {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.logo-text .logo-sub {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.65;
    line-height: 1.15;
    margin-top: 1px;
}

.nav-logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.lang-switch-nav {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dried-sage);
    cursor: pointer;
    display: flex;
    gap: 5px;
    align-items: center;
    user-select: none;
}

.lang-opt {
    opacity: 0.45;
    transition: var(--transition-fast);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    border-bottom: 2px solid transparent;
}

.lang-opt:hover {
    opacity: 0.8;
}

.lang-opt.active {
    opacity: 1;
    color: var(--faded-rust);
    border-bottom-color: var(--faded-rust);
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-login {
    background: var(--dried-sage);
    color: var(--bone);
    padding: 0.55rem 1.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.88rem;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(122, 129, 108, 0.2);
}

.btn-login:hover {
    background: var(--warm-oak);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(122, 129, 108, 0.3);
}

.register-link {
    font-size: 0.72rem;
    margin-top: 5px;
    color: var(--text-main);
    opacity: 0.6;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.register-link:hover {
    color: var(--faded-rust);
    opacity: 1;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: var(--bone);
    box-shadow: 5px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    transition: var(--transition);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar.active {
    left: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(122, 129, 108, 0.15);
}

.sidebar-header h3 {
    margin: 0;
    color: var(--dried-sage);
    font-size: 1.1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--dried-sage);
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: var(--transition);
    border-radius: 8px;
}

.close-btn:hover {
    color: var(--faded-rust);
    background: rgba(174, 105, 101, 0.1);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    background: var(--white);
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: var(--dried-sage);
    border: 1.5px solid transparent;
}

.menu-item:hover {
    transform: translateX(5px);
    border-color: var(--dried-sage);
    box-shadow: var(--shadow-md);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.menu-item-text {
    display: flex;
    flex-direction: column;
}

.menu-item-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.menu-item-sub {
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.6;
    margin-top: 2px;
}

/* ==================== BOTTOM NAV (MOBILE ONLY) ==================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(229, 223, 214, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 6px 0;
    padding-bottom: calc(6px + var(--safe-bottom));
    border-top: 1px solid rgba(122, 129, 108, 0.1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 12px;
    transition: var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    background: none;
    border: none;
    font-family: inherit;
}

.bottom-nav-item.active {
    color: var(--faded-rust);
}

.bottom-nav-item.active .bottom-nav-icon {
    background: rgba(174, 105, 101, 0.12);
}

.bottom-nav-icon {
    font-size: 1.3rem;
    width: 42px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: var(--transition-fast);
}

.bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--dried-sage);
    transition: var(--transition-fast);
}

.bottom-nav-item.active .bottom-nav-label {
    color: var(--faded-rust);
    font-weight: 700;
}

/* ==================== HERO ==================== */
.hero {
    padding: 80px 8% 80px;
    background: radial-gradient(circle at top right, rgba(209, 169, 165, 0.35) 0%, transparent 45%),
                radial-gradient(circle at bottom left, rgba(165, 139, 113, 0.25) 0%, transparent 35%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--dried-sage);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero span.accent {
    color: var(--faded-rust);
    position: relative;
    display: inline-block;
}

.hero span.accent::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(209, 169, 165, 0.3);
    z-index: -1;
    transform: rotate(-1deg);
    border-radius: 4px;
}

.hero-desc {
    color: var(--dried-sage);
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    max-width: 520px;
}

.hero-img {
    width: 100%;
    max-width: 400px;
    display: none;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.08));
    animation: floatChar 4s ease-in-out infinite;
}

@keyframes floatChar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
}

.btn-sage {
    background: var(--dried-sage);
    color: var(--bone);
    box-shadow: 0 4px 14px rgba(122, 129, 108, 0.2);
}

.btn-sage:hover {
    background: var(--warm-oak);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(90, 97, 77, 0.25);
}

.btn-sage:active {
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--dried-sage);
    color: var(--dried-sage);
}

.btn-outline:hover {
    background: var(--dried-sage);
    color: var(--white);
}

/* ==================== SEARCH PAGE ==================== */
.search-header {
    background: var(--dried-sage);
    color: var(--bone);
    padding: 50px 5% 70px;
    text-align: center;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.search-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.search-container {
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.5rem;
    border-radius: 50px;
    border: 2px solid transparent;
    background: var(--white);
    font-size: 0.95rem;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--dusty-rose);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.search-popular {
    display: flex;
    gap: 10px;
    justify-content: center;
    font-size: 0.88rem;
    flex-wrap: wrap;
    opacity: 0.9;
}

.search-popular-tag {
    border-bottom: 1px dashed rgba(229,223,214,0.5);
    cursor: pointer;
    transition: var(--transition-fast);
    padding-bottom: 1px;
}

.search-popular-tag:hover {
    opacity: 0.7;
}

.result-bar {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 8% 0;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== TEACHER GRID ==================== */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 20px 8% 80px;
}

.teacher-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--bone);
}

.tag-skill {
    background: rgba(122, 129, 108, 0.1);
    color: var(--dried-sage);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* ==================== PAGE CONTENT ==================== */
.page-content {
    padding: 40px 8% 80px;
    max-width: 1000px;
    margin: 0 auto;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

.dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.team-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid var(--bone);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    margin-top: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--dried-sage);
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
}

.section-title p {
    color: var(--warm-oak);
    font-weight: 600;
    margin: 0;
}

/* ==================== FORM ==================== */
.form-container {
    background: var(--white);
    max-width: 900px;
    margin: 40px auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    box-shadow: var(--shadow-xl);
}

.form-info {
    background: var(--dried-sage);
    padding: 3rem;
    color: var(--bone);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-info h2 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

.form-info p {
    opacity: 0.9;
    margin: 0;
}

.form-main {
    padding: 2.5rem;
}

.form-main h3 {
    color: var(--dried-sage);
    margin: 0 0 1.5rem;
}

.input-group {
    margin-bottom: 1.1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--bone);
    background: #FAFAF8;
    font-family: inherit;
    font-size: 0.92rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--dried-sage);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(122, 129, 108, 0.1);
}

/* ==================== EBOOK & VIDEO ==================== */
.ebook-cover {
    background: var(--bone);
    height: 200px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.ebook-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.teacher-card:hover .ebook-cover img {
    transform: scale(1.05);
}

.video-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.teacher-card:hover .video-thumb img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-play-btn:hover {
    background: var(--white);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn span {
    font-size: 1.3rem;
    color: var(--dried-sage);
    margin-left: 3px;
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--dried-sage);
    color: var(--bone);
    padding: 3.5rem 8% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-column h3 {
    color: var(--dusty-rose);
    margin: 0 0 0.8rem;
    font-size: 1.1rem;
}

.footer-column h4 {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.6rem;
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    opacity: 0.5;
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

/* ==============================================================
   DESKTOP MODE (min-width: 901px)
   ============================================================== */
@media (min-width: 901px) {
    .hero-img {
        display: block;
    }

    .bottom-nav {
        display: none !important;
    }

    body {
        --bottom-nav-height: 0px;
    }

    .teacher-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
}

/* ==============================================================
   TABLET MODE (601px - 900px)
   ============================================================== */
@media (min-width: 601px) and (max-width: 900px) {
    nav {
        padding: 0 5%;
        height: 65px;
    }

    .hero {
        padding: 60px 5% 60px;
    }

    .hero-img {
        display: block;
        max-width: 300px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .teacher-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        padding: 20px 5% 80px;
    }

    .form-container {
        grid-template-columns: 1fr 1.5fr;
        margin: 30px 5%;
    }

    .bottom-nav {
        display: block;
    }

    body {
        --bottom-nav-height: calc(62px + var(--safe-bottom));
    }

    footer {
        padding-bottom: calc(2rem + var(--bottom-nav-height));
    }
}

/* ==============================================================
   MOBILE / ANDROID MODE (max-width: 600px)
   ============================================================== */
@media (max-width: 600px) {
    :root {
        --nav-height: 58px;
    }

    body {
        --bottom-nav-height: calc(64px + var(--safe-bottom));
    }

    /* --- Mobile Navbar --- */
    nav {
        padding: 0 4%;
        height: var(--nav-height);
    }

    .nav-left {
        gap: 10px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        padding: 8px;
        border-radius: 8px;
    }

    .nav-logo-img {
        height: 36px;
    }

    .logo-text .logo-main {
        font-size: 1.1rem;
    }

    .logo-text .logo-sub {
        font-size: 0.65rem;
    }

    .nav-right {
        gap: 12px;
    }

    .lang-switch-nav {
        font-size: 0.78rem;
    }

    .btn-login {
        padding: 0.45rem 1rem;
        font-size: 0.82rem;
        border-radius: 10px;
    }

    .register-link {
        font-size: 0.65rem;
    }

    /* --- Mobile Hero --- */
    .hero {
        padding: 40px 5% 40px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-content {
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }

    .hero-desc {
        font-size: 0.92rem;
        margin: 0 auto 1.5rem;
    }

    .hero-img {
        display: block;
        max-width: 260px;
        margin: 0 auto;
        order: -1;
    }

    .btn {
        padding: 0.75rem 1.6rem;
        font-size: 0.9rem;
        width: 100%;
    }

    /* --- Mobile Bottom Nav --- */
    .bottom-nav {
        display: block;
    }

    .bottom-nav-icon {
        font-size: 1.2rem;
    }

    .bottom-nav-label {
        font-size: 0.6rem;
    }

    /* --- Mobile Search --- */
    .search-header {
        padding: 35px 5% 50px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .search-header h2 {
        font-size: 1.6rem;
    }

    .search-input {
        padding: 1rem 1.2rem;
        font-size: 0.9rem;
    }

    .search-popular {
        font-size: 0.82rem;
    }

    .result-bar {
        padding: 1rem 5% 0;
    }

    /* --- Mobile Cards --- */
    .teacher-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 15px 5% 30px;
    }

    .teacher-card {
        padding: 1.4rem;
        border-radius: var(--radius-md);
    }

    .teacher-card:hover {
        transform: none;
    }

    .teacher-card:active {
        transform: scale(0.98);
    }

    .profile-img {
        width: 75px;
        height: 75px;
    }

    /* --- Mobile Page Content --- */
    .page-content {
        padding: 20px 5% 40px;
    }

    .section-title {
        margin-top: 25px;
        margin-bottom: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .info-card {
        padding: 1.5rem;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }

    .dev-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .team-card {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }

    .team-card:hover {
        transform: none;
    }

    /* --- Mobile Form --- */
    .form-container {
        grid-template-columns: 1fr;
        margin: 20px 4%;
        border-radius: var(--radius-lg);
    }

    .form-info {
        padding: 2rem;
    }

    .form-info h2 {
        font-size: 1.5rem;
    }

    .form-main {
        padding: 1.8rem;
    }

    .input-row {
        grid-template-columns: 1fr !important;
    }

    .input-group input,
    .input-group select {
        padding: 0.85rem 0.9rem;
        font-size: 0.9rem;
    }

    /* --- Mobile Footer --- */
    footer {
        padding: 2.5rem 5% 1.5rem;
        padding-bottom: calc(1.5rem + var(--bottom-nav-height));
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-column:first-child {
        grid-column: 1 / -1;
    }

    .footer-column h3 {
        font-size: 1rem;
    }

    .footer-column h4 {
        font-size: 0.88rem;
    }

    .footer-link {
        font-size: 0.82rem;
        margin-bottom: 0.5rem;
    }

    /* --- Mobile Sidebar --- */
    .sidebar {
        width: 82vw;
        max-width: 300px;
        left: -85vw;
        padding: 1.5rem;
    }

    .sidebar-header {
        margin-bottom: 2rem;
    }

    .menu-item {
        padding: 1rem;
        border-radius: var(--radius-sm);
    }

    .menu-item:hover {
        transform: none;
    }

    .menu-item:active {
        background: var(--bone);
    }

    .menu-item-icon {
        width: 36px;
        height: 36px;
    }

    /* --- Mobile Ebook / Video --- */
    .ebook-cover {
        height: 180px;
        border-radius: var(--radius-sm);
    }

    .video-thumb {
        height: 160px;
    }

    .video-play-btn {
        width: 42px;
        height: 42px;
    }

    .video-play-btn span {
        font-size: 1.1rem;
    }

    /* --- Hide scrollbar on mobile --- */
    ::-webkit-scrollbar {
        width: 0;
        display: none;
    }
}

/* ==============================================================
   EXTRA SMALL PHONES (max-width: 360px)
   ============================================================== */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .hero-img {
        max-width: 200px;
    }

    .logo-text .logo-main {
        font-size: 1rem;
    }

    .search-header h2 {
        font-size: 1.3rem;
    }

    .bottom-nav-label {
        font-size: 0.55rem;
    }
}

/* ==============================================================
   LANDSCAPE MOBILE
   ============================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 30px 5% 30px;
    }

    .hero-img {
        max-width: 180px;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .hero-desc {
        margin-bottom: 1rem;
    }

    .bottom-nav {
        display: none !important;
    }

    body {
        --bottom-nav-height: 0px;
    }
}

/* ==============================================================
   ANIMATIONS
   ============================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ==============================================================
   PRINT
   ============================================================== */
@media print {
    nav,
    .sidebar,
    .overlay,
    .bottom-nav,
    footer {
        display: none !important;
    }

    body {
        padding: 0;
        background: white;
    }

    .hero {
        padding: 20px;
    }
}
