/* =================================== */
/* === VIRTUAL LAB - MASTER STYLESHEET === */
/* =================================== */

/* --- 1. Universal Styles & Variables --- */
:root {
    --primary-color: #4a69bd;
    --secondary-color: #6a89cc;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background-color: #f4f6f9;
    --card-bg: #ffffff;
    --font-family: 'Poppins', sans-serif; /* Professional Google Font */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 5px 15px rgba(0, 0, 0, 0.08); /* Softer Shadow */
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column; /* For sticky footer */
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--background-color);
}

main {
    flex-grow: 1; /* Allows main content to push footer down */
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px; /* Pill-shaped buttons */
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(74, 105, 189, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 105, 189, 0.4);
}

.btn-danger { background: var(--danger-color); }
.btn-danger:hover { background: #c82333; }
.btn-success { background: var(--success-color); }
.btn-success:hover { background: #218838; }

/* --- 2. Header & Navigation (Corrected & Responsive) --- */
.main-header {
    background: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem; /* Adjusted for better balance */
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center; /* Vertically align items */
    gap: 25px; /* Use gap for spacing */
}

.main-nav ul li a {
    text-decoration: none;
    /* This is the FIX: Use the dark color to be visible on the white header */
    color: var(--dark-color); 
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

.main-nav ul li a::after { /* Underline effect on hover */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* Hamburger Menu Button (Hidden on Desktop) */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--dark-color);
}


/* === Mobile Responsive Styles === */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Hide nav by default */
        position: fixed;
        top: 0;
        right: 0;
        width: 250px;
        height: 100%;
        background-color: var(--dark-color); /* Dark background for slide-out menu */
        padding-top: 4rem;
        z-index: 1001;
    }

    /* This class will be added with JavaScript to show the menu */
    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column; /* Stack links vertically */
        align-items: center;
        width: 100%;
    }

    .main-nav ul li {
        margin: 1rem 0;
    }

    .main-nav ul li a {
        color: #ffffff; /* White links for the dark slide-out menu */
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: block; /* Show hamburger icon on mobile */
        z-index: 1002; /* Ensure it's above other content */
    }
}
/* ============================= *
/* Styles for screens smaller than 768px */
@media (max-width: 767px) {
    /* ... other styles ... */

    .main-nav ul li a {
        font-size: 18px;
        color: #ffffff; /* This line sets the color to white */
        text-decoration: none;
    }
    
    /* ... other styles ... */
}

.main-nav ul li a::after { /* Underline effect on hover */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* --- 3. Content Components (Cards, Tabs) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.1);
}

.card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.5rem;
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-link.active, .tab-link:hover {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tab-content.active {
    display: block;
}

/* --- 4. Footer --- */
.main-footer {
    background: var(--dark-color);
    color: #bdc3c7;
    line-height: 1.6;
    padding-top: 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section .socials a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin: 0 5px;
    border-radius: 50%;
    color: #fff;
    background: #444;
    transition: all 0.3s ease;
}

.footer-section .socials a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-section.links ul {
    list-style: none;
    padding: 0;
}

.footer-section.links ul li a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.footer-section.links ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.visitor-count {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-bottom {
    background: #1e2b38;
    text-align: center;
    padding: 1rem 0;
    margin-top: 0rem;
    font-size: 0.9rem;
}

/* --- 5. Admin Panel --- */
.admin-login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family);
}

.login-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-container h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.login-container .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.login-container .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-container .form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.login-container .btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.admin-body {
    display: flex;
    background-color: var(--background-color);
}

.admin-sidebar {
    width: 250px;
    background: var(--dark-color);
    color: #fff;
    min-height: 100vh;
    padding: 1.5rem;
    position: fixed;
}

.admin-sidebar h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background 0.3s ease;
}

.admin-sidebar ul li a:hover, .admin-sidebar ul li a.active {
    background: var(--primary-color);
}

.admin-main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.admin-form {
    max-width: 800px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background: #f2f2f2;
}

.admin-table td .btn {
    padding: 5px 10px;
    margin-right: 5px;
    font-size: 0.9rem;
}


/* =================================== */
/* ====== HELP CENTER PAGE STYLES ==== */
/* =================================== */

.help-header {
    text-align: center;
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.help-header h1 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.help-search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.help-search-bar input {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 50px 0 0 50px;
    outline: none;
}

.help-search-bar .btn {
    border-radius: 0 50px 50px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.help-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.topic-card {
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--dark-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.topic-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-color);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    line-height: 1.7;
}

/* Style for when the accordion item is active/open */
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust if your answers are longer */
}

.still-need-help {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius);
}

/* =================================== */
/* == ENHANCED HELP CENTER STYLES ==== */
/* =================================== */

/* --- Dynamic Header with Background --- */
.help-header {
    position: relative;
    padding: 4rem 2rem;
    border-radius: var(--radius);
    overflow: hidden; /* Important for the overlay effect */
    color: #fff;
    background-image: url('https://images.unsplash.com/photo-1532187863486-abf9db50d0d8?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

/* Adds a dark overlay so the white text is readable */
.help-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
    z-index: 1;
}

/* Ensures the content appears above the overlay */
.help-header > * {
    position: relative;
    z-index: 2;
}

.help-header h1 {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* --- Polished Search Results --- */
.search-results-container ul {
    list-style: none;
    padding: 0;
}

.search-results-container li {
    display: flex;
    align-items: center;
    background: #fff;
    margin-bottom: 10px;
    border-radius: var(--radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-results-container li:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.search-results-container li i {
    color: var(--primary-color);
    padding: 1.5rem;
    font-size: 1.2rem;
    border-right: 1px solid #eee;
}

.search-results-container li a {
    padding: 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
}


/* --- Interactive FAQ Accordion --- */
.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow);
}

.faq-question {
    font-weight: 600; /* Bolder question text */
}

/* Style for when the accordion item is active/open */
.faq-item.active .faq-question {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-item.active .faq-answer {
    max-height: 200px; 
    /* Adjust if your answers are longer */
}
/* --- 6. Responsive Styles & Animations --- */
/* =================================== */
/* === RESPONSIVE STYLES & ANIMATIONS == */
/* =================================== */

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }

    /* --- MOBILE FOOTER: HORIZONTAL SCROLL --- */
    .footer-content {
        display: flex;
        flex-wrap: nowrap; /* Prevents columns from stacking */
        overflow-x: auto;  /* Enables horizontal scrolling */
        padding-bottom: 1.5rem; /* Adds space below the content for the scrollbar */
        -webkit-overflow-scrolling: touch; /* Adds smooth scrolling on iOS devices */
    }

    /* Optional: Hides the scrollbar for a cleaner look on compatible browsers */
    .footer-content::-webkit-scrollbar {
        display: none;
    }

    .footer-section {
        flex: 0 0 280px; /* Gives each column a fixed width, forcing overflow */
        text-align: left;  /* Aligns text to the left for better readability */
    }

    /* Keeps the original heading accent, but aligned left */
    .footer-section h4::after {
        left: 0;
        transform: none;
    }

    /* Admin Panel Mobile */
    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }
    .admin-main-content {
        margin-left: 0;
        width: 100%;
    }
    .admin-body {
        flex-direction: column;
    }
}


