/* General Body and Container Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Slightly more modern font */
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Lighter off-white */
    color: #343a40; /* Darker grey for body text */
    line-height: 1.7; /* Increased line height for readability */
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Color Palette Variables */
:root {
    --primary-color: #4CAF50; /* Vibrant Green (Main Brand Color) */
    --primary-color-rgb: 76, 175, 80; /* RGB for rgba use */
    --primary-dark: #388E3C; /* Darker Green */
    --secondary-color: #007bff; /* Bright Blue (Accent Color) */
    --secondary-dark: #0056b3; /* Darker Blue */
    --accent-color: #ff9800; /* Orange accent for answers/highlights */
    --text-dark: #212529; /* Very Dark for Headings */
    --text-color: #343a40; /* Standard text color */
    --text-light: #6c757d; /* Lighter Grey for paragraphs */
    --bg-color: #f8f9fa; /* Light background */
    --background-grey: #e9ecef; /* Slightly darker grey background */
    --header-bg: #2c3e50; /* Dark Blue/Grey Header */
    --white: #ffffff;
    --border-color: #dee2e6; /* Standard border color */
    --shadow-small: rgba(0, 0, 0, 0.05);
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}


/* Header and Navigation */
.header {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 3px 8px var(--shadow-medium); /* More prominent shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
    }

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px  20px;

}

.logo {
    margin: 0;
    font-size: 2em; /* Slightly larger logo */
    font-weight: 700; /* Bolder */
    color: var(--primary-color); /* Primary green for the logo */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
     font-size: 1.8em;
    font-weight: 700;
    color: var(--bg-color);
    display: flex;
    align-items: center;

}
.logo i {
    margin-right: 8px;
    color: var(--primary-color);
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    
}

.navbar ul li {
    margin-left: 30px; /* More spacing */

}

.navbar ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600; /* Bolder links */
    transition: color 0.3s ease, transform 0.2s ease; /* Add transform for slight lift */
        border-radius: 6px;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: var(--primary-color); /* Green on hover/active */
    transform: translateY(-2px); /* Slight lift effect */
    
}

/* Hero Section */
.hero-section {
    /* Using a linear gradient overlay on a placeholder image for a modern look */
    background: linear-gradient(to right, rgba(44, 62, 80, 0.8), rgba(76, 175, 80, 0.7)),
                url('https://via.placeholder.com/1500x600/2c3e50/ffffff?text=NBF+StudyHub+Background') no-repeat center center/cover;
   color: var(--white);
    text-align: center;
    padding: 120px 0; /* More padding for a grander feel */
    min-height: 200px; /* fixed unit */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-out; /* Simple fade-in animation */
    flex-direction: column;

}

.hero-section h2 {
    font-size: 3.5em;
    margin-bottom: 10px; /* reduce space below heading */
    margin-top: -80px; 
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    color: var(--white);
}

.hero-section p {
    font-size: 1.3em;
    max-width: 750px;
    margin: 0 auto 30px auto; /* reduce bottom space if needed */
    color: rgba(255, 255, 255, 0.9);
}


/* Hero Buttons Container */
.hero-buttons {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px; /* consistent spacing between buttons */
}

/* Common Button Styles */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 12px; /* slightly more modern rounded corners */
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

/* Primary Button (Gradient + Hover Lift) */
.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
}

