/* =============================================
   Cambridge & Scholars Academy - Main Stylesheet
   ============================================= */

/* CSS Variables */
:root {
    --primary-color: #ffb606;
    --primary-dark: #e5a300;
    --secondary-color: #442e66;
    --secondary-light: #5a3d8a;
    --accent-color: #03b97c;
    --accent-dark: #029a67;
    --text-color: #3c4852;
    --text-light: #6c757d;
    --text-dark: #333d46;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-heading: 'Jost', sans-serif;
    --font-body: 'Mulish', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* =============================================
   Header
   ============================================= */
.header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-dark);
    padding: 10px 0;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.nav-list a.active {
    color: var(--secondary-color);
}

.nav-cta {
    padding: 10px 25px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.mobile-menu-toggle.active .hamburger {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   Sections
   ============================================= */
.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* =============================================
   Cards Grid
   ============================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    margin-bottom: 0.75rem;
}

.card-body p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Program Cards */
.program-card {
    text-align: center;
    padding: 40px 30px;
}

.program-card .icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.program-card .icon i {
    font-size: 2rem;
    color: var(--text-dark);
}

/* =============================================
   About Section
   ============================================= */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-list {
    margin: 1.5rem 0;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.about-list li i {
    color: var(--accent-color);
    margin-top: 5px;
}

/* =============================================
   Courses Page
   ============================================= */
.course-category {
    margin-bottom: 60px;
}

.course-category h3 {
    color: var(--secondary-color);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.course-item {
    background-color: var(--light-bg);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: var(--transition);
}

.course-item:hover {
    background-color: var(--white);
    box-shadow: var(--shadow);
}

/* Course Tabs */
.course-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.course-tab {
    padding: 12px 25px;
    background-color: var(--light-bg);
    border: none;
    border-radius: 5px 5px 0 0;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.course-tab:hover,
.course-tab.active {
    background-color: var(--secondary-color);
    color: var(--white);
}

.course-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.course-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Language Cards */
.language-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.language-card {
    display: flex;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.language-card-image {
    width: 120px;
    min-height: 150px;
    flex-shrink: 0;
}

.language-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.language-card-body {
    padding: 20px;
    flex: 1;
}

.language-card-body h4 {
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.language-card-body p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* =============================================
   Contact Page
   ============================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 40px;
    border-radius: 10px;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-info-item i {
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    flex-shrink: 0;
}

.contact-info-item span,
.contact-info-item a {
    color: var(--white);
    line-height: 1.6;
}

.contact-info-item a:hover {
    color: var(--primary-color);
}

.contact-social {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-social h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.contact-social .social-links a {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.contact-social .social-links a:hover {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

/* Contact Form */
.contact-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(68, 46, 102, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    margin-top: 10px;
}

.form-submit .btn {
    width: 100%;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Map */
.map-container {
    margin-top: 60px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
}

.footer-about {
    opacity: 0.9;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .section {
        padding: 60px 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-list li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list a {
        display: block;
        padding: 15px 0;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact li {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .logo-text {
        display: none;
    }

    .language-card {
        flex-direction: column;
    }

    .language-card-image {
        width: 100%;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .course-tabs {
        flex-direction: column;
    }

    .course-tab {
        width: 100%;
        text-align: center;
    }
}
