/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #512BD4;
    --secondary-color: #0D6EFD;
    --success-color: #198754;
    --info-color: #0DCAF0;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --body-bg: #f5f7fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    line-height: 1.6;
    color: #333;
    padding-top: 40px;
}

/* ===== NAVBAR STYLES ===== */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1a2e 100%);
    padding: 0.8rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

    .navbar-custom .navbar-brand {
        color: #fff;
        font-weight: 700;
        font-size: 1.3rem;
        transition: color 0.3s ease;
    }

        .navbar-custom .navbar-brand:hover {
            color: var(--warning-color);
        }

/* Mobile Toggle Button */
.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .navbar-toggler:hover {
        border-color: #fff;
        background: rgba(255,255,255,0.1);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar links - Desktop */
.navbar-custom .nav-link {
    color: rgba(255,255,255,0.85) !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

    .navbar-custom .nav-link:hover {
        color: #fff !important;
        background: rgba(255,255,255,0.1);
        transform: translateY(-2px);
    }

    .navbar-custom .nav-link.active {
        color: #fff !important;
        background: rgba(255,255,255,0.15);
    }

/* ===== SEARCH ICON IN NAVBAR ===== */
.navbar-custom .search-item .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8) !important;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .navbar-custom .search-item .nav-link:hover {
        color: #fff !important;
        background: rgba(255,255,255,0.15);
        transform: none;
    }

/* Dropdown */
.navbar-custom .dropdown-menu {
    background: #1a1a2e;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    padding: 0.5rem 0;
    min-width: 250px;
}

.navbar-custom .dropdown-item {
    color: rgba(255,255,255,0.85);
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    font-weight: 400;
}

    .navbar-custom .dropdown-item:hover {
        background: var(--primary-color);
        color: #fff;
    }

    .navbar-custom .dropdown-item i {
        width: 20px;
    }

.navbar-custom .dropdown-divider {
    border-color: rgba(255,255,255,0.1);
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    background: #1a1a2e;
    padding: 1rem 0;
    border-bottom: 2px solid var(--primary-color);
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

    .search-container .form-control {
        border-radius: 50px 0 0 50px;
        padding: 0.75rem 1.5rem;
        border: 2px solid var(--primary-color);
        background: rgba(255,255,255,0.05);
        color: #fff;
        font-size: 1rem;
    }

        .search-container .form-control::placeholder {
            color: rgba(255,255,255,0.5);
        }

        .search-container .form-control:focus {
            background: rgba(255,255,255,0.1);
            color: #fff;
            border-color: var(--warning-color);
            box-shadow: 0 0 0 3px rgba(255,193,7,0.2);
        }

    .search-container .btn-primary {
        border-radius: 0 50px 50px 0;
        padding: 0.75rem 1.5rem;
        background: var(--primary-color);
        border: 2px solid var(--primary-color);
        color: #fff;
    }

        .search-container .btn-primary:hover {
            background: var(--secondary-color);
            border-color: var(--secondary-color);
        }

    /* Search animation */
    .search-container.collapse {
        display: none;
    }

        .search-container.collapse.show {
            display: block;
            animation: slideDown 0.3s ease-out;
        }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ===== RESPONSIVE MOBILE BREAKPOINTS ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #1a1a2e;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 0.5rem;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    }

    .navbar-custom .nav-link {
        padding: 0.7rem 1rem;
        border-radius: 8px;
        margin: 0.2rem 0;
    }

        .navbar-custom .nav-link:hover {
            transform: none;
            background: rgba(255,255,255,0.08);
        }

    .navbar-custom .dropdown-menu {
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
        margin: 0.3rem 0 0 1rem;
        padding: 0.3rem 0;
        box-shadow: none;
    }

    .navbar-custom .dropdown-item {
        padding: 0.5rem 1.2rem;
        font-size: 0.95rem;
    }

        .navbar-custom .dropdown-item i {
            width: 24px;
        }

    /* Search icon mobile */
    .navbar-custom .search-item .nav-link {
        width: auto;
        height: auto;
        border-radius: 8px;
        padding: 0.7rem 1rem;
        justify-content: flex-start;
    }

        .navbar-custom .search-item .nav-link i {
            margin-right: 8px;
        }

    .search-container {
        top: 70px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 64px;
    }

    .navbar-custom .navbar-brand {
        font-size: 1.1rem;
    }

        .navbar-custom .navbar-brand i {
            font-size: 1rem;
        }

    .navbar-toggler {
        padding: 0.4rem 0.6rem;
    }

    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }

    .search-container {
        top: 62px;
    }

        .search-container .form-control {
            font-size: 0.9rem;
            padding: 0.6rem 1rem;
        }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: 70vh;
    padding: 2rem 0;
}