.primary-btn:hover {
    transform: translateY(-4px) scale(1.05); /* subtle lift and grow */
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Secondary Button (Outline with Smooth Fill) */
.secondary-btn {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.secondary-btn:hover {
    background-color: var(--white);
    color: var(--header-bg); 
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Social Buttons (Modern Rounded + Hover Effects) */
.social-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 50px; /* pill-shaped for modern look */
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: rgba(255,255,255,0.1); /* subtle background */
}

.social-btn i {
    margin-right: 10px;
    font-size: 1.2em;
}

.social-btn:hover {
    background-color: var(--white);
    color: var(--header-bg);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}



.whatsapp {
    background-color: #25D366; /* WhatsApp Green */
}

.whatsapp:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.contact-us {
    background-color: var(--secondary-color); /* Blue accent */
}

.contact-us:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.about-us {
    background-color: #6c757d; /* Neutral Grey */
}

.about-us:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* =========================
   Content Section CSS Start
   ========================= */

.content-section {
    /* Internal spacing */
    padding-top: 120px;   /* Space from top inside the section */
    padding-bottom: 80px; /* Space from bottom inside the section */
    padding-left: 5px;    /* Small horizontal padding for responsiveness */
    padding-right: 5px;

    /* External spacing */
    margin-top: -5em;     /* Space above the section, separates it from previous section */
    margin-left: auto;
    margin-right: auto;

    /* Other styles */
    text-align: center;
    max-width: auto;    /* Restrict width for readability */
}



.content-section h2 {
    font-size: 3em; /* Slightly larger for emphasis */
    margin-bottom: 20px;
    color: var(--text-dark);
    position: relative;
    display: inline-block; /* For underline effect */
    font-weight: 700;
}

.content-section h2::after { /* Modern underline for headings */
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    margin: 10px auto 0;
    border-radius: 2px;
}

.content-section p {
    font-size: 1.15em;
    max-width: 850px;
    margin: 0 auto 40px auto;
    color: var(--text-muted); /* Softer, professional text color */
    line-height: 1.8; /* Improved readability */
}

/* Grey background utility class */
.grey-bg {
    background-color: var(--background-grey);
}

/* =======================
   Content Section CSS End
   ======================= */




/* Video Grid */
#video-grid,.video-grid
 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger min-width */
    gap: 35px; /* More spacing */
    margin-top: 50px;
}

.video-grid
 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px; /* More spacing */
    margin-top: 50px;
}


.video-item {
    background-color: var(--white);
    border-radius: 10px; /* More rounded */
    box-shadow: 0 6px 15px var(--shadow-light); /* Softer, larger shadow */
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hover effect */
}

.video-item:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 25px var(--shadow-medium); /* Stronger shadow on hover */
}

.video-item iframe {
    width: 100%;
    height: 220px; /* Adjust as needed */
    border: none;
}

.video-item h3 {
    font-size: 1.4em;
    padding: 20px;
    margin: 0;
    color: var(--text-dark);
}

.center-text {
    text-align: center;
    margin-top: 50px;
}

/* Material Grid */
.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 50px;
    text-align: left;
}

.material-item {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 6px 15px var(--shadow-light);
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hover effect */
}

.material-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.material-item h3 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.material-item h3 i {
    margin-right: 12px;
    color: var(--primary-color); /* Green icon */
    font-size: 1.3em;
}

.material-item p {
    font-size: 1.05em;
    margin-bottom: 25px;
    color: var(--text-light);
    flex-grow: 1;
}

.material-item ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.material-item ul li {
    margin-bottom: 10px;
}

.material-item ul li a {
    color: var(--secondary-color); /* Blue for links */
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    display: flex;
    align-items: center;
}

.material-item ul li a::before { /* Small arrow/icon for links */
    content: '\203A'; /* Unicode right arrow */
    margin-right: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.material-item ul li a:hover {
    color: var(--secondary-dark);
    text-decoration: underline;
}

.small-btn {
    padding: 10px 20px;
    font-size: 0.95em;
    align-self: flex-start;
    background-color: var(--secondary-color); /* Use secondary color */
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.small-btn:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

/* Contact Section Styles */
.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    color: var(--text-color);
}

.contact-grid {
    display: block;
    width: 70%; /* Set width to 70% */
    max-width: 900px; /* You can adjust this max-width if 70% gets too wide on very large screens */
    margin: 0 auto 50px auto; /* Centers the block and adds bottom margin */
}

.contact-form-box {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    text-align: left;
    width: 55%; /* Ensures it takes full width of its parent (.contact-grid) */
    margin: 0 auto 50px auto;
}

.contact-form-box h3 {
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.7em;
    text-align: center;
}

.contact-form-box p {
    font-size: 1em;
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--text-light);
    text-align: center;
}

.contact-form-box .form-group {
    margin-bottom: 20px;
}

.contact-form-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.95em;
}

.contact-form-box input[type="text"],
.contact-form-box input[type="email"],
.contact-form-box input[type="tel"],
.contact-form-box input[type="text"][name="subject"],
.contact-form-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.contact-form-box input[type="text"]:focus,
.contact-form-box input[type="email"]:focus,
.contact-form-box input[type="tel"]:focus,
.contact-form-box textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.25);
    outline: none;
}

.contact-form-box textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-box .btn {
    width: auto;
    padding: 12px 25px;
    font-size: 1.05em;
    display: block;
    margin: 20px auto 0 auto;
}

/* Contact Info / Footer Contact Details */
.contact-details-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.95em;
}

.contact-details-footer p {
    margin-bottom: 10px;
    font-size: 1em;
}

.contact-details-footer i {
    margin-right: 8px;
    color: var(--primary-color);
}

.contact-details-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-details-footer a:hover {
    text-decoration: underline;
    color: var(--secondary-dark);
}

/* Add or adjust responsive rules if needed */
@media (max-width: 768px) {
    .contact-grid {
        width: 90%; /* Adjust width for smaller screens */
        margin-left: auto; /* Center */
        margin-right: auto; /* Center */
    }
}

@media (max-width: 480px) {
    .contact-grid {
        width: 95%; /* Even wider on very small screens */
    }
}
/* Footer */
.footer {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 25px 0; /* More padding */
    text-align: center;
    font-size: 0.95em;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8); /* Slightly faded white */
    text-decoration: none;
    margin-left: 25px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}


/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed; /* Stays in place when scrolling */
    bottom: 30px; /* 30px from the bottom */
    right: 30px; /* 30px from the right */
    background-color: #25D366; /* WhatsApp brand green */
    color: white; /* White icon */
    width: 60px; /* Width of the button */
    height: 60px; /* Height of the button */
    border-radius: 50%; /* Makes it circular */
    display: flex; /* Use flexbox to center the icon */
    align-items: center; /* Vertically center icon */
    justify-content: center; /* Horizontally center icon */
    font-size: 2.2em; /* Size of the icon */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    z-index: 1000; /* Ensures it stays on top of other content */
    text-decoration: none; /* Remove underline from link */
    transition: transform 0.3s ease, background-color 0.3s ease; /* Smooth transition for hover effects */
}

.whatsapp-float:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
    background-color: #1DA851; /* Darker green on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* More prominent shadow on hover */
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .navbar ul {
        flex-wrap: wrap; /* Allow nav items to wrap */
        justify-content: center;
        margin-top: 15px;
    }

    .navbar ul li {
        margin: 5px 10px; /* Adjust spacing */
    }

    .hero-section {
        padding: 80px 0;
    }

    .hero-section h2 {
        font-size: 3em;
    }

    .hero-section p {
        font-size: 1.1em;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        margin: 10px 0;
        width: 80%;
        max-width: 350px;
    }

    .social-buttons {
        gap: 10px;
    }

    .social-btn {
        width: 45%; /* Two per row */
        max-width: 200px;
        justify-content: center;
        margin: 0; /* Reset margin from general social-btn */
    }

    .content-section {
        padding: 60px 0;
    }

    .content-section h2 {
        font-size: 2.3em;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.8em;
    }

    .hero-section h2 {
        font-size: 2.5em;
    }

    .video-grid,
    .material-grid,
    .chapter-grid, /* Added for consistency across grids */
    .class-category-grid { /* Added for consistency across grids */
        grid-template-columns: 1fr; /* Single column layout */
    }

    /* Adjust margins for grid items on smaller screens */
    .video-item,
    .material-item,
    .chapter-item,
    .category-item {
        margin-left: 20px;
        margin-right: 20px;
    }

    .contact-form-box { /* Use contact-form-box as this is the current HTML structure */
        padding: 30px;
        margin-left: 20px;
        margin-right: 20px;
    }

    .footer .container {
        flex-direction: column;
    }

    .footer-links {
        margin-top: 15px;
    }

    .footer-links a {
        margin: 0 10px;
    }

    /* Modal responsiveness */
    .modal-content {
        width: 95%; /* Wider on smaller screens */
    }

    .close-button {
        font-size: 2.2em;
        top: 10px;
        right: 15px;
    }

    /* Floating WhatsApp Button responsive adjustment */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    .logo {
        font-size: 1.6em;
    }

    .hero-section {
        padding: 50px 0;
    }

    .hero-section h2 {
        font-size: 2em;
    }

    .content-section {
        padding: 40px 0;
    }

    .content-section h2 {
        font-size: 1.8em;
    }

    .btn {
        padding: 12px 20px;
        font-size: 1em;
    }

    .social-btn {
        width: 90%; /* Full width on very small screens */
    }

    /* Modal responsiveness */
    .modal-content {
        width: 98%;
        border-radius: 8px;
    }
    .close-button {
        font-size: 2em;
        top: 5px;
        right: 10px;
    }
    .play-icon {
        font-size: 3.5em;
    }
}

/* --- New Page Specific Styles (Chapter Grid, Category Grid) --- */

/* Smaller Hero Section for sub-pages (e.g., class9_videos.html, coming_soon.html) */
.small-hero {
    padding: 80px 0; /* Less padding than the main hero */
    min-height: auto; /* Remove minimum height constraint */
    }

/* Chapter Grid Layout */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.chapter-item {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 6px 15px var(--shadow-light);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chapter-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.chapter-item h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.chapter-item h3 i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.chapter-item p {
    font-size: 1em;
    margin-bottom: 25px;
    color: var(--text-light);
    flex-grow: 1;
}

/* Specific button style for chapter items */
.chapter-item .small-btn {
    align-self: flex-start;
    padding: 10px 20px;
    font-size: 0.95em;
}

.chapter-item .small-btn i {
    margin-right: 8px;
}


/* Class Category Grid Layout (Similar to chapter-grid but for classes, e.g. on Video Lectures page) */
.class-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.category-item {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 6px 15px var(--shadow-light);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.category-item h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.category-item h3 i {
    margin-right: 10px;
    color: var(--secondary-color); /* Using blue accent for category icons */
    font-size: 1.2em;
}

.category-item p {
    font-size: 1em;
    margin-bottom: 25px;
    color: var(--text-light);
    flex-grow: 1;
}

.category-item .small-btn {
    align-self: flex-start;
}

/* General improvement for video item paragraphs (if you didn't have it) */
.video-item p {
    font-size: 0.95em;
    padding: 0 15px 15px; /* Added padding to align with h3 */
    margin: 0;
    color: var(--text-light);
}


/* --- Video Thumbnail & Play Icon Styles (for modal integration) --- */
.video-thumbnail {
    width: 100%;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4); /* Dark overlay */
    transition: background-color 0.3s ease;
}

.video-thumbnail:hover::after {
    background-color: rgba(0,0,0,0.6); /* Darker on hover */
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    position: absolute; /* Allows play icon to be on top */
    top: 0;
    left: 0;
    z-index: 0; /* Ensures it's behind the play icon and overlay */
}

.play-icon {
    font-size: 4.5em; /* Large play icon */
    color: var(--white);
    opacity: 0.9;
    z-index: 1; /* Ensure icon is above the overlay */
    transition: color 0.3s ease, transform 0.3s ease;
    text-shadow: 0 0 15px rgba(0,0,0,0.8); /* Add a subtle shadow to the icon */
}

.video-thumbnail:hover .play-icon {
    color: var(--primary-color); /* Green on hover */
    transform: scale(1.15); /* Slightly bigger on hover */
}


/* --- Modal Styles (for video popups) --- */
.video-modal {
    display: none; /* Crucially, this must be 'none' by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85); /* Dark, transparent background for the modal */
    backdrop-filter: blur(8px); /* Apply the blur effect */
    -webkit-backdrop-filter: blur(8px); /* For Safari compatibility */
    justify-content: center; /* Center horizontally for flex */
    align-items: center; /* Center vertically for flex */
}

/* This class will be added by JavaScript to make the modal visible and trigger animations */
.video-modal.show {
    display: flex; /* Use flexbox to center when visible */
}

/* Content box for the video player */
.modal-content {
    background-color: #000;
    margin: auto; /* Keep auto margin for older browser centering */
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    position: relative;
    width: 90%;
    max-width: 960px;
    overflow: hidden;

    /* Initial state for animation - starts invisible and slightly smaller/shifted */
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
    /* Transition for modal content's entry animation */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* When modal is shown, apply final state */
.video-modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Body class to prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Close button for the modal */
.close-button {
    color: var(--white);
    font-size: 2.8em; /* Larger close button */
    font-weight: bold;
    position: absolute;
    top: 15px; /* Position closer to top-right corner */
    right: 25px;
    cursor: pointer;
    z-index: 10; /* Ensure it's above the video player */
    transition: color 0.3s ease, transform 0.2s ease;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color); /* Green on hover */
    transform: rotate(90deg); /* Little spin effect on hover */
}

/* Container for the responsive iframe */
.video-player-container {
    position: relative;
    width: 100%;
    /* Calculate height based on 16:9 aspect ratio (height / width * 100%) */
    padding-bottom: 56.25%; /* 9 / 16 = 0.5625 */
    height: 0;
    background-color: #000; /* Ensure black background if video loads slowly */
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


/* --- Styles for MCQs / Article Content (e.g., class9_ch1_mcqs.html) --- */
.article-container {
    max-width: 900px; /* Constrain article width for readability */
    margin: 50px auto; /* Center the article container */
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    line-height: 1.7;
    text-align: left; /* Default text alignment for article content */
}

.article-container p {
    font-size: 1.05em;
    margin-bottom: 1em;
    color: var(--text-color);
    text-align: center;
}

.article-container h1 {
    font-size: 2.3em;
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-align: center;
}

.article-container .article-meta {
    font-size: 0.95em;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.question-block {
    background-color: var(--bg-color); /* Use light background for blocks within article */
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-small);
}

.question-block h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: left; /* Ensure question title aligns left */
}

.question-block p {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-color);
    text-align: left; /* Ensure options align left */
}

