/* General Styles */
.barlow-condensed-bold {
    font-family: "Raleway", sans-serif;
  }

body {
    margin: 0;
    font-family: "Raleway", sans-serif;
    position: relative;
    background-color: #ffffff; /* Fallback */
    color: #000000;
}
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/nctogether.png');
    background-repeat: repeat;
    background-size: 201px 201px;
    opacity: 0.9; /* Adjust opacity here */
    z-index: -1; /* Ensure it's behind the content */
}
/* Style the logo container to stack the images on top of each other */
.logo-container {
    position: relative;
    width: 100px; /* Adjust the size as needed */
    height: 100px; /* Adjust the size as needed */
}

.logo {
    position: absolute;
    top: .6em;
    left: 0;
    transition: transform 0.3s ease; /* Smooth easing transition */
}

/* Hover effects for logo */
.header-content:hover .logo#ncbot {
    transform: translateY(5px); /* Slightly move ncbot down */
}

.header-content:hover .logo#nctop {
    transform: translateY(-5px); /* Slightly move nctop up */
}

.header-content:hover .logo#ncmid {
    transform: translateX(-5px); /* Slightly move ncmid to the left */
}

/* Add any other styles you may need, such as for grid items or the overlay */

/* Sticky Header */
header {
    position: sticky;
    top: 0;
    background-color: #ffffffda;
    color: #000000;
    z-index: 100;
    width: 100%;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
    padding: 0rem 0; /* Ensures space for mobile */
    backdrop-filter: blur(10px);
}

header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 60%;
    margin: 0 auto;
    padding: 0.5rem 0;
}
.header-buttons {
    display: flex;
    gap: 1rem; /* Increased from 1rem for better spacing */
    align-items: center;
    margin-left: 0px; /* Space between logo and buttons */
}
.about-button {
    background-color: #000000; /* YouTube red */
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0px;
    text-decoration: none;
    font-family: "Raleway", sans-serif;
    transition: all 50ms ease;
    border: none;
    cursor: pointer;
}
.about-button:hover {
    background-color: #ffd900; /* Darker red */
    outline: solid #fff5cb;
    transform: scale(1.02);
}
.youtube-button {
    background-color: #000000; /* YouTube red */
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0px;
    text-decoration: none;
    font-family: "Raleway", sans-serif;
    transition: all 50ms ease;
    border: none;
    cursor: pointer;
}

.youtube-button:hover {
    background-color: #ff0000; /* Darker red */
    outline: solid #FFCCCB;
    transform: scale(1.02);
}
/* Mobile Responsiveness */
@media (max-width: 600px) {
    .header-buttons {
        margin-left: 10px;
        gap: 0.5rem;
    }
    
    .contact-button,
    .youtube-button {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}
header h1 {
    margin: 0;
    text-align: left;
}

header .contact-button {
    background-color: #000000; /* YouTube red */
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0px;
    text-decoration: none;
    font-family: "Raleway", sans-serif;
    transition: all 50ms ease;
    border: none;
    cursor: pointer;
}

header .contact-button:hover {
    background-color: #002aff;
    outline: solid rgb(217, 229, 255);
    transform: scale(1.02);
    transition: all 50ms ease;
}

/* Logo */
header .logo {
    width: 80px; /* Adjust logo size */
    height: auto;
    margin-right: 0px; /* Space between logo and text */
    
}
/* Mobile Header Styles */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    background-color: #ffffffda;
    backdrop-filter: blur(10px);
    z-index: 101; /* Higher than desktop header */
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.mobile-header-content {
    position: relative;
    padding: 0.5rem 1rem;
    min-height: 50px; /* Ensure enough space for the logo */
}

.hamburger-icon {
    width: 30px;
    height: 30px;
    filter: none; /* Remove any filters */
}
#hamburger-menu {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.mobile-logo {
    height: 40px;
    width: auto;
    display: none; /* Hide by default */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
@media (max-width: 768px) {
    .mobile-logo {
        display: block;
    }
}
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffffda;
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    border-bottom: 2px solid #00000015;
    z-index: 10; /* Ensure it stays above content */
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-button {
    padding: 1rem;
    background-color: #000000; /* Black background */
    color: #FFFFFF; /* White text */
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
    font-family: "Raleway", sans-serif;
}

.mobile-menu-button:hover {
    background-color: #333333; /* Slightly lighter black on hover */
    color: white;
    transform: scale(1.02);
}

/* Hide desktop header on mobile */
@media (max-width: 768px) {
    header {
        display: none;
    }
    .mobile-header {
        display: block;
    }
}

/* Show desktop header on larger screens */
@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }
}
.grid-item { /* Replace .element-selector with the class or ID of your element */
    transition: transform 0.3s ease; /* Smooth transition for scaling */
}

.grid-item:hover {
    transform: scale(1.1); /* Scales the element to 110% */
    
    filter: drop-shadow(0 0 0.75rem rgb(255, 255, 255));
}

