/* General Styles */
:root {
    --primary: #1a365d; /* Navy Blue */
    --accent: #2b6cb0;
    --text: #2d3748;
    --light: #f7fafc;
    --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 100px; }
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text); 
    line-height: 1.6; 
    scroll-behavior: smooth;
}

h1, h2, h3 { font-family: 'Merriweather', serif; color: var(--primary); }
.container { max-width: 1100px; margin: auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-light { background: var(--light); }
.text-center { text-align: center; margin-bottom: 40px; }

/* Navigation */
nav { background: var(--white); padding: 20px 0; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; }
nav .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.nav-links { list-style: none; display: flex; align-items: center; }
.nav-links li { margin-left: 25px; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 600; }
.nav-links .btn-small { color: white; }
.menu-toggle { display: none; }
.mobile-cta { display: none; }

/* Buttons */
.btn-primary { background: var(--primary); color: white; padding: 12px 30px; border-radius: 5px; text-decoration: none; display: inline-block; font-weight: bold; border: none; cursor: pointer;}
.btn-secondary { background: transparent; border: 2px solid var(--primary); color: var(--primary); padding: 10px 28px; border-radius: 5px; text-decoration: none; margin-left: 10px; font-weight: bold; }
.btn-small { background: var(--accent); color: white; padding: 8px 15px; border-radius: 4px; text-decoration: none; font-size: 0.9rem; }

/* Hero */
.hero { background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('hero.png'); background-size: cover; background-position: center; padding: 120px 0; text-align: center; }
.hero-content { background: rgba(255, 255, 255, 0.75); padding: 40px; border-radius: 15px; max-width: 800px; margin: 0 auto; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.25rem; margin: 0 auto 30px; }
.hero-btns { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.hero-btns .btn-secondary { margin-left: 0; }

/* Trust Bar */
.trust-bar { background: var(--primary); color: white; padding: 15px 0; text-align: center; font-style: italic; }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

/* Cards */
.card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.card h3 { margin-bottom: 15px; border-bottom: 2px solid var(--light); padding-bottom: 10px; }
.icon-circle {
    background: var(--light);
    color: var(--accent);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.75rem;
}
.icon-math { color: #e53e3e; }
.icon-science { color: #38a169; }
.icon-tech { color: #805ad5; }
.card ul { list-style: none; }
.card li { margin-bottom: 8px; font-weight: 500; }
.subject-list { text-align: left; display: inline-block; }
.subject-list li i { color: var(--accent); margin-right: 10px; width: 20px; text-align: center; }

/* Features List */
.features { list-style: none; margin-top: 15px; }
.features li { position: relative; padding-left: 25px; margin-bottom: 10px; font-weight: 500; }
.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Contact Form */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; background: var(--white); padding: 40px; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; }
.image-placeholder { display: flex; justify-content: center; }
.image-placeholder img { max-width: 350px; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
#tutoringForm { scroll-margin-top: 50px; }

.form-grid-header { font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: 10px; color: var(--text); font-weight: 600; }

/* Form Checkbox Grid */
.form-subjects-wrapper {
    background: var(--light);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.form-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}
.subject-group h4 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}
.subject-group label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 4px;
    cursor: pointer;
}
/* Override general input styles for checkboxes */
.contact-form input[type="checkbox"] { width: auto; margin-bottom: 0; margin-right: 8px; }

/* Responsive */
@media (max-width: 768px) {
    .grid-2, .contact-wrapper { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    nav .container { flex-wrap: wrap; }
    .menu-toggle { display: block; background: none; border: none; font-size: 1.5rem; color: var(--primary); cursor: pointer; }
    .mobile-cta { display: inline-block; margin-left: auto; margin-right: 15px; }
    .nav-links { display: none; width: 100%; flex-direction: column; text-align: center; margin-top: 20px; }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 15px 0; }
    .hero-btns .btn-primary, .hero-btns .btn-secondary { padding: 12px 20px; }
    .contact-form input[type="checkbox"] { transform: scale(1.4); margin-right: 12px; }
}

footer { background: #1a202c; color: white; text-align: center; padding: 40px 0; font-size: 0.9rem; }

/* Location Styling */
.location-header {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.location-item {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid var(--accent);
}

.location-item p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.map-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 5px;
}

.map-link i {
    margin-right: 5px;
}

.map-link:hover {
    text-decoration: underline;
    color: var(--primary);
}

.logo-link {
    display: flex;         /* Activates Flexbox */
    align-items: center;   /* Vertically centers the icon and text */
    gap: 12px;             /* Adds a professional 12px gap between logo and text */
    text-decoration: none; /* Removes underline from the link */
}

.nav-icon {
    display: block;
    flex-shrink: 0;        /* Prevents the icon from squishing on mobile */
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary); /* Uses your navy blue variable */
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

/* Optional: Slight hover effect for the whole logo group */
.logo-link:hover .logo-text {
    color: var(--accent);
    transition: color 0.3s ease;
}

/* Animation for the Logo Icon */
.logo-link .nav-icon {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-link:hover .nav-icon {
    transform: scale(1.15) rotate(5deg); /* Bounces up and tilts slightly */
}

/* Animation for the Text */
.logo-link .logo-text {
    transition: color 0.3s ease, transform 0.3s ease;
}

.logo-link:hover .logo-text {
    color: var(--accent);
    transform: translateX(2px); /* Subtle nudge to the right */
}

.location-container {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #edf2f7;
    margin-bottom: 20px;
    align-items: center;
}

.location-text {
    flex: 1; /* Takes up remaining space */
}

.map-embed {
    width: 200px;
    height: 150px;
    flex-shrink: 0; /* Keeps map size consistent */
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.map-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Mobile Responsive adjustment */
@media (max-width: 600px) {
    .location-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .map-embed {
        width: 100%;
        height: 200px;
    }
}

#formSuccess {
    animation: fadeIn 0.5s ease-in;
    background-color: #004a21;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

#formError {
    animation: fadeIn 0.5s ease-in;
    background-color: #c53030;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

#lengthError {
    animation: fadeIn 0.5s ease-in;
    background-color: #c53030;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-limit-reached {
    outline: 2px solid #c53030;
    border-color: #c53030;
}