/* E-Cell CSMU Website Stylesheet (DRAFT VERSION) */
/* ----------------------------- */

/* 1. General & Typography */
/* ----------------------------- */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    /* background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('bg.jpg'); */
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: #ffffff; /* White text */
    line-height: 1.6;
}

/* Background Video */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    display: none; /* hidden by default; shown on desktop via media query */
}

*, *::before, *::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    color: #FFB703; /* Gold headings */
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #FFB703;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #ffffff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: clamp(30px, 4.5vw, 60px) 0;
    border-bottom: 1px solid #222;
}

section:last-child {
    border-bottom: none;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

/* 3. Header & Navigation */
/* ----------------------------- */
.navbar {
    background-color: #0a0a0a;
    padding: 1rem 0;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar .logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: #FFB703;
}

.navbar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar nav ul li {
    margin-left: 20px;
}

.navbar nav ul li a {
    color: #ffffff;
    font-weight: 700;
}

.navbar nav ul li a:hover {
    color: #FFB703;
}

/* 4. Buttons */
/* ----------------------------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    margin: 5px;
    transition: transform 0.3s, background-color 0.3s;
}

.btn-primary {
    background-color: #FFB703;
    color: #000000;
}
.btn-primary:hover {
    background-color: #ffffff;
    color: #000000;
}

/* 12. Buttons */
/* ----------- */
.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #FFB703;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #FFB703;
}

.btn-secondary:hover {
    background-color: #FFB703;
    color: #000;
    transform: translateY(-2px);
}

/* Page Header */
.page-header {
    background-color: #0a0a0a;
    padding: 40px 0;
    text-align: center;
}
.page-header h2 {
    margin: 0;
}

/* Specific Overrides */
#about-header, #join-header {
    background-color: transparent;
}

#portfolio-cta {
    background-color: #f0f0f0;
    color: #000;
}
#portfolio-cta h3 {
    color: #000;
}
#portfolio-cta p {
    color: #333;
}

/* Form Styling */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background-color: #111;
    border-radius: 8px;
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #FFB703;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #222;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #FFB703;
    box-shadow: 0 0 0 2px rgba(255, 183, 3, 0.3);
}

.form-group button.btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

#form-status {
    margin-top: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
}

#form-status.success {
    color: #28a745;
}

#form-status.error {
    color: #dc3545;
}


/* 5. Hero Section */
/* ----------------------------- */
.hero {
    text-align: center;
    padding: 80px 0;
    position: relative;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #ccc;
}

/* 6. Grids */
/* ----------------------------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* 7. Cards */
/* ----------------------------- */
.card {
    background-color: #111;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #222;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #FFB703;
}

.card h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.card p {
    color: #ccc;
}

/* 8. About Page Specifics */
/* ----------------------------- */
.mission-vision {
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFB703;
    margin-bottom: 15px;
}

.team-member h4 {
    margin: 0;
    color: #fff;
}

.team-member p {
    color: #FFB703;
    font-size: 0.9rem;
}

/* 10. Footer */
/* ----------------------------- */
.footer {
    background-color: #0a0a0a;
    padding: 10px 0 0 0;
    border-top: 1px solid #222;
}
.footer-legal {
    text-align: center;
    padding: 10px 0;
    margin-top: 5px;
    border-top: 1px solid #222;
}
.footer-legal p {
    margin: 0;
    color: #aaa;
    font-size: 0.7rem;
}

/* 11. Portfolio Grid (Join Page) */
/* ----------------------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.portfolio-card {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: #FFB703;
}

.portfolio-card h3 {
    color: #FFB703;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.portfolio-card h4 {
    color: #fff;
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-card p {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Portfolios navigation menu (simple card-style links) */
.portfolio-menu {
    margin-bottom: 30px;
}
.portfolio-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.portfolio-menu-grid li {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
}
.portfolio-menu-grid a {
    display: block;
    padding: 18px 14px;
    color: #FFB703;
    font-weight: 700;
    text-align: center;
}
.portfolio-menu-grid a:hover {
    background: rgba(255,183,3,0.08);
    color: #FFB703;
    text-decoration: none;
}

/* Desktop two-column layout to match the reference image */
@media (min-width: 1025px) {
    .portfolio-layout {
        display: flex;
        gap: 32px;
        align-items: flex-start;
    }

    .portfolio-menu {
        width: 260px;
        background: #1e1f20;
        border-radius: 6px;
        padding: 10px;
        border: 1px solid rgba(255,255,255,0.02);
        /* keep the menu visible while scrolling */
        position: sticky;
        top: 110px;
        height: calc(100vh - 140px);
        overflow-y: auto;
    }

    .portfolio-menu-grid li {
        margin: 6px 0;
        border-left: 3px solid transparent;
    }

    .portfolio-menu-grid a {
        text-align: left;
        padding: 16px 18px;
        color: #dcdcdc;
        display: block;
    }

    .portfolio-menu-grid a.active {
        color: #FFB703;
        background: transparent;
        border-left: 4px solid #FFB703;
        padding-left: 14px; /* visual offset after border */
        font-weight: 700;
    }

    .portfolio-content {
        flex: 1 1 auto;
    }

    /* Make the visible portfolio card look like the reference: large rounded panel */
    .portfolio-card {
        background-color: #3b3b3b;
        border-radius: 12px;
        padding: 36px;
        color: #e9e9e9;
        box-shadow: 0 4px 18px rgba(0,0,0,0.45);
        border: 1px solid rgba(255,255,255,0.03);
    }

    .portfolio-card h3 {
        font-size: 2rem;
        color: #FFB703;
        margin-bottom: 8px;
    }

    .portfolio-card p, .portfolio-card li {
        color: #d6d6d6;
        font-size: 1rem;
        line-height: 1.8;
    }

    /* Ensure hidden cards don't take up space */
    .portfolio-card--hidden {
        display: none !important;
    }
}