/* Grid Layout */
.grid-container {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    margin: 0 auto;
    max-width: 60%;
    grid-template-columns: repeat(3, 1fr);
    box-sizing: border-box; /* Added box-sizing rule */
}

.grid-item {
    perspective: 1000px; /* Gives a 3D perspective */
    transform-style: preserve-3d;
}

.grid-item img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-origin: center; /* Ensures tilt happens from the center */
    will-change: transform;
}

.grid-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* UPDATED OVERLAY STYLES */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Wrapper for all overlay content */
.overlay-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 920px;
}

/* YouTube Player Container - Full Width */
.youtube-player-container {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

#youtube-player {
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* Overlay Content (Description Bar) */
.overlay-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(255, 255, 255);
    border-radius: 0 0 8px 8px;
    padding: 1rem 2rem;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Text Section */
.overlay-text {
    flex: 1;
    padding-right: 2rem;
}

.overlay-text h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.overlay-text p {
    margin-top: 0;
    font-size: 1rem;
    line-height: 1.4;
}

/* Overlay Image - Thumbnail */
#overlay-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* Close Button */
#close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgb(255, 255, 255);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 201;
    display: none;
}

/* SPECIAL OVERLAY STYLES (Contact/About) */
#overlay:not(.youtube-active) .overlay-wrapper {
    width: 80%;
    max-width: 800px;
}

#overlay:not(.youtube-active) .youtube-player-container {
    display: none;
}

#overlay:not(.youtube-active) .overlay-content {
    border-radius: 8px;
    padding: 2rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .overlay-wrapper {
        width: 95%;
    }
    
    .overlay-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .overlay-text {
        padding-right: 0;
        padding-bottom: 1rem;
        width: 100%;
    }
    
    #overlay-image {
        width: 200px;
        height: 200px;
        object-fit: cover;
        border-radius: 8px;
        margin: 0 auto;
        display: block;
    }
    
    
    /* Disable grid item hover effects */
    .grid-item {
        position: relative;
        z-index: 1;
        transition: transform 0.3s ease, z-index 0s;
    }
    
    /* Disable tilt effects on grid items */
    .grid-item img {
        transform: none !important;
    }
    
     /* Disable button hover effects */
    .mobile-menu-button:hover,
    .contact-button:hover,
    .about-button:hover,
    .youtube-button:hover {
        transform: none;
        background-color: #000000;
        outline: none;
    }
    
    /* Disable logo hover animations */
    .header-content:hover .logo#ncbot,
    .header-content:hover .logo#nctop,
    .header-content:hover .logo#ncmid {
        transform: none;
    }
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .grid-container {
        max-width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }

    header .header-content {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    /* Adjust the header for mobile view */
    header {
        padding: 1rem 0;
    }

    /* Show logo and hide text on mobile */
    header h1 {
        display: none;
    }

    header .logo {
        display: block;
        width: 80px;
    }

    header .contact-button {
        margin-right: 1rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    header .header-content {
        max-width: 100%;
    }
}

/* Footer Styles */
footer {
    position: relative;
    text-align: center;
    padding: 1rem;
    background-color: #000000;
    color: #fff;
    overflow: hidden;
}
.grid-item:hover {
    transform: scale(1.1);
    z-index: 10; /* Higher z-index when hovered */
    filter: drop-shadow(0 0 0.75rem rgb(255, 255, 255));
}
/* Footer Image */
.footer-image {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scale(0.2);
    transform-origin: bottom left;
    width: 60%;
    max-width: 60%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
}

/* Ensure the grid and footer image alignment matches */
@media (max-width: 1024px) {
    .footer-image {
        width: 100%;
        max-width: 100%;
    }
}

/* Add these CSS rules */
.logo-header-group {
    display: flex;
    align-items: center;
    gap: 0px;
}

.header-title-image {
    height: 40px;
    width: auto;
    margin-left: 0px;
}

/* Update existing header-content rule */
header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 60%;
    margin: 0 auto;
    padding: 0rem 0;
}

/* Touch device adjustments */
@media (hover: none) {
    .grid-item:hover,
    .mobile-menu-button:hover,
    .contact-button:hover,
    .about-button:hover,
    .youtube-button:hover {
        transform: none;
        filter: none;
        outline: none;
    }
    
    .grid-item img {
        transform: none !important;
    }
}

/* Draggable styles from your existing code */
.draggable {
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.draggable:active {
    cursor: grabbing;
}

.draggable img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.dragging {
    cursor: grabbing !important;
    pointer-events: none;
    z-index: 9999;
}

body.dragging-active {
    cursor: grabbing;
}

body.dragging-active * {
    cursor: grabbing;
}

@media (max-width: 768px) {
    .draggable {
        cursor: default;
    }
}

/* Improve performance */
.grid-container {
    will-change: contents;
}

.grid-item {
    will-change: transform;
}