/* Updated: 2026-01-22 */
/* ===============================================================
   Learning Hub - Shared Styles
   =============================================================== */

/* ================= CSS VARIABLES ================= */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
}

/* ================= GLOBAL RESET ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* ================= ANIMATED BACKGROUND ================= */
.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(236, 72, 153, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(6, 182, 212, 0.1), transparent);
    z-index: -2;
}

.floating-orbs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb:nth-child(1) {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.orb:nth-child(2) {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    bottom: -5%;
    left: -5%;
    animation-delay: -5s;
}

.orb:nth-child(3) {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ================= NAVIGATION ================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px max(40px, calc((100% - 1200px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
    position: relative;
    z-index: 102;
    /* Ensure logo stays clickable */
}

.logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    transition: all 0.3s ease;
}

/* DESKTOP: Centered Glass Pill Design */
@media (min-width: 900px) {
    .nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 10px 32px;
        border-radius: 100px;
        box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(12px);
    }

    .nav-links:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.3);
        transform: translateX(-50%) translateY(-1px);
    }
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ================= BUTTONS ================= */
.btn-primary {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px -10px rgba(6, 182, 212, 0.3);
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px -10px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.resource-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.5);
}

.resource-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(6, 182, 212, 0.6);
}

/* ================= MAIN CONTAINER ================= */
.main-container {
    min-height: 100vh;
    padding: 120px 20px 60px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= PAGE HEADER ================= */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-cyan), rgba(6, 182, 212, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 20px 40px -15px rgba(6, 182, 212, 0.4);
}

h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ================= SECTIONS ================= */
.section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-cyan), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.section ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.section li {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section li::before {
    content: "→";
    color: var(--accent-cyan);
    font-weight: 600;
}

.section li:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--text-primary);
    transform: translateX(4px);
}

/* ================= ACCORDION ================= */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.accordion-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.accordion-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.accordion-header {
    width: 100%;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.accordion-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: var(--accent-cyan);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-body {
    padding: 0 16px 20px 52px;
    /* Indent to align with text */
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.accordion-body p {
    margin-bottom: 8px;
}

.accordion-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #e2e8f0;
}

.accordion-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 8px;
    border: 1px solid var(--glass-border);
}

/* ================= RESOURCE BOX ================= */
.resource-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

.resource-box p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ================= PRACTICE SECTION ================= */
.practice-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.05));
    border-color: rgba(139, 92, 246, 0.2);
}

.practice-section .section-icon {
    background: linear-gradient(135deg, var(--accent-purple), transparent);
}

.practice-section li::before {
    color: var(--accent-purple);
}

.practice-section li:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ================= BACK SECTION ================= */
.back-section {
    text-align: center;
    margin-top: 40px;
}

/* ================= SECTION HEADER ================= */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ================= FOOTER ================= */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 60px 20px 20px;
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .nav {
        padding: 16px 20px;
    }

    .nav-links {
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 4px;
        /* Space for scrollbar if needed */
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, black 90%, transparent 100%);
    }

    /* Hide scrollbar */
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .main-container {
        padding: 100px 16px 40px;
    }

    .section {
        padding: 20px;
    }

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

/* ================= CONTACT MODAL ================= */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.contact-modal.active {
    display: flex;
}

.contact-content {
    background: linear-gradient(135deg, rgba(18, 18, 26, 0.98), rgba(10, 10, 15, 0.98));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.contact-header {
    text-align: center;
    margin-bottom: 32px;
}

.contact-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-recipient {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.contact-recipient span:first-child {
    color: var(--text-secondary);
    font-size: 13px;
}

.contact-recipient span:last-child {
    color: var(--accent-cyan);
    font-weight: 500;
    font-size: 14px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.contact-submit {
    margin-top: 8px;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.4);
}

.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(6, 182, 212, 0.5);
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.contact-success.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.contact-success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.contact-success h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-success p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .contact-content {
        padding: 28px 20px;
    }

    .contact-header h2 {
        font-size: 24px;
    }
}

/* ================= EMAIL FALLBACK BANNER ================= */
.email-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 16px 0;
}

.email-banner:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(139, 92, 246, 0.25));
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.3);
}

.email-banner .email-icon {
    font-size: 24px;
}

.email-banner .email-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* ================= MODAL OVERLAY (Generic) ================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, rgba(18, 18, 26, 0.98), rgba(10, 10, 15, 0.98));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.5);
}

/* Thin transparent scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 28px 20px;
        margin: 10px;
    }
}