/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", sans-serif;
    background-color: #0a0a0a;
    color: #f0f0f0;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    z-index: 1000;
    perspective: 1000px;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle {
    background-color: #000;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    position: relative;
}

.dot {
    position: absolute;
    top: 10px;
    align-items: center;
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
}

.notification:hover {
    transform: scale(1.1);
}

nav img {
    height: 40px;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.hamburger-btn {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
}

.nav-links a {
    color: #ccc;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00ffc8;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        right: 2rem;
        background: #111;
        padding: 1rem;
        border-radius: 10px;
    }

    .nav-links.show {
        display: flex;
    }

    .hamburger-btn {
        display: block;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(#000, #111);
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

#three-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-logo {
    z-index: 1;
    width: 120px;
    margin-bottom: 1rem;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.hero-logo.touched {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0% { transform: scale(1) translateZ(15px); }
    50% { transform: scale(1.3) translateZ(30px); }
    100% { transform: scale(1) translateZ(15px); }
}

.hero h1 {
    z-index: 1;
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.collab-btn {
    z-index: 1;
    background: #00ffc8;
    color: #000;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-weight: bold;
    transition: background 0.3s, transform 0.5s ease;
    transform-style: preserve-3d;
}

.collab-btn:hover {
    background: #00bfa6;
    transform: translateZ(20px);
}

/* Smooth 3D Scroll Effect */
[data-3d] {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Disable transitions while scrolling */
.scrolling [data-3d] {
    transition: none;
}

/* Section Base */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: auto;
}

.section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #00ffc8;
}

/* About Section */
.about-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.about-text {
    flex: 1;
    min-width: 280px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.about-video {
    flex: 1;
    min-width: 320px;
}

.about-video video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    border: 4px solid #00ff9f;
    box-shadow: 0 0 10px #00ff9f;
}

/* Slider Container */
.slider-container {
    position: relative;
    margin: 0 auto;
}

/* Slider Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #00ffc8;
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    font-size: 1.2rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background: #00bfa6;
}

.projects-prev, .events-prev, .achievements-prev, .current-leaders-prev, .past-leaders-prev {
    left: 1rem;
}

.projects-next, .events-next, .achievements-next, .current-leaders-next, .past-leaders-next {
    right: 1rem;
}

/* Slider */
.slider {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
    margin: 0 3rem;
}

/* Standard Box Styling for Projects, Events, Achievements, Faculty, Coordinators, Past Leaders, and Members */
.project-row, .events-row, .achievements-grid, .current-leaders-slider, .past-leaders-slider {
    margin-top: 20px;
}

.project, .event, .achievement, .faculty, .coordinator, .past-leader, .member {
    text-align: center;
    background-color: #222;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 15px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease, border 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.project {
    width: 300px;
    height: 500px;
    border: 2px solid transparent; /* Default border set to transparent */
}

.project:hover {
    border: 2px solid #00ffcb; /* Green border on hover */
    transform: translateZ(20px);
    box-shadow: 0 8px 16px rgba(0, 255, 203, 0.5);
}

.event, .achievement, .faculty, .coordinator, .past-leader, .member {
    width: 200px;
    height: 400px;
    border: 2px solid transparent; /* Default border set to transparent */
}

.event:hover, .achievement:hover, .faculty:hover, .coordinator:hover, .past-leader:hover, .member:hover {
    border: 2px solid #00ffcb; /* Green border on hover */
    transform: translateZ(20px);
    box-shadow: 0 8px 16px rgba(0, 255, 203, 0.5);
}

.project img, .event img, .achievement img, .faculty img, .coordinator img, .past-leader img, .member img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.project h3, .event h3, .achievement h3 {
    order: 1; /* Moves the title below the video/image */
    margin-top: 0.2rem; /* Reduced margin to bring title closer to video */
    margin-bottom: 0.5rem;
}

.project p, .event p, .achievement p, .faculty p, .coordinator p, .past-leader p, .member p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    text-align: center;
}

/* Project-specific styling */
.project .member-name {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    order: 2; /* Member names come after the title */
}

.project-content {
    flex: 1;
    max-height: 100px;
    overflow: hidden;
    width: 100%;
    transition: max-height 0.3s ease;
    order: 3; /* Project content comes after member names */
}

.project-content p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    white-space: normal;
}

.project-content.expanded {
    max-height: none;
}

.read-more-btn {
    background: #80808020; /* Light grey with transparency for minimal background */
    color: #808080; /* Grey text */
    border: 1px solid #80808080; /* Slightly lighter grey border */
    padding: 0.1rem 0.3rem; /* Even smaller padding */
    border-radius: 8px; /* Smaller, more compact corners */
    font-size: 0.65rem; /* Slightly smaller font */
    cursor: pointer;
    margin-top: 0.4rem;
    transition: background 0.3s ease;
    order: 4;
}

.read-more-btn:hover {
    background: #00bfa6;
    color: #000;
}

/* Ensure past leader names are bold */
.past-leader .member-name,
.past-leader p:first-child {
    font-weight: bold;
}

.content {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Video Container and Custom Controls */
.video-container {
    position: relative;
    width: 100%;
    margin-bottom: 0; /* Reduced margin to minimize gap between video and title */
    order: 0; /* Ensures video stays at the top */
}

.project video, .achievement video {
    width: 100%;
    max-height: 200px;
    border-radius: 5px;
    object-fit: cover;
}

.custom-video-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 20px;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

.project:hover .custom-video-controls,
.achievement:hover .custom-video-controls {
    opacity: 1; /* Show controls on project/achievement hover */
}

.custom-video-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.custom-video-controls button:hover {
    color: #00ffc8;
}

.custom-video-controls .play-pause-btn.playing i::before {
    content: "\f04c";
}

.custom-video-controls .mute-btn.muted i::before {
    content: "\f6a9";
}

.custom-video-controls .fullscreen-btn.exit-fullscreen i::before {
    content: "\f066";
}

/* Events Section Image Styling */
.event .video-container {
    position: relative;
    width: 100%;
    margin-bottom: 0;
    order: 0;
}

.event .event-image {
    width: 100%;
    max-height: 200px;
    border-radius: 5px;
    object-fit: cover;
    cursor: pointer;
}

/* Achievements Section Video and Image Styling */
.achievement .video-container {
    position: relative;
    width: 100%;
    margin-bottom: 0;
    order: 0;
}

.achievement .achievement-image {
    width: 100%;
    max-height: 200px;
    border-radius: 5px;
    object-fit: cover;
    cursor: pointer;
}

/* Modal for Maximized Images */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive Styling */
@media screen and (max-width: 768px) {
    .project, .event, .achievement, .faculty, .coordinator, .past-leader, .member {
        margin: 10px 0;
        overflow: hidden;
    }

    .project {
        width: 280px;
        height: 450px;
    }

    .event, .achievement, .faculty, .coordinator, .past-leader, .member {
        width: 160px;
        height: 350px;
    }

    .project img, .event img, .achievement img, .faculty img, .coordinator img, .past-leader img, .member img {
        width: 50px;
        height: 50px;
    }

    .project p, .event p, .achievement p, .faculty p, .coordinator p, .past-leader p, .member p {
        font-size: 0.8rem;
        margin: 0.3rem 0;
    }

    .project .member-name {
        font-size: 0.8rem;
        margin: 0.3rem 0;
    }

    .project-content {
        max-height: 80px;
    }

    .project-content p {
        font-size: 0.8rem;
    }

    .past-leader .member-name,
    .past-leader p:first-child {
        font-weight: bold;
    }

    .project video,
    .event .event-image,
    .achievement video,
    .achievement .achievement-image {
        max-height: 160px;
    }
    
    .slider {
        margin: 0 1rem;
    }
    
    .slider-nav {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .projects-prev, .events-prev, .achievements-prev, .current-leaders-prev, .past-leaders-prev {
        left: 0.5rem;
    }
    
    .projects-next, .events-next, .achievements-next, .current-leaders-next, .past-leaders-next {
        right: 0.5rem;
    }

    .custom-video-controls {
        opacity: 1; /* Always show on mobile for better usability */
    }


    .leader-image {
    cursor: pointer;
}

    /* Current Leaders on Mobile: Vertical Scroll */
    .current-leaders .slider-nav {
        display: none;
    }

    .current-leaders-slider {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0;
    }

    .current-leaders-slider.slick-initialized {
        display: block;
    }

    .current-leaders-slider .faculty,
    .current-leaders-slider .coordinator {
        margin: 20px auto;
        width: 160px;
        height: 350px;
    }

    /* Past Leaders on Mobile: Keep Slider */
    .past-leaders-slider .past-leader {
        margin: 10px auto;
        width: 160px;
        height: 350px;
    }
}

/* Achievements */
.achievement {
    background: #1b1b1b;
}

/* Members */
.tree-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.tree-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Container styling */
.members-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    background: #000;
}

/* Individual member card */
.member-card {
    background: #111;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: white;
    width: 200px;
    height: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Shine effect */
.member-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(25deg);
    transition: 0.5s;
    pointer-events: none;
}

/* Hover shine animation */
.member-card:hover::before {
    left: 100%;
    transition: left 0.8s ease;
}

.member-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,255,255,0.2);
}

