/* Basic Reset and Variables */
:root {
    --color-primary: #007bff; /* Blue */
    --color-secondary: #28a745; /* Green */
    --color-dark: #343a40;
    --color-light: #f8f9fa;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NAVIGATION BAR STYLES --- */
        :root {
            /* Defined colors for a modern, scholarly look */
            --color-primary: #14b8a6; /* Teal - For buttons and headers */
            --color-secondary: #f59e0b; /* Amber/Gold - For accents and links */
            --color-dark: #1f2937; /* Dark Gray - For text and navbar */
            --color-light: #f9fafb;
            --font-header: 'Montserrat', sans-serif;
            --font-body: 'Roboto', sans-serif;
        }

        body {
            font-family: var(--font-body);
            margin: 0;
            padding: 0;
            background-color: var(--color-light);
            color: var(--color-dark);
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Navbar */
        .navbar {
            background-color: var(--color-dark);
            color: white;
            padding: 15px 0;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .nav-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .nav-logo {
            font-family: var(--font-header);
            font-size: 1.5em;
            font-weight: 800;
            color: var(--color-secondary);
            text-decoration: none;
        }

        .nav-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5em;
            cursor: pointer;
        }

        .nav-links {
            list-style: none;
            display: flex;
            gap: 20px;
            margin: 0;
            padding: 0;
            align-items: center;
        }

        .nav-links li {
            list-style: none;
        }
        
        .nav-links a {
            color: white;
            text-decoration: none;
            transition: color 0.3s;
            padding: 5px 0;
        }

        .nav-links a:hover {
            color: var(--color-secondary);
        }

        /* Button Styling */
        .btn {
            padding: 10px 20px;
            border-radius: 5px;
            text-decoration: none;
            font-weight: 700;
            transition: background-color 0.3s, transform 0.2s;
            display: inline-block;
            white-space: nowrap;
        }

        .btn-primary {
            background-color: var(--color-primary);
            color: white !important;
            border: 2px solid var(--color-primary);
        }

        .btn-primary:hover {
             background-color: #ea580c; /* Slightly darker orange */
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
        }

        .large-btn {
            font-size: 1.1em;
            padding: 15px 30px;
            letter-spacing: 0.5px;
        }

 /* Mobile Nav & Table adjustments */
        @media (max-width: 768px) {
            .nav-toggle {
                display: block;
            }

            .nav-links {
                display: none;
                flex-direction: column;
                width: 100%;
                position: absolute;
                top: 60px; /* Adjust based on navbar height */
                left: 0;
                background-color: var(--color-dark);
                padding: 20px 0;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
                z-index: 10;
                align-items: center;
                gap: 10px;
            }

            .nav-links.active {
                display: flex;
            }
            
            .nav-links li {
                width: 100%;
                text-align: center;
                padding: 5px 0;
            }
                    /* Mobile Table Styling */
            .article-card table, .article-card thead, .article-card tbody, .article-card th, .article-card td, .article-card tr { 
                display: block; 
            }
            .article-card thead tr { 
                position: absolute;
                top: -9999px;
                left: -9999px;
            }
            .article-card td { 
                border: none;
                border-bottom: 1px solid #eee; 
                position: relative;
                padding-left: 50%; 
                text-align: right;
            }
            .article-card td::before {
                content: attr(data-label);
                position: absolute;
                left: 6px;
                width: 45%;
                padding-right: 10px;
                white-space: nowrap;
                font-weight: bold;
                text-align: left;
                color: var(--color-primary);
            }
        }

        /* Mobile Nav - hidden by default */
/* Mobile Menu Hidden */
.nav-links {
    display: flex;
}

/* For mobile layout */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background-color: grey;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        padding: 20px 0;
        gap: 15px;
    }

    /* When toggleMenu() runs */
    .nav-links.show {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }
}

/* Dropdown container */
.dropdown {
    position: relative;
}

/* Dropdown menu hidden by default */
.dropdown-menu {
    position: absolute;
    top: 35px;
    right: 0;
    background: var(--color-dark);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 5px;
    display: none;
    min-width: 150px;
    z-index: 999;
}

/* Show dropdown menu */
.dropdown-menu.show {
    display: block;
}

/* Mobile dropdown support */
@media (max-width: 768px) {
    .dropdown-menu {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
    }
}
/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5em;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 800;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px; /* Slightly more rounded for aesthetics */
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
    background-color: #1e7e34;
}

.large-btn {
    font-size: 1.5em;
    padding: 20px 40px;
    margin-top: 20px;
}

.link-btn {
    display: block;
    margin-top: 10px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
}

/* Section Styling */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--color-light);
}

.bg-dark {
    background-color: var(--color-dark);
    color: white;
}

.bg-dark h2 {
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url(assets/page_logo-png.png) no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 0;
}

.hero-section h3 {
    font-size: 2em;
    color: var(--color-secondary);
}

.hero-section .subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Grid Layouts */
.quiz-grid, .service-grid, .project-grid, .testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    text-align: center;
}

.resource-grid {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    text-align: left;
    margin-top: 30px;
}

/* Cards */
.quiz-card, .service-card, .project-card, .testimonial-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.quiz-card {
    text-decoration: none;
    color: var(--color-dark);
    border-left: 5px solid var(--color-primary);
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-style: italic;
    text-align: left;
}

.testimonial-card footer {
    margin-top: 10px;
    font-weight: bold;
    font-style: normal;
}

