@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #0e0e0e;
    --second-bg-color: #161616;
    --text-color: #e0e0e0;
    --main-color: #ffffff;
    --seconed-color: #888888;
    --white-color: #ffffff; /* Added white color variable */
}

html, body {
    font-size: 60%;
    overflow-x: hidden;
}

/* Add the background */
body {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    background-color: var(--bg-color);
    overflow-y: auto;
    padding-top: 130px;
}

.imgs {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.imgs img {
    width: 320px;
    height: 220px;
    object-fit: cover;
    border-radius: 13px;
    /* box-shadow removed */
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 10px;
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
    background: var(--second-bg-color);
}

.imgs img:hover {
    transform: scale(1.02);
    z-index: 2;
    /* box-shadow removed */
    border-color: var(--main-color);
}

.imgs img.wide {
    aspect-ratio: 16/9;
}

.imgs img.tall {
    aspect-ratio: 3/4;
}

.imgs img.square {
    aspect-ratio: 1/1;
}

/* Overlay for darkening background */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    animation: fadeIn 400ms ease forwards;
}

.overlay.fadeOut {
    animation: fadeOut 400ms ease forwards;
}

/* Fullscreen image styling */
.fullscreen-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 15px;
    opacity: 0;
    animation: zoomIn 400ms ease forwards;
    background: #222;
}

/* Fade in animation */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Zoom in animation */
@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    z-index: 300;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: none;
    cursor: pointer;
    overflow: hidden;
}

.nav-button i {
    position: relative;
    z-index: 1;
    color: inherit;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-button:hover {
    background: var(--main-color);
    color: var(--bg-color);
}

.nav-button:hover i {
    color: var(--bg-color);
}

.nav-button.left {
    left: 10px;
}

.nav-button.right {
    right: 10px;
}

.close-button {
    position: absolute;
    top: 10px;
    left: 10px;
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 300;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: none;
    overflow: hidden;
}

.close-button i {
    position: relative;
    z-index: 1;
    color: inherit;
    transition: transform 0.3s ease, color 0.3s ease;
}

.close-button:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: none;
}

.close-button:hover i {
    color: var(--bg-color);
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 0.5rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-icons a i {
    position: relative;
    z-index: 1;
    color: inherit;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    color: var(--bg-color);
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.social-icons a:hover i {
    color: var(--bg-color);
}
.footer .social-icons {
    text-align: center;
}


/* Footer */

.footer {
    background-color: var(--bg-color);
    padding: 50px 0;
}
.footer .social-icons {
    text-align: center;
}
.footer ul {
    text-align: center;
    font-size: 1.8rem;
}
.footer ul li {
    display: inline-block;
    margin-left: 20px;
}
.footer ul li a {
    color: white;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}
.footer ul li a:hover {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
.footer .copyright {
    color: var(--text-color);
    text-align: center;
    margin-top: 40px;
    font-size: 16px;
}

::-webkit-scrollbar {
    display: none;
}
html {
    scrollbar-width: none;
}

/* --------------START OF NAVBAR-------------- */

.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 4rem 12%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
#menu-icon {
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
}
.logo {
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}
.logo:hover {
    transform: scale(1.05);
}

span {
    color: var(--main-color);
}
.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--main-color);
    transition: width 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.navbar a:hover::before,
.navbar a.active::before {
    width: 100%;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
}


/* Restructured Layout */
.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    justify-items: center;
}

.video-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-item h2 {
    color: var(--text-color, #000);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 15px;
    min-height: 50px; /* Align titles */
    display: flex;
    align-items: center;
}

.rounded-video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 13px;
    overflow: hidden;
    /* box-shadow replaced with border */
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #222;
}


.imgs-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    background: #222;
    display: block;
    transition: transform 0.2s, border-color 0.2s;
    border: 1px solid transparent; /* invisible border usually */
}
.imgs-grid img:hover {
    transform: scale(1.02);
    z-index: 2;
    box-shadow: none;
    border-color: var(--main-color);
}

@media(max-width:1024px) {
    #menu-icon {
        display: block;
        transition: transform 0.2s ease-in-out;
    }
    
    #menu-icon.bx-x {
        transform: rotate(45deg);
    }
    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3rem;
        background-color: rgba(0, 0, 0, 0.8);
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        border-top: 2px solid var(--main-color);
        border-bottom-left-radius: 2rem;
        border-top-left-radius: 2rem;
        transform: translateX(100%);
        transition: transform 0.2s ease-in-out;
    }
    .navbar.active {
        transform: translateX(0);
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }
    .navbar.active {
        display: block;
    }
}

/* -----Page Transitions----- */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.transition-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: translateY(0%); /* Default: Covering Screen */
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.transition-layer.layer-1 { background-color: #0e0e0e; z-index: 4; transition-delay: 0.1s; }
.transition-layer.layer-2 { background-color: #333333; z-index: 3; transition-delay: 0.2s; }
.transition-layer.layer-3 { background-color: #555555; z-index: 2; transition-delay: 0.3s; }
.transition-layer.layer-4 { background-color: #777777; z-index: 1; transition-delay: 0.4s; }

/* States */
.transition-layer.hidden-top {
    transform: translateY(-100%);
}
.transition-layer.hidden-bottom {
    transform: translateY(100%);
}
.transition-layer.visible {
    transform: translateY(0%);
}

/* -----Custom Cursor----- */
.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--main-color);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: exclusion;
    display: none;
    transition: transform 0.1s ease;
}

@media (pointer: fine) {
    .cursor {
        display: block;
    }
    body {
        cursor: none;
    }
    a, button, .btn, .learn-box, .logo, i, .imgs img, .nav-button, .close-button {
        cursor: none;
    }
}

.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: var(--white-color);
}


/* -----Scroll Animations----- */
.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Staggered delays for child elements if needed */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }