@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #D4AF37; /* Gold from logo */
    --secondary-color: #2c3e50; /* Dark Blue/Grey */
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa; /* Soft off-white for main background */
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-color);
    color: var(--secondary-color);
    line-height: 1.7;
}

/* --- Helper Classes --- */
.section-title {
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}
.section-title::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}
.btn { transition: all 0.3s ease-in-out; }
.btn-primary:hover, .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- Top Bar --- */
.top-bar {
    background: var(--dark-color);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
.top-bar a { color: #fff; text-decoration: none; transition: color 0.3s ease; }
.top-bar a:hover { color: var(--primary-color); }
.social-media a { margin: 0 8px; font-size: 1rem; }

/* --- Main Navigation Bar --- */
.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.4s ease-out, padding 0.4s ease-out;
    padding-top: 5px;
    padding-bottom: 5px;
}
.navbar-brand img {
    height: 90px;
    transition: height 0.4s ease-out;
}
.nav-link {
    color: white !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 8px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.apply-now-btn { border-radius: 50px; padding: 8px 25px; }

/* --- Scrolled State --- */
.navbar.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
    padding-top: 5px;
    padding-bottom: 5px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
}
.navbar.scrolled .navbar-brand img { height: 55px; }
.navbar.scrolled .nav-link {
    color: var(--secondary-color) !important;
    text-shadow: none;
}

/* =======================
   HERO (no black bars)
   ======================= */
.hero-section {
    height: 75vh;                 /* compact hero; cover works either way */
    min-height: 450px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: white;0
}

/* Both videos fill the hero; no letterboxing */
.hero-video-bg{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;            /* KEY */
    object-position: 40% center;  /* focus more to the left to keep heads visible */
    z-index: -2;
    background: #000;
}

/* First video is softly blurred & slightly scaled */
.hero-video-cover{
    filter: blur(8px);
    transform: scale(1.06);
}

/* subtle overlay for readability */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: -1;
}

.hero-caption {
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
    padding: 0 15px;
    max-width: 560px;             /* keeps copy tidy */
    margin-inline: auto;
}
@media (min-width: 992px){
    .hero-caption{ margin-left: auto; margin-right: 8vw; } /* more breathing room on right */
}

.hero-caption h1 {
    font-size: clamp(1.8rem, 3vw, 3.5rem);
    font-weight: 700;
}
.hero-caption .lead {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

/* ==========================================================
   Courses Page Specific Styling
   ========================================================== */
.page-hero-section {
    background-size: cover;
    background-position: center;
    height: 40vh;
    min-height: 300px;
    position: relative;
}
.page-hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1;
}
.page-hero-section .container { position: relative; z-index: 2; }

/* Course Cards */
.course-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.course-card .card-title { font-weight: bold; color: var(--primary-color); }
.course-card .card-text { min-height: 48px; }

