/* --- 1. Design Variables & Global Styles --- */
:root {
    --dark-blue-bg: #0F172A;
    --yellow-accent: #FBBF24;
    --light-slate: #E2E8F0;
    --medium-slate: #94A3B8;
    --section-divider: #1E293B; /* Used for cards */
    --card-border: #334155;
    --dark-button-text: #0F172A;
    --cta-button-bg: #FBBF24;
    --cta-button-hover-bg: #F59E0B;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--light-slate);
    background-color: var(--dark-blue-bg);
    text-align: center;
}

/* --- 2. Header & Navigation (Corrected & Merged) --- */
.header {
    display: flex;
    align-items: center; /* This is key for vertical alignment */
    padding: 15px 5%;
    background-color: var(--dark-blue-bg);
    border-bottom: 1px solid var(--section-divider);
}

.logo img {
    /* We now control size with width for better scaling */
    width: 150px; /* <-- ADJUST THIS VALUE (e.g., 180px, 140px) */
    height: auto; /* This keeps the logo proportions correct */
    display: block;
}

.nav-links {
    margin-left: auto; /* This pushes the nav links and login button to the right */
}

.nav-links a {
    color: var(--light-slate);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a.active {
    color: var(--yellow-accent);
}

.nav-links a:hover {
    color: var(--yellow-accent);
}

.login-button {
    padding: 10px 20px;
    background-color: transparent;
    color: var(--light-slate);
    border: 1px solid var(--light-slate);
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none; /* Make sure it's here */
    margin-left: 20px; /* Adds space between "About" and "Login" */
}

.login-button:hover {
    background-color: var(--light-slate);
    color: var(--dark-button-text);
}


/* --- 3. DYNAMIC Hero Section --- */
.hero { padding: 80px 5%; }
.hero h1 { font-size: 3em; color: var(--light-slate); margin-bottom: 15px; }
.hero h2 { font-size: 1.8em; color: var(--yellow-accent); margin-bottom: 50px; font-weight: 500; }
.hero p { font-size: 1.2em; color: var(--medium-slate); max-width: 700px; margin: 0 auto 40px; }

/* --- 4. NEW Service Cards Section --- */
.services-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}
.service-card {
    background-color: var(--section-divider);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    width: 320px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.service-card h3 {
    color: var(--yellow-accent);
    margin-top: 0;
    font-size: 1.5em;
}
.service-card p {
    font-size: 1em;
    line-height: 1.6;
    color: var(--medium-slate);
    margin-bottom: 0;
}
.subjects-heading {
    font-size: 1.4em;
    color: var(--light-slate);
    margin-bottom: 20px;
    margin-top: 60px; /* Space above the heading */
}
.subjects-list { list-style: none; padding: 0; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; }
.subjects-list li { background-color: var(--section-divider); padding: 10px 20px; border-radius: 20px; font-weight: 500; }

.cta-button { display: inline-block; padding: 15px 35px; background-color: var(--cta-button-bg); color: var(--dark-button-text); text-decoration: none; font-size: 1.1em; font-weight: bold; border-radius: 8px; transition: background-color 0.3s; margin-top: 20px; }
.cta-button:hover { background-color: var(--cta-button-hover-bg); }

.version { display: none; }

/* --- 6. Footer --- */
.footer { background-color: var(--dark-blue-bg); color: var(--medium-slate); padding: 40px 5%; border-top: 1px solid var(--section-divider); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 80px; }
.footer a { color: var(--medium-slate); text-decoration: none; margin: 0 10px; transition: color 0.3s; }
.footer a:hover { color: var(--yellow-accent); }

/* --- 7. Responsive Design --- */
@media (max-width: 768px) {
    .header { flex-direction: column; gap: 20px; }
    .nav-links { margin-left: 0; } /* Reset margin for mobile view */
    .hero h1 { font-size: 2.2em; }
    .hero h2 { font-size: 1.5em; }
    .footer { flex-direction: column; gap: 15px; text-align: center; }
    .service-card { width: 100%; }
}
/* --- 8. Login Page Styles --- */

/* This ensures the login content is centered between the header and footer */
.login-page-main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 5%;
}

.login-container {
    background-color: var(--section-divider);
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    width: 100%;
    max-width: 420px;
}

.login-container h1 {
    font-size: 2em;
    color: var(--light-slate);
    margin-top: 0;
    margin-bottom: 10px;
}

.login-container p {
    font-size: 1.1em;
    color: var(--medium-slate);
    margin-bottom: 28px;
}