/* ===== CARDS ===== */
.lesson-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

    .lesson-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    }

    .lesson-card .card-number {
        background: var(--primary-color);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        margin-right: 1rem;
    }

    .lesson-card h5 {
        color: var(--primary-color);
        font-weight: 600;
    }

    .lesson-card a {
        text-decoration: none;
        color: inherit;
        display: block;
    }

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary-custom:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(81, 43, 212, 0.3);
        color: white;
    }

/* ===== SIDEBAR ===== */
.sidebar-nav {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 2rem;
}

    .sidebar-nav .nav-item {
        border-bottom: 1px solid #eee;
        padding: 0.5rem 0;
    }

        .sidebar-nav .nav-item:last-child {
            border-bottom: none;
        }

    .sidebar-nav .nav-link {
        color: #555;
        padding: 0.3rem 0;
        transition: all 0.3s ease;
    }

        .sidebar-nav .nav-link:hover {
            color: var(--primary-color);
            padding-left: 0.5rem;
        }

        .sidebar-nav .nav-link.active {
            color: var(--primary-color);
            font-weight: 600;
        }

/* ===== CODE BLOCKS ===== */
pre {
    background: #1a1a2e;
    color: #e1e1e1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

code {
    font-family: 'Consolas', 'Courier New', monospace;
}

/* ===== PROGRESS ===== */
.progress-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* ===== FOOTER ===== */
.footer-custom {
    background: var(--dark-color);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

    .footer-custom h5 {
        color: #fff;
        margin-bottom: 1.5rem;
    }

    .footer-custom a {
        color: rgba(255,255,255,0.6);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .footer-custom a:hover {
            color: #fff;
        }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar-nav {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .lesson-card {
        padding: 1rem;
    }
}

/* ===== FEATURE BOX ===== */
.feature-box {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

    .feature-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    }

    .feature-box .number {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--primary-color);
    }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

    .back-to-top:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(81, 43, 212, 0.3);
        color: white;
    }

/* ===== PRINT STYLES ===== */
@media print {
    .navbar-custom,
    .footer-custom,
    .sidebar-nav,
    .back-to-top,
    .search-container {
        display: none !important;
    }
}

/* ===== SCROLLABLE DROPDOWN ===== */
.navbar-custom .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #1a1a2e;
}

    .navbar-custom .dropdown-menu::-webkit-scrollbar {
        width: 6px;
    }

    .navbar-custom .dropdown-menu::-webkit-scrollbar-track {
        background: #1a1a2e;
        border-radius: 10px;
    }

    .navbar-custom .dropdown-menu::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }

        .navbar-custom .dropdown-menu::-webkit-scrollbar-thumb:hover {
            background: var(--secondary-color);
        }

/* ===== RESPONSIVE MOBILE BREAKPOINTS ===== */
@media (max-width: 991.98px) {
    .navbar-custom .dropdown-menu {
        max-height: 300px;
        overflow-y: auto;
        position: relative !important;
        transform: none !important;
        width: 100%;
        margin-top: 0.5rem;
    }

    .navbar-custom .dropdown-item {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

        .navbar-custom .dropdown-item:last-child {
            border-bottom: none;
        }

    .navbar-custom .dropdown-menu::after {
        content: 'Scroll for more ↓';
        display: block;
        text-align: center;
        color: rgba(255,255,255,0.4);
        font-size: 0.75rem;
        padding: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
}

@media (max-width: 576px) {
    .navbar-custom .dropdown-menu {
        max-height: 250px;
    }
}

/* ===== DROPDOWN HEADERS ===== */
.navbar-custom .dropdown-header {
    color: var(--warning-color);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

    .navbar-custom .dropdown-header:first-child {
        margin-top: 0;
    }

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(81, 43, 212, 0.05) 0%, rgba(26, 26, 46, 0.02) 100%);
    padding: 1rem 0 2rem;
}

.hero-badge .badge {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== STATS SECTION ===== */
.stat-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .stat-box:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== TOPIC CARDS ===== */
.topic-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

    .topic-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    }

    .topic-card a {
        color: inherit;
    }

    .topic-card .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }

/* ===== CTA CARDS ===== */
.cta-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .cta-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .topic-card {
        padding: 1rem !important;
    }

        .topic-card h5 {
            font-size: 1rem;
        }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .company-banner .text-muted {
        font-size: 0.7rem !important;
    }
}