/* Accordion behavior: hide/show portfolio cards */
.portfolio-card--hidden {
    display: none !important;
}

.portfolio-menu-grid a.active {
    background: #FFB703;
    color: #000;
}

/* Show background video only on desktop viewports */
@media (min-width: 1025px) {
    #bg-video {
        display: block;
        pointer-events: none; /* don't block clicks */
        will-change: transform;
    }
    /* Stretch the main container to full desktop width while keeping side padding for readability */
    .container {
        max-width: 100%;
        padding-left: 35px;
        padding-right: 35px;
    }
}

/* 13. Mobile Responsiveness */
/* ------------------------- */

/* Hamburger Menu Button (Hidden on Desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger {
    display: block;
    position: relative;
    width: 30px;
    height: 3px;
    background: #FFB703;
    transition: transform 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: #FFB703;
    transition: transform 0.3s ease-in-out;
}

.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }

/* Mobile Styles */
@media (max-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: block;
    }

    .navbar nav {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden by default */
        width: 70%;
        height: 100vh;
        background-color: #111;
        padding: 80px 20px;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    .navbar nav.nav-open {
        right: 0; /* Slide in */
    }

    .navbar nav ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar nav ul li {
        margin: 20px 0;
    }

    .navbar nav ul li a {
        font-size: 1.2rem;
    }

    /* Hamburger Animation when Open */
    .nav-toggle[aria-expanded="true"] .hamburger {
        background: transparent;
    }
    .nav-toggle[aria-expanded="true"] .hamburger::before {
        transform: rotate(45deg);
    }
    .nav-toggle[aria-expanded="true"] .hamburger::after {
        transform: rotate(-45deg);
    }

    /* Typography & Layout Adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero { padding: 60px 0; }
    .hero p { font-size: 1rem; }

    .grid-2, .grid-3, .portfolio-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
    }

    .form-container {
        padding: 20px;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }

    /* Portfolios menu: compact horizontal pill buttons on mobile for easy tapping */
    .portfolio-layout {
        display: block;
    }

    .portfolio-menu {
        width: 100%;
        background: transparent;
        padding: 8px 0 12px 0;
        position: relative;
        height: auto;
        border-radius: 0;
        border: none;
    }

    .portfolio-menu-grid {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 6px 12px;
        -webkit-overflow-scrolling: touch;
    }

    .portfolio-menu-grid li {
        flex: 0 0 auto;
        border-left: none;
        margin: 0;
    }

    .portfolio-menu-grid a {
        display: inline-block;
        padding: 8px 12px;
        border-radius: 999px;
        background: rgba(255,255,255,0.03);
        color: #dcdcdc;
        font-weight: 600;
        white-space: nowrap;
        font-size: 0.95rem;
    }

    .portfolio-menu-grid a.active {
        background: #FFB703;
        color: #000;
    }

    /* Make portfolio cards full-width and stacked on mobile */
    .portfolio-content {
        padding-top: 8px;
    }

    .portfolio-card {
        background-color: #2b2b2b;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 18px;
    }

    /* Ensure hidden cards do not affect layout */
    .portfolio-card--hidden { display: none !important; }

    /* Mobile Background Video */
    body {
        background-image: none;
    }
    #bg-video {
        display: block;
    }
}

/* 14. Preloader (Business/Startup Theme) */
/* -------------------------------------- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Rising Graph Animation */
.loader-graph {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
    margin-bottom: 20px;
}

.bar {
    width: 12px;
    background-color: #FFB703;
    animation: graph-grow 1.2s ease-in-out infinite;
    transform-origin: bottom;
}

.bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.bar:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 100%; animation-delay: 0.4s; }
.bar:nth-child(4) { height: 80%; animation-delay: 0.6s; }

@keyframes graph-grow {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.4); opacity: 0.6; }
}

.loader-text {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.loader-text span {
    color: #FFB703;
}

/* Hide class */
.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.modal-content {
    background-color: #111;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.social-links, .help-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a, .help-links a {
    color: #FFB703;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-links a:hover, .help-links a:hover {
    color: #fff;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Success Animation */
.success-svg {
    width: 4rem;
    height: 4rem;
    margin-bottom: 10px;
}

.checkmark-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 1s ease-in-out 0.5s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

#success-text {
    color: #FFB703;
    animation: successGlow 2s infinite;
}

@keyframes successGlow {
    0% {
        text-shadow: 0 0 5px #FFB703, 0 0 10px #FFB703;
    }
    50% {
        text-shadow: 0 0 15px #FFB703, 0 0 30px #FFB703, 0 0 45px #FFB703;
    }
    100% {
        text-shadow: 0 0 5px #FFB703, 0 0 10px #FFB703;
    }
}