.question-block p.answer {
    font-weight: bold;
    color: var(--accent-color); /* A distinct color for answers */
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    text-align: left;
}

.question-block p.explanation {
    font-size: 0.95em;
    color: var(--text-light);
    margin-top: 10px;
    padding-left: 10px;
    border-left: 3px solid var(--secondary-color);
    text-align: left;
}

/* Footer text within article containers (if applicable) */
.article-container footer h3 {
    text-align: center;
    margin-top: 40px;
    color: var(--primary-color);
    font-size: 1.8em;
}

.article-container .thank-you-message {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    margin-top: 20px;
    padding-top: 15px;
}


/* --- Styles for Coming Soon page --- */
.hero-section.small-hero {
    min-height: 40vh; /* Make hero section a bit taller for impact */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* Stack content vertically */
    padding: 60px 20px; /* Add some padding */
    text-align: center; /* Ensure text is centered */
}

.hero-section.small-hero h2 {
    font-size: 2.5em; /* Larger heading */
    margin-bottom: 15px;
    color: var(--primary-color); /* Use primary color for main heading */
}

.hero-section.small-hero p {
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto 25px auto;
    color: var(--text-light); /* Use text-light for general paragraph */
}

.hero-section.small-hero .icon-fade {
    font-size: 5em; /* Icon size */
    color: var(--secondary-color); /* Theme color for icon */
    margin-bottom: 30px;
    animation: pulse 2s infinite ease-in-out; /* Simple animation */
}

/* Styles for social icons on the coming soon page */
.social-icons {
    margin-top: 30px;
}

.social-icon {
    display: inline-block;
    color: var(--primary-color);
    font-size: 2.5em;
    margin: 0 15px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 20px;
}


/* Side Promp */


.side-promo {
    position: fixed;
    top: 250px;
    right: 10px;
    width: 250px;
    height: 250px;
    display: block;
    z-index: 9999;
    box-shadow: 0 0 8px rgba(0,0,0,0.15);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: #fff;
}

.side-promo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.side-promo:hover {
    transform: scale(1.05);
}

/* Close button */
.promo-close {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 22px;
    color: #333;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.3s;
}

.promo-close:hover {
    background: rgba(255,0,0,0.7);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .side-promo {
        top: auto;
        bottom: 85px;
        right: 10px;
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .side-promo {
        top: auto;
        bottom: 90px;
        right: 10px;
        width: 100px;
        height: 100px;
    }
}

/* END */



/* Coffee Button */
/* Wrapper to space out the button properly */
.coffee-button-wrapper {
    margin: 30px 0; /* add vertical space */
    text-align: center; /* center the button */
}

/* Coffee Button */
.coffee-button {
    background-color: #ffb347;
    color: #2c2c2c;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.coffee-button i {
    margin-right: 10px;
    color: #6f4e37;
}

.coffee-button:hover {
    background-color: #ffa940;
    transform: scale(1.05);
}

/* Popup overlay */
.popup {
    display: none; /* ✅ Must be 'none' initially */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;

    /* Only show it as flex when opened via JS */
    align-items: center;
    justify-content: center;
}


/* Popup box */
.popup-content {
    background: #fff8f0;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
}

/* Heading */
.popup-content h3 {
    margin-bottom: 15px;
    color: #5e3200;
}

/* Text paragraphs */
.popup-content p {
    margin: 10px 0;
    font-size: 15px;
    color: #333;
}

/* Payment box */
.payment-info {
    text-align: left;
    margin-top: 20px;
    background-color: #fff0db;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
}

/* Close button (X) */
.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}



/* End */

/* Exercise Button Postions */

.btn-group-center {
    display: flex;
    justify-content: center;
    gap: 1rem; /* Adds space between buttons */
    flex-wrap: wrap; /* Optional: allows wrapping on small screens */
    margin-top: 1rem; /* Optional: adds spacing above buttons */
}
/* End */

/* Youtube Animation Button */
@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);  /* moves up by 8px */
  }
}

#youtube-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1000;

  background: linear-gradient(45deg, #ff0000, #cc0000);
  border: none;
  border-radius: 25px;
  padding: 5px 12px;
  color: white;
  font-weight: bold;
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  user-select: none;
  outline: none;
  overflow: hidden;

  animation: floatUpDown 3s ease-in-out infinite;  /* added floating animation */
}

#youtube-btn .youtube-icon {
  display: inline-block;
  font-size: 18px;
  animation: pulse 2s infinite ease-in-out;
  transform-origin: center;
}

#youtube-btn:hover {
  box-shadow: 0 0 20px rgba(255, 0, 0, 1);
  transform: scale(1.05);
  animation-play-state: paused; /* pause floating on hover */
}

#youtube-btn:hover .youtube-icon {
  animation-play-state: paused;
  transform: scale(1.2) rotate(10deg);
}
@media (max-width: 480px) {
  #youtube-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}



/* End */

/* Message of under Construction*/

#closePopup {
  background-color: #ff5f5f;
  border: none;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#closePopup:hover {
  background-color: #e04e4e;
}



/* End */


/* Privacy Policy Section Styling */
.privacy-policy-section {
    text-align: left !important;
    padding: 40px 0;
    line-height: 1.7;
    color: #333;
}

.privacy-policy-section h3,
.privacy-policy-section h4 {
    margin-top: 25px;
    color: #1d1d1d;
     }

.privacy-policy-section ul {
    list-style-position: inside;  /* ✅ Moves the bullet closer to the text */
    padding-left: 50px;              /* ✅ Remove default indentation */
    margin-left: 110px; 
  }

.privacy-policy-section p,
.privacy-policy-section li {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #333;
}


/* End */

/* =========================
   About NBF StudyHub Section Start
   ========================= */

/* Section background & layout */
#about {
    background: linear-gradient(-45deg, #ffffff, #f0fff4, #f9fff9, #f5fff6);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    padding: 100px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #000;
}

/* Gradient animation */
@keyframes gradientBG {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

/* Container */
#about .container {
    max-width: 900px;
    width: 100%;
}

/* Headings */
#about h2,
#about h3 {
    font-weight: 700;
    color: #000;
    transition: all 0.4s ease;
    cursor: pointer;
}

#about h2 { font-size: 2.8em; margin-bottom: 20px; }
#about h3 { font-size: 1.8em; margin-top: 40px; margin-bottom: 20px; }

#about h2:hover,
#about h3:hover {
    background: linear-gradient(90deg, #28a745, #85e085);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Paragraphs */
#about p {
    font-size: 1.15em;
    line-height: 1.8;
    margin-bottom: 25px;
    transition: color 0.3s ease, transform 0.3s ease;
}

#about p:hover {
    color: #28a745;
    transform: translateY(-2px);
}

/* Strong text hover effect */
#about p strong,
#about .about-list li strong {
    color: #000;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

#about p strong::after,
#about .about-list li strong::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background-color: #28a745;
    transition: width 0.3s ease;
}

#about p strong:hover,
#about .about-list li strong:hover {
    color: #28a745;
    transform: scale(1.05);
}

#about p strong:hover::after,
#about .about-list li strong:hover::after {
    width: 100%;
}

/* List */
#about .about-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #000;
}

#about .about-list li {
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-left: 35px;
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* List hover */
#about .about-list li:hover {
    background-color: rgba(40,167,69,0.1);
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* List Icons */
#about .about-list li .icon {
    position: absolute;
    left: 0;
    font-size: 1.3em;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #000;
}

#about .about-list li:hover .icon {
    transform: scale(1.4) rotate(10deg);
    color: #28a745;
}

/* Scroll-triggered fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-list li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.about-list li.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    #about h2 { font-size: 2.2em; }
    #about h3 { font-size: 1.5em; }
    #about p,
    #about .about-list li { font-size: 1em; }
}
/* =========================
   About NBF StudyHub Section End
   ========================= */