/* Member image (optional icon placeholder) */
.member-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 12px;
}

/* Member card text */
.member-card p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

/* LinkedIn/email icons */
.member-card .icons {
    margin-top: 10px;
}

.member-card .icons a {
    display: inline-block;
    margin: 0 5px;
    color: white;
    font-size: 20px;
    transition: color 0.3s;
}

.member-card .icons a:hover {
    color: cyan;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .members-container {
        gap: 20px;
    }

    .member-card {
        width: 160px;
        height: 280px;
        padding: 15px;
    }

    .member-card img {
        width: 50px;
        height: 50px;
    }

    .member-card p {
        font-size: 0.8rem;
        white-space: normal;
        text-overflow: unset;
    }
}

@media (max-width: 768px) {
    .tree-row {
        flex-direction: column;
        align-items: center;
    }

    .faculty, .coordinator, .past-leader, .member {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .mobile-members .member {
        width: 100%;
        max-width: 300px;
        height: 280px;
        margin: 0;
    }
}

.members-container h3 {
    font-size: 1.8rem;
    color: #00ffc8;
    margin: 2rem 0;
}

.tree-row h4 {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    color: #00ffc8;
    margin-bottom: 1rem;
}

.icon {
    font-size: 20px;
    margin: 5px;
}

/* See All Members Button */
.see-all-btn {
    background: #00ffc8;
    color: #000;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s ease;
    transform-style: preserve-3d;
    margin: 1rem 0;
    z-index: 1000;
}

.see-all-btn:hover {
    background: #00bfa6;
    transform: translateZ(20px);
}

.see-all-btn.fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 2000;
}

