/* =========================================
   ChemLearn — Professional Stylish Theme
   Dark header/footer + gradient body
========================================= */

/* -------- Theme Tokens -------- */
:root {
    --primary-color: #3b82f6;
    /* vivid but soft blue */
    --primary-dark: #1e40af;
    /* dark blue for hover/active */
    --secondary-color: #0d9488;
    /* teal accent */
    --bg-gradient: linear-gradient(135deg, #f3f4f6, #e0f2fe);
    /* subtle gradient */
    --surface: #ffffffee;
    /* slightly transparent white */
    --surface-alt: #f9fafcee;
    /* alt card background */
    --text: #374151;
    /* dark gray text */
    --text-muted: #6b7280;
    --heading: #111827;
    --border: #e5e7eb;
    --radius: 14px;
    --nav-height: 70px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, .06);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .08);
    --nav-footer-bg: #0f172a;
    /* dark navy for header/footer */
}

/* -------- Resets -------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background: var(--bg-gradient);
    color: var(--text);
    line-height: 1.7;
    font-family: 'Merriweather', Georgia, serif;
    scroll-behavior: smooth;
}

/* --------------------------------
   NAVBAR (dark header)
-----------------------------------*/
.navbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: var(--nav-footer-bg);
    padding: 0 1.5rem;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: #f3f4f6;
    margin: 0 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    /* <-- Add this line */
}

.navbar-nav .nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}
.navbar-brand img,
.logo {
    height: 80px;
    /* fits inside a 70px navbar */
    width: auto;
    display: block;
    object-fit: contain;
}

/* --------------------------------
   HERO
-----------------------------------*/
.hero-section {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #e0f2fe, #fdf2f8);
    padding: 80px 20px;
    color: var(--heading);
        background-image: url('../assets/images/chembgImage_optimized.jpg');
}

.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.hero-section .lead {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1.2rem;
    font-family: 'Merriweather', serif;
    color: var(--text-muted);
}

/* --------------------------------
   SECTION TITLES
-----------------------------------*/
section {
    padding: 70px 0;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: .5rem;
    color: var(--primary-dark);
}

.section-subtitle {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2.5rem;
    font-size: 1rem;
    font-family: 'Merriweather', serif;
    color: var(--text-muted);
}

/* --------------------------------
   BUTTONS
-----------------------------------*/
.btn-primary {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s ease, transform 0.1s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* --------------------------------
   COURSE CARDS
-----------------------------------*/
/* Remove the problematic rule completely */
/* .course-card .stretched-link {
    pointer-events: none;
} */

/* Enhanced course card with proper z-index management */
.course-card {
    background: var(--surface);
    padding: 28px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease-in-out;
    text-align: center;
    min-height: 250px;
    position: relative;
    /* Ensure positioning context */
}

.course-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-md);
    background: darkslategray;
    border-color: var(--primary-dark);
}

/* Ensure the stretched link works properly */
.course-card .stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* Make sure card content appears above the link overlay */
.course-card .card-icon,
.course-card .card-title,
.course-card .card-text {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease-in-out;
    pointer-events: none;
    /* Prevent text from interfering with clicks */
}

/* Change text color on course card hover */
.course-card:hover .card-icon,
.course-card:hover .card-title,
.course-card:hover .card-text {
    color: #aab6ac;
}
.card-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    /* distinct blue for titles */
}

.card-text {
    font-size: 0.95rem;
    font-family: 'Merriweather', serif;
    color: var(--text-muted);
    /* softer gray for descriptions */
    line-height: 1.5;
}
#video p{
    text-align: center;
}
.video-wrapper {
    width: 70%;
    /* <-- Add this line */
    height: 60%;
    margin: 0 auto;
    /* <-- Add this line */
    position: relative;
padding-bottom: 40%;
    height: 0;
    border-radius: var(--radius);
    /* I also corrected a variable name here for you */
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .video-wrapper {
        width: 95%;
        padding-bottom: 56.25%;
        margin: 0 auto 1rem;
    }
}

@media (max-width: 480px) {
    .video-wrapper {
        width: 98%;
        border-radius: 8px;
    }
}
/* Carousel controls */
/* Carousel wrapper */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Course carousel - horizontal scroll */
.course-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
    scroll-behavior: smooth;
}

.course-carousel::-webkit-scrollbar {
    display: none;
}

/* Course cards default (desktop: 3 visible) */
.course-carousel .course-card {
    flex: 0 0 calc(33.333% - 1rem);
    /* 3 per row with gap */
    max-width: 350px;
    scroll-snap-align: start;
}

/* Large screen arrows outside carousel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.8);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: var(--primary-color);
}

/* Push arrows further outside */
.carousel-btn.left {
    left: -50px;
    /* moves arrow outside with margin */
}

.carousel-btn.right {
    right: -50px;
}

/* --------------------
   Responsive Adjustments
--------------------*/

/* Tablets: show 2 cards */
@media (max-width: 992px) {
    .course-carousel .course-card {
        flex: 0 0 calc(50% - 1rem);
    }

    .carousel-btn.left {
        left: -35px;
    }

    .carousel-btn.right {
        right: -35px;
    }
}

/* Mobile: show 1 card */
@media (max-width: 576px) {
    .course-carousel .course-card {
        flex: 0 0 100%;
    }

    .carousel-btn.left {
        left: -25px;
    }

    .carousel-btn.right {
        right: -25px;
    }
}
/* --------------------------------
   FOOTER (dark like header)
-----------------------------------*/

.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}
/* --------------------------------
   RESPONSIVE
-----------------------------------*/
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 15px;
        min-height: 65vh;
    }

    .course-carousel .course-card {
        flex-basis: 86%;
    }

    .carousel-btn.left {
        left: -8px;
    }

    .carousel-btn.right {
        right: -8px;
    }
}
/* Calculator Section - subtle gradient background */
#calculator {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 80px 0;
}

/* Contact Section - slightly darker tint for contrast */
#contact {
    background: #e0f2fe;
    /* pale sky blue */
    padding: 80px 0;
}
/* =========================================
   Footer Styles
========================================= */

.footer {
    background: var(--nav-footer-bg);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}
/* Active navigation link underline */
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--secondary-color);
    /* Uses your theme's teal color */
    border-radius: 2px;
}