/* =========================
   RESET & GLOBAL
========================= */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* =========================
   LOGIN
========================= */

.slider-bg { height: 100vh; animation: slide 15s infinite; background-size: cover; background-position: center; } 
@keyframes slide { 0% { background-image: url('../image/bg1.jpg'); } 33% { background-image: url('../image/bg2.jpg'); } 66% { background-image: url('../image/bg3.jpg'); } 100% { background-image: url('../image/bg1.jpg'); } } 
.overlay { background: rgba(0,0,0,0.6); height: 100%; display: flex; justify-content: center; align-items: center; } 

.login-box {
    background: white;
    padding: 30px;
    width: 100%;
    max-width: 400px; 
    margin: 40px auto; 
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* INPUTS */
.login-box input {
    width: 100%;
    padding: 12px;
    margin: 12px 0;
    display: block;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* BUTTON */
.login-box button {
    width: 100%;
    padding: 12px;
    background: #096366;
    color: white;
    border: none;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

/* LINKS */
.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px; 
}

.login-links a {
    font-size: 14px;
    color: #096366;
    text-decoration: none;
    transition: 0.3s ease;
}

.login-links a:hover {
    color: #0bb3b8;
}

/* =========================
   NAVBAR
========================= */
.top-nav {
    width: 100%;
    background: #096366;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
}

.nav-left {
    font-weight: bold;
}

.nav-right a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
}

.nav-right a.active {
    border-bottom: 2px solid white;
    font-weight: bold;
}

.logout-btn {
    background: red;
    padding: 6px 12px;
    border-radius: 4px;
    margin-top: 0px;
}

/* =========================
   CONTENT
========================= */
.content {
    padding: 20px;
}

/* =========================
   VIDEO GRID
========================= */
.video-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
}

/* Thumbnail */
.video-thumb {
    position: relative;
    cursor: pointer;
}

.video-thumb img {
    width: 100%;
    border-radius: 6px;
}

/* Play icon */
.video-thumb::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: white;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    padding: 8px 15px;
}

/* =========================
   VIDEO MODAL
========================= */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.85);
}

/* CENTERED MODAL */
.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
}

/* VIDEO RATIO FIX */
.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* CLOSE BUTTON (FIXED ISSUE) */
.close-btn {
    position: absolute;
    top: -35px;
    right: 0;
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 10000; /* 🔥 IMPORTANT FIX */
}

/* =========================
   PDF SECTION
========================= */
.pdf-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.pdf-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pdf-thumb img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 6px;
}

.download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #096366;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
}

/* =========================
   EMPTY STATE
========================= */
.empty-state {
    text-align: center;
    font-size: 18px;
    color: #096366;
    margin-top: 40px;
}

/* =========================
   HAMBURGER MENU
========================= */

/* Hide hamburger on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

#hamburger_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 998;
}

#hamburger_overlay.show {
    display: block;
}

/* Default nav (desktop) */
.nav-right {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
    .video-container,
    .pdf-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

     .login-box {
        padding: 20px;
        margin: 20px;
    }

    .login-links a {
        margin: 5px 0;
    }

    /* GRID */
    .video-container,
    .pdf-container {
        grid-template-columns: 1fr;
    }

    /* MODAL FULLSCREEN */
    .video-modal-content {
        width: 100%;
        margin: 0;
        padding: 10px;
    }

    /* CLOSE BUTTON FIX */
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }

    /* NAV FIX */
    .nav-right a {
        margin-left: 10px;
        font-size: 14px;
    }

    .hamburger {
        display: flex;  
        flex-direction: column;
        justify-content: center;
        color: white;
        z-index: 1101; /* ABOVE MENU */
        position: relative;
    }

    .hamburger span {
        display: block; 
        z-index: 30;
    }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: #096366;

        flex-direction: column;
        padding: 60px 20px;

        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-right a {
        display: block;
        width: 100%;
        padding: 10px 4px;
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .nav-right.show {
        right: 0;
    }
    .logout-btn {
        margin-top: 10px !important;
    }
}