/* ===== FIX HERO SECTION GAP ===== */
.hero-section {
    padding-top: 0.5rem !important;
    padding-bottom: 1rem;
}

    .hero-section .container {
        padding-top: 0.5rem;
    }

    .hero-section .row {
        margin-top: 0;
        padding-top: 0.5rem;
    }

/* ===== BROWSE LESSONS BUTTON ===== */
.btn-outline-light {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent;
}

    .btn-outline-light:hover {
        color: #fff !important;
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
    }

/* ===== PULSE BUTTON ANIMATION ===== */
.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(81, 43, 212, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(81, 43, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(81, 43, 212, 0);
    }
}

/* ===== COMPANY BANNER ===== */
.company-banner {
    border-width: 2px !important;
}

    .company-banner a {
        transition: opacity 0.3s ease;
    }

        .company-banner a:hover {
            opacity: 0.8;
        }


/* ============================================================
   CONTACT PAGE - ALL STYLES
   ============================================================ */

/* Contact Form */
.contact-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

    .contact-card label {
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: #333;
    }

    .contact-card input,
    .contact-card textarea {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        font-size: 1rem;
        transition: border-color 0.3s;
        margin-bottom: 15px;
    }

        .contact-card input:focus,
        .contact-card textarea:focus {
            border-color: var(--primary-color);
            outline: none;
            box-shadow: 0 0 0 3px rgba(81,43,212,0.1);
        }

    .contact-card .field-group {
        margin-bottom: 20px;
    }

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.validation-summary {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

/* Contact Info Cards */
.contact-info-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
}

    .contact-info-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    }

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

    .icon-circle i {
        font-size: 1.2rem;
    }

.contact-info-card p {
    word-break: break-all;
    font-size: 0.75rem !important;
    color: #6c757d;
    margin-bottom: 0;
}

.contact-info-card a {
    color: var(--primary-color);
    transition: color 0.3s ease;
    font-size: 0.75rem;
    text-decoration: none;
}

    .contact-info-card a:hover {
        color: var(--secondary-color);
        text-decoration: underline !important;
    }

.contact-info-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

/* Contact Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .info-item i {
        font-size: 2rem;
        color: var(--primary-color);
        margin-bottom: 10px;
    }

    .info-item h6 {
        font-weight: 600;
        margin-bottom: 5px;
    }

    .info-item p {
        color: #6c757d;
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    .info-item a {
        color: var(--primary-color);
        text-decoration: none;
    }

        .info-item a:hover {
            text-decoration: underline;
        }

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(81,43,212,0.3);
    }

/* Contact Page Responsive */
@media (max-width: 768px) {
    .contact-card {
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .contact-info-card {
        padding: 1rem !important;
    }

    .icon-circle {
        width: 40px;
        height: 40px;
    }

        .icon-circle i {
            font-size: 1rem;
        }

    .contact-info-card h6 {
        font-size: 0.7rem !important;
    }

    .contact-info-card p,
    .contact-info-card a {
        font-size: 0.65rem !important;
    }
}

@media (max-width: 576px) {
    .contact-card {
        padding: 15px;
    }

        .contact-card input,
        .contact-card textarea {
            padding: 10px 14px;
            font-size: 0.9rem;
        }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .info-item {
        padding: 15px;
    }

        .info-item i {
            font-size: 1.5rem;
        }

        .info-item h6 {
            font-size: 0.8rem;
        }

        .info-item p {
            font-size: 0.75rem;
        }

    .icon-circle {
        width: 36px;
        height: 36px;
    }

        .icon-circle i {
            font-size: 0.9rem;
        }

    .contact-info-card h6 {
        font-size: 0.65rem !important;
    }

    .contact-info-card p,
    .contact-info-card a {
        font-size: 0.55rem !important;
    }
}

/* ===== STICKY SIDEBAR FIX ===== */
.sidebar-nav-wrapper {
    position: sticky;
    top: 90px;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    width: 100%;
}

    .sidebar-nav-wrapper .sidebar-nav {
        background: white;
        border-radius: 10px;
        padding: 1.5rem;
        box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    }

    /* Hide scrollbar but keep functionality */
    .sidebar-nav-wrapper::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-nav-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-nav-wrapper::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 4px;
    }

        .sidebar-nav-wrapper::-webkit-scrollbar-thumb:hover {
            background: #bbb;
        }

/* For Firefox */
.sidebar-nav-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

/* Responsive - remove sticky on mobile */
@media (max-width: 768px) {
    .sidebar-nav-wrapper {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        margin-bottom: 2rem;
    }
}