/* Pricing Calculator */
.calculator-box {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: rgb(209, 156, 156);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.calculator-box label, .calculator-box input, .calculator-box select {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.calculator-box input, .calculator-box select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.price-output {
    font-size: 1.5em;
    text-align: center;
    margin: 20px 0;
    color: var(--color-dark);
}

.cta-small {
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
}

.micro-service-box {
    text-align: center;
    padding: 30px;
    background: var(--color-light);
    border: 2px dashed var(--color-secondary);
    border-radius: 8px;
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
}

/* --- Responsive & Mobile Styles --- */
@media (max-width: 768px) {
    /* Navbar Mobile Behavior */
    .nav-toggle {
        display: block; /* Show hamburger */
    }

    .nav-links {
        display: none; /* Hide links by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 50px; /* Below the header */
        left: 0;
        background-color: rgb(85, 73, 73);
        border-top: 1px solid var(--color-light);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex; /* Show links when active */
    }
    
    .nav-links li {
        text-align: center;
        width: 100%;
        border-bottom: 1px solid var(--color-light);
    }
    
    .nav-links a {
        display: block;
        padding: 5px 0;
    }

    /* General Responsiveness */
    .hero-section h1 {
        font-size: 2.5em;
    }
    .hero-section h3 {
        font-size: 1.5em;
    }
    h2 {
        font-size: 2em;
    }
    .resource-grid {
        flex-direction: column;
        align-items: center;
    }
    .resource-grid > div {
        width: 100%;
        text-align: center;
    }
    .resource-grid ul {
        text-align: center;
        list-style-position: inside;
    }

    .booking-steps {
        flex-direction: column;
    }
    .step-card {
        margin-bottom: 20px;
    }
}
.filter-controls {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: 2px solid var(--color-light);
    border-radius: 20px;
    padding: 8px 18px;
    margin: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--color-light);
    color: var(--color-dark);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* --- Project Card Visuals --- */
.project-visual {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.project-card-detail:hover .project-visual {
    opacity: 0.85;
}

/* --- Category Tags --- */
.category-tags {
    margin-bottom: 15px;
}

.category-tag {
    display: inline-block;
    font-size: 0.8em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 15px;
    margin-right: 5px;
    color: white;
}

.category-tag.python { background-color: #343a40; }
.category-tag.r { background-color: #007bff; }
.category-tag.excel { background-color: #28a745; }
.category-tag.spss { background-color: #ffc107; color: black; }
.category-tag.academic { background-color: #6f42c1; }
.category-tag.consulting { background-color: #fd7e14; }
.category-tag.tutoring { background-color: #17a2b8; }


/* --- Modal/Lightbox --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    display: block;
    max-width: 80%;
    max-height: 80%;
    margin: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #bbb;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-box {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.popup-box h3 {
    margin-top: 0;
}

.popup-box input,
.popup-box textarea {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
}

.popup-actions {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-box {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
}

.popup-box input,
.popup-box textarea {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}
.testimonial-scroller-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
}

.testimonial-scroller {
    display: flex;
    gap: 20px;
    animation: scrollTestimonials 25s linear infinite;
    width: max-content;
}

.testimonial-card {
    min-width: 350px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #fff;
}

.testimonial-card small {
    opacity: 0.7;
}

/* Animation */
@keyframes scrollTestimonials {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.testimonial-scroller:hover {
    animation-play-state: paused;
}
/* ========================== */
/* POPUP STYLING */
/* ========================== */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-box {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
}

.popup-box input,
.popup-box textarea {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
}

.popup-actions {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}


/* ========================== */
/* HORIZONTAL SCROLLING TESTIMONIALS */
/* ========================== */

.testimonial-scroller-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.testimonial-scroller {
    display: inline-flex;
    white-space: nowrap;
    gap: 20px;
    animation: testimonialScroll 30s linear infinite;
}

.testimonial-card {
    width: 320px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    white-space: normal;
}

@keyframes testimonialScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* Pause animation on hover */
@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.service-card {
    opacity: 0;
    animation: fadeSlideUp 0.7s ease forwards;
}

.service-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.service-card:nth-child(even) {
    animation-delay: 0.2s;
}
#preloader {
    /* Ensures it covers the entire screen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Dark background matching your navbar */
    background-color: var(--color-dark); 
    
    /* Center content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* High z-index to stay on top */
    z-index: 9999; 
    
    /* Transition for smooth fade-out */
    opacity: 1;
    transition: opacity 0.5s ease-out; /* Match the 500ms JS timeout */

    color: white; /* Text color for the loading message */
    font-family: var(--font-header);
    font-size: 1.2em;
}

/* Class to trigger the fade-out */
.fade-out {
    opacity: 0 !important;
}

/* Spinner Element */
.spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid var(--color-secondary); /* Amber color for spinning part */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Add this to your CSS file */
.testimonial-card {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 20px;
    border-radius: 10px;
    color: white;
    margin-right: 20px; /* Space between cards */
    display: inline-block; /* Essential for horizontal scrolling */
    vertical-align: top;
}

.t-text {
    font-style: italic;
    font-size: 0.95em;
    margin-bottom: 15px;
    line-height: 1.5;
}

.t-author strong {
    display: block;
    color: var(--color-secondary);
}

.t-author span {
    font-size: 0.8em;
    color: #ccc;
}

/* Ensure the track allows scrolling */
.testimonial-scroller {
    white-space: nowrap; /* Forces cards into one horizontal line */
    overflow-x: auto; /* Allows scrolling */
    padding: 20px 0;
}
/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    color: white;
}

.dropdown-menu {
    position: absolute;
    top: 35px;
    right: 0;
    background-color: var(--color-dark);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: none;
    min-width: 150px;
    z-index: 999;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: rgb(236, 141, 141);
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: var(--color-secondary);
}