/* Style for the active state on the main login button in the header */
.login-button.active, .login-button.active:hover {
    background-color: var(--light-slate);
    color: var(--dark-button-text);
}

/* Google Sign-In Button Dark Theme Style */
#google-signin-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Space between icon and text */
    
    background-color: var(--light-slate);
    color: #333333;
    border: none;
    border-radius: 6px;
    
    font-family: inherit; /* Use the main site font */
    font-size: 16px;
    font-weight: 500;
    
    width: 100%;
    height: 48px;
    padding: 0 12px;
    
    cursor: pointer;
    transition: background-color 0.2s;
}

#google-signin-button:hover {
    background-color: #d8dbe0; /* A slightly darker shade for hover */
}

/* Google Icon SVG */
.google-icon {
    width: 18px;
    height: 18px;
}
/* --- 9. Onboarding / Select System Page --- */
.onboarding-container {
    background-color: var(--section-divider);
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 12px;
    text-align: left; /* Aligns legends and labels to the left */
    width: 100%;
    max-width: 600px;
}

.onboarding-container h1 {
    text-align: center;
    font-size: 2em;
    color: var(--light-slate);
    margin-top: 0;
    margin-bottom: 10px;
}

.onboarding-container p {
    text-align: center;
    font-size: 1.1em;
    color: var(--medium-slate);
    margin-bottom: 40px;
}

.form-step {
    border: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.form-step legend {
    font-size: 1.2em;
    font-weight: 500;
    color: var(--light-slate);
    margin-bottom: 15px;
    padding: 0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.subjects-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Radio & Checkbox Styles */
.form-step label {
    display: block;
    background-color: var(--dark-blue-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.form-step label:hover {
    border-color: var(--yellow-accent);
}

.form-step input[type="radio"],
.form-step input[type="checkbox"] {
    display: none; /* Hide default radio/checkbox */
}

.form-step input[type="radio"]:checked + span,
.form-step input[type="checkbox"]:checked + span {
    color: var(--yellow-accent);
    font-weight: 500;
}

.form-step input[type="radio"]:checked + span::before {
    content: '● ';
}
.form-step input[type="checkbox"]:checked + span::before {
    content: '✓ ';
}

.hidden {
    display: none;
}

#submit-button {
    width: 100%;
    margin-top: 20px;
}

#submit-button:disabled {
    background-color: #334155; /* A muted color */
    color: #64748B;
    cursor: not-allowed;
}
/* --- 10. Dashboard Styles --- */

/* Main layout for the dashboard area */
.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5%;
}

/* 1. Profile Bar Style */
.profile-bar {
    margin-bottom: 40px;
}
.profile-bar h1 {
    font-size: 2.5em;
    margin: 0;
    color: var(--light-slate);
}
.curriculum-tag {
    display: inline-block;
    background-color: var(--yellow-accent);
    color: var(--dark-button-text);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    margin: 10px 0 0 0;
}

/* 2. Main Dashboard Content Layout (2 columns) */
.dashboard-content {
    display: flex;
    gap: 40px;
}

/* Left side takes more space */
.subjects-container {
    flex-grow: 1;
}

/* Right side is for booking */
.booking-container {
    flex-basis: 320px; /* Fixed width for the sidebar */
    flex-shrink: 0;
}

.subjects-container h2,
.booking-container h2 {
    font-size: 1.8em;
    color: var(--light-slate);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

/* 3. Subject Card Styling */
.subject-card {
    background-color: var(--section-divider);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden; /* Ensures border-radius is respected by children */
}
.subject-card h3 {
    background-color: var(--card-border);
    color: var(--yellow-accent);
    margin: 0;
    padding: 15px 20px;
    font-size: 1.4em;
}
.subject-card .card-content {
    padding: 20px;
    color: var(--medium-slate);
    line-height: 1.6;
}

/* 4. Booking Card Styling */
.booking-card {
    background-color: var(--section-divider);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}
.booking-card h4 {
    font-size: 1.3em;
    color: var(--light-slate);
    margin: 0 0 10px 0;
}
.booking-card p {
    color: var(--medium-slate);
    font-size: 1em;
    margin: 0 0 20px 0;
}
.booking-card .cta-button {
    width: 100%;
}

/* Responsive adjustments for the dashboard */
@media (max-width: 900px) {
    .dashboard-content {
        flex-direction: column;
    }
    .booking-container {
        flex-basis: auto; /* Allow it to grow */
    }
}
/* Style for loading text on dashboard */
.loading-text {
    color: var(--medium-slate);
    padding: 20px;
    text-align: center;
}