/* Course Details Modal (Tabs) */
.course-tabs .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
    font-weight: 500;
    transition: all 0.3s ease;
    border-color: #eee;
}
.course-tabs .list-group-item.active {
    background-color: var(--primary-color);
    color: white;
    border-left: 4px solid var(--primary-color);
    transform: translateX(5px);
}
.course-content h3 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}
.course-content p { color: #444; }
.course-curriculum-list li,
.entry-list li {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.5rem;
}
.course-curriculum-list .fas,
.entry-list .fas { color: var(--primary-color); }

/* --- Course Category Cards --- */
.course-category-card {
    background: #ffffff;
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.course-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.course-category-card i {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* --- Stylish Service Cards --- */
.service-card-final {
    background-color: #ffffff;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.service-card-final:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.service-card-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}
.service-card-final .card-body {
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.service-card-final .card-title { font-weight: 700; margin-bottom: 0.75rem; }
.service-card-final .card-text {
    color: #6c757d;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* --- Form & Contact Sections --- */
.form-section {
    background: var(--secondary-color);
    background-image:
      linear-gradient(rgba(44,62,80,0.9), rgba(44,62,80,0.9)),
      url('../img/library-bg.jpg');
    background-size: cover;
    background-attachment: fixed;
}
.form-section .form-control,
.form-section .form-select {
    background-color: rgba(255,255,255,0.9);
    border: none;
    padding: 15px;
}
.map-responsive { overflow: hidden; padding-bottom: 56.25%; position: relative; height: 0; }
.map-responsive iframe { left: 0; top: 0; height: 100%; width: 100%; position: absolute; }

/* --- Footer Styles --- */
.footer-light {
    background-color: #ffffff;
    color: var(--secondary-color);
    border-top: 1px solid #e9ecef;
}
.footer-logo-left { max-width: 160px; height: auto; }
.footer-about-text { color: #6c757d; }
.footer-social-icons a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-right: 20px;
    transition: color 0.3s ease;
}
.footer-social-icons a:hover { color: var(--primary-color); }
.footer-heading {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 1rem;
}
.footer-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.footer-link:hover { color: var(--primary-color); padding-left: 5px; }
.footer-contact-item {
    color: #6c757d;
    display: flex;
    align-items: flex-start;
}
.footer-contact-item i { color: var(--primary-color); font-size: 1.1rem; }
.footer-bottom-bar { background-color: var(--light-color); }

/* --- Countdown Timer Styles --- */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(0,0,0,0.05);
}
.countdown-item { text-align: center; }
.countdown-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}
.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary-color);
}

/* Stylish contact card */
.contact-card-stylish {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}
.contact-card-icon { font-size: 4rem; color: var(--primary-color); opacity: 0.5; }
.contact-card-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-card-link:hover { color: var(--primary-color); }

/* --- Mobile Responsiveness --- */
@media (max-width: 991px) {
    .navbar.scrolled { background-color: #ffffff !important; }
    .navbar .container { position: relative; }
    .navbar .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    .navbar.menu-open .navbar-brand { opacity: 0; visibility: hidden; }
    .navbar .navbar-brand img { height: 60px; }
    .navbar.scrolled .navbar-brand img { height: 50px; }
    .navbar .navbar-collapse {
        background-color: #ffffff;
        padding: 15px;
        border-radius: 5px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    .navbar .nav-link { color: var(--secondary-color) !important; text-shadow: none; }
}

@media (max-width: 768px) {
    .hero-section { height: 60vh; min-height: 0; }
    .hero-caption h1 { font-size: 2.5rem; }
    .hero-caption .lead { font-size: 1rem; }
    .section-title { font-size: 1.5rem; }
    .footer-light { text-align: center; }
    .footer-light .text-md-start { text-align: center !important; }
    .footer-light .row .col-md-4 { text-align: center; }
    .footer-contact-item { justify-content: center; }
    .course-level-card { height: 320px; }
    .card-title-bottom h3 { font-size: 1.3rem; }
    .card-overlay p { font-size: 0.9rem; margin-bottom: 1rem; }
}

@media (max-width: 576px) {
    .top-bar .contact-details a {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 5px 0;
    }
    .top-bar .contact-details span { display: none; }

    /* SweetAlert2 Responsive Fix */
    .swal2-popup.responsive-swal {
        width: 70% !important;
        margin: 0 auto 0 10px !important;
        text-align: left !important;
        padding: 1rem !important;
    }
    .swal2-popup.responsive-swal .swal2-title {
        font-size: 1rem !important;
        text-align: left !important;
    }
    .swal2-popup.responsive-swal .swal2-html-container {
        font-size: 0.85rem !important;
        text-align: left !important;
    }
    .swal2-popup.responsive-swal .countdown-timer {
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    .swal2-popup.responsive-swal .countdown-number { font-size: 1.4rem; }
    .swal2-popup.responsive-swal .countdown-label { font-size: 0.6rem; }
    .swal2-popup.responsive-swal .swal2-actions { justify-content: flex-start; }
    .swal2-popup.responsive-swal .swal2-confirm {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
}
