* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======= HEADER ======= */
.header {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Background Video - centered on all devices */
.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay over video */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 9, 30, 0.55);
    z-index: 1;
}

/* Header content sits above video */
.header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* ======= NAV ======= */
nav {
    display: flex;
    padding: 16px 6%;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

nav img {
    width: 130px;
}

.nav-links {
    flex: 1;
    text-align: right;
}

.nav-links ul li {
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.nav-links ul li::after {
    content: '';
    width: 0%;
    height: 2px;
    background: #f44336;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links ul li:hover::after {
    width: 100%;
}

nav .fa-bars {
    display: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

nav .fa-times {
    display: none;
}

/* ======= HERO TEXT ======= */
.text-box {
    width: 90%;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.text-box h1 {
    font-size: 62px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.text-box p {
    margin: 10px 0 40px;
    font-size: 14px;
    color: #ccc;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-btn {
    display: inline-block;
    text-decoration: none;
    color: rgba(245, 245, 245, 0.911);
    border: 1px solid #fff;
    padding: 12px 34px;
    font-size: 13px;
    background: transparent;
    position: relative;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: 0.4s;
}

.hero-btn:hover {
    border: 1px solid #f44336;
    background: #f44336;
}

/* ======= COURSE ======= */
.course {
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 100px;
}

h1 {
    font-size: 36px;
    font-weight: 600;
}

p {
    color: #777;
    font-size: 14px;
    font-weight: 300;
    line-height: 22px;
    padding: 10px;
}

.row {
    margin-top: 5%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.course-col {
    flex-basis: 31%;
    background: #fff3f3;
    border-radius: 10px;
    margin-bottom: 5%;
    padding: 20px 12px;
    transition: 0.5s;
}

h3 {
    text-align: center;
    font-weight: 600;
    margin: 10px 0;
}

.course-col:hover {
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.2);
}

/* ======= CAMPUS ======= */
.campus {
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 50px;
}

.campus-col {
    flex-basis: 32%;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.campus-col img {
    width: 100%;
    display: block;
}

.layer {
    background: transparent;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: 0.5s;
}

.layer:hover {
    background: rgba(226, 0, 0, 0.7);
}

.layer h3 {
    width: 100%;
    font-weight: 500;
    color: #fff;
    font-size: 26px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    opacity: 0;
    transition: 0.5s;
}

.layer:hover h3 {
    bottom: 49%;
    opacity: 1;
}

/* ======= FACILITIES ======= */
.facilities {
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 100px;
}

.facilities-col {
    flex-basis: 31%;
    border-radius: 10px;
    margin-bottom: 5%;
    text-align: left;
}

.facilities-col img {
    width: 100%;
    border-radius: 10px;
}

.facilities-col p {
    padding: 0;
}

.facilities-col h3 {
    margin-top: 16px;
    margin-bottom: 15px;
    text-align: left;
}

/* ======= TESTIMONIALS ======= */
.testimonials {
    width: 80%;
    margin: auto;
    padding-top: 100px;
    text-align: center;
}

.testimonial-col {
    flex-basis: 44%;
    border-radius: 10px;
    margin-bottom: 5%;
    text-align: left;
    background: #fff3f3;
    padding: 25px;
    cursor: pointer;
    display: flex;
}

.testimonial-col img {
    height: 40px;
    margin-left: 5px;
    margin-right: 30px;
    border-radius: 50%;
}

.testimonial-col p {
    padding: 0;
}

.testimonial-col h3 {
    margin-top: 15px;
    text-align: left;
}

.testimonial-col .fa {
    color: #f44336;
}

/* ======= CTA ======= */
.cta {
    margin: 100px auto;
    width: 80%;
    background-image: linear-gradient(rgba(4, 9, 30, 0.6), rgba(4, 9, 30, 0.6));
    background-position: center;
    background-size: cover;
    border-radius: 10px;
    text-align: center;
    padding: 100px 20px;
}

.cta h1 {
    color: #fff;
    margin-bottom: 40px;
    padding: 0;
}

/* ======= TRAINERS ======= */
.trainer-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.trainer-item {
    width: 30%;
    text-align: center;
    margin-bottom: 20px;
}

.trainer-item img {
    width: 100%;
    border-radius: 50%;
}

/* ======= FOOTER ======= */
.footer {
    width: 100%;
    text-align: center;
    padding: 30px 0;
}

.footer h4 {
    margin-bottom: 25px;
    margin-top: 20px;
    font-weight: 600;
}

.icons .fa {
    color: #f44336;
    margin: 0 13px;
    cursor: pointer;
    padding: 18px 0;
}

/* ======= TABLET (max 768px) ======= */
@media (max-width: 768px) {
    .campus-col {
        flex-basis: 100%;
    }

    .course-col {
        flex-basis: 48%;
    }

    .trainer-item {
        width: 45%;
    }

    .testimonial-col {
        flex-basis: 100%;
    }
}

/* ======= MOBILE (max 600px) ======= */
@media (max-width: 600px) {

    /* --- Video: always centered, covers full screen --- */
    .background-video {
        position: absolute;
        top: 50%;
        left: 50%;
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        transform: translate(-50%, -50%);
        object-fit: cover;
        z-index: 0;
    }

    /* --- Nav: logo left, hamburger right, always on top --- */
    nav {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 14px 5%;
        position: relative;
        z-index: 10;
    }

    nav img {
        width: 100px;
    }

    /* hamburger icon visible on mobile */
    nav .fa-bars {
        display: block !important;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
    }

    /* X close icon shown inside nav-links panel */
    nav .fa-times {
        display: block;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        padding: 14px 20px 0;
    }

    /* Slide-in menu panel */
    .nav-links {
        position: fixed;
        background: #f44336;
        height: 100vh;
        width: 220px;
        top: 0;
        right: -220px;
        text-align: left;
        z-index: 999;
        transition: 0.4s;
        flex: unset;
    }

    .nav-links ul {
        padding: 20px 20px 20px 20px;
    }

    .nav-links ul li {
        display: block;
        padding: 12px 0;
    }

    .nav-links ul li a {
        font-size: 15px;
    }

    /* Hero text */
    .text-box h1 {
        font-size: 28px;
    }

    .text-box p {
        font-size: 13px;
    }

    /* Sections */
    .course,
    .campus,
    .facilities,
    .testimonials {
        width: 92%;
        padding-top: 60px;
    }

    .row {
        flex-direction: column;
    }

    .course-col,
    .campus-col,
    .facilities-col,
    .testimonial-col {
        flex-basis: 100%;
        width: 100%;
        margin-bottom: 20px;
    }

    .trainer-item {
        width: 48%;
    }

    .cta {
        width: 92%;
        padding: 60px 20px;
    }

    .cta h1 {
        font-size: 22px;
    }

    .testimonial-col img {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* ======= VIDEO FALLBACK ANIMATION ======= */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    transition: opacity 1.2s ease;
}

.video-fallback svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide video initially — JS reveals it once playing */
.background-video {
    opacity: 0;
    transition: opacity 1s ease;
}

/* ======= CANVAS FALLBACK — full responsive fill ======= */
.video-fallback {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    transition: opacity 1.2s ease;
}
.video-fallback canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