/* Members Table (Desktop) */
.members-table-container {
    display: none;
    width: 100%;
    max-width: 1200px;
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.members-table-container.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.desktop-members {
    width: 100%;
    border-collapse: collapse;
    background: #222;
    border: 2px solid #00ffcb;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.desktop-members td {
    padding: 1rem;
    text-align: center;
    vertical-align: top;
    border: 1px solid #00ffcb;
}

.desktop-members .member {
    margin: 0;
    min-width: 0;
    width: 200px;
    height: 300px;
}

.desktop-members .member img {
    width: 80px;
    height: 80px;
}

.desktop-members .member p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Define member-name for consistency */
.member-name {
    color: #fff;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .member-name {
        font-size: 0.8rem;
        margin: 0.3rem 0;
        white-space: normal;
        text-overflow: unset;
    }
}

/* Mobile Members (Flexbox Layout) */
.mobile-members {
    display: none;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.mobile-members .member {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
    background: #222;
    border: 1px solid #00ffcb;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 0;
    width: 160px;
    height: 280px;
}

.mobile-members .member img {
    width: 50px;
    height: 50px;
}

.mobile-members .member p {
    font-size: 0.8rem;
    margin: 0.3rem 0;
    white-space: normal;
    text-overflow: unset;
}

@media (max-width: 1024px) {
    .desktop-members td {
        padding: 0.5rem;
    }

    .desktop-members .member {
        width: 160px;
        height: 280px;
    }

    .desktop-members .member img {
        width: 60px;
        height: 60px;
    }

    .desktop-members .member p {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .tree-row {
        flex-direction: column;
    }

    .faculty, .coordinator, .past-leader, .member {
        margin: 20px 0;
    }

    .desktop-members {
        display: none;
    }

    .mobile-members {
        display: flex;
    }

    .see-all-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .see-all-btn.fixed {
        bottom: 15px;
        right: 15px;
        z-index: 2000;
    }

    .members-table-container {
        margin: 1rem 0;
    }

    .members-table-container.show {
        display: block;
    }
}

@media (max-width: 480px) {
    .mobile-members .member {
        flex: 1 1 100%;
        max-width: 300px;
        width: 100%;
        height: 280px;
        margin: 0 5px;
    }

    .mobile-members .member img {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .mobile-members .member p {
        font-size: 0.8rem;
        margin: 0.3rem 0;
    }

    .mobile-members {
        gap: 10px;
        justify-content: space-between;
    }
}

/* Contact Section */
.contact-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: auto;
    border: 2px solid #00ffc8;
    border-radius: 10px;
    background: #1b1b1b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    font-size: 1rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info a {
    color: #00ffc8;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #00bfa6;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.social-links .icon {
    font-size: 24px;
    color: #00ffc8;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links .icon:hover {
    color: #00bfa6;
    transform: scale(1.2);
}

.map {
    flex: 1;
    min-width: 300px;
}

.map iframe {
    width: 100%;
    max-width: 400px;
    height: 300px;
    border: none;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .contact-section {
        padding: 2rem 1rem;
        min-height: 300px;
        display: flex;
        flex-direction: column;
        align-items: center;
        border: 2px solid #00ffc8;
        border-radius: 10px;
        background: #1b1b1b;
    }

    .contact-content {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    .contact-info {
        text-align: center;
        margin-bottom: 1rem;
    }

    .social-links {
        justify-content: center;
        width: 100%;
    }

    .map iframe {
        max-width: 100%;
        height: 250px;
        margin-top: 1rem;
    }
}

/* Footer */
.footer {
    background: #111;
    color: #ddd;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
}

.footer p {
    font-size: 0.9rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #00ffc8;
    border-radius: 4px;
}

/* Make projects clickable */
.project {
    cursor: pointer;
}

/* CSS for more responsive video controls experience */
video {
    transition: opacity 0.3s ease-in-out;
}