:root {
    --bg-black: #0f0f0f;
    --accent-gold: #c9a227;
    --text-white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the H2 horizontally */
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    padding-bottom: 15px; /* Space between text and underline */
}

/* The Gradient Underline */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* Perfectly centers the underline */
    width: 80px; /* Width of the underline */
    height: 4px; /* Thickness of the underline */
    
    /* Gradient color from your Gold theme */
    background: linear-gradient(
        to right, 
        transparent, 
        var(--accent-gold), 
        transparent
    );
    
    border-radius: 2px;
}

/* Navigation Styling */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

/* Background change on scroll via JS */
.navbar.scrolled {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.nav-container {
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 2px; /* Space between logo and "BUPPS" text */
    text-decoration: none;
    color: var(--text-white);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-img {
    height: 45px; /* Adjust this to make your logo bigger or smaller */
    width: auto;  /* Maintains aspect ratio */
    object-fit: contain;
    transition: var(--transition);
}

/* Subtle glow effect on hover for the logo */
.nav-logo:hover .logo-img {
    filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.5));
    transform: scale(1.05);
}

/* On scrolled state, we can shrink the logo slightly for a sleek effect */
.navbar.scrolled .logo-img {
    height: 38px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-white);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-gold);
}

.btn-portal {
    padding: 8px 20px;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 2px;
    transition: var(--transition);
}

.btn-portal:hover {
    background: var(--accent-gold);
    color: #000;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-menu { display: none; } /* Add a mobile drawer later if needed */
    .nav-toggle { display: block; }
}

/* Hero Section */
.hero {
    height: 100vh; /* Ensures it takes exactly the full screen height */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    /* Background Image Adjustments */
    background-image: url('images/bupps_logo.png'); 
    background-size: cover;        /* Fills the area without distortion */
    background-position: center;   /* Keeps the focus on the middle */
    background-attachment: fixed;  /* Optional: Adds a parallax feel */
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* This creates a cinematic vignette: dark edges, slightly lighter center */
    background: radial-gradient(
        circle, 
        rgba(15, 15, 15, 0.4) 0%, 
        rgba(15, 15, 15, 0.85) 70%, 
        rgba(15, 15, 15, 1) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Ensures text stays above the dark overlay */
}

.hero h1 { font-size: 4rem; margin-bottom: 10px; }
.hero p { font-size: 1.5rem; color: #C0C0C0; margin-bottom: 30px; }

/* Buttons */
.btn {
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 2px;
    margin: 10px;
    display: inline-block;
    transition: var(--transition);
}

.btn-gold { background: var(--accent-gold); color: black; }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(201, 162, 39, 0.3); }

.btn-outline { background: var(--accent-gold); color: black; }
.btn-outline:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(201, 162, 39, 0.3); }

/* About & Counter */
.container { width: 85%; margin: auto; padding: 80px 0; }
.about { text-align: center; }
.about h2 { font-size: 2.5rem; color: var(--accent-gold); margin-bottom: 20px; }

.counters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.num { font-size: 3rem; font-weight: bold; color: var(--accent-gold); }

/* About Section Flex Layout */
.about-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding-bottom: 40px;
}

.about-content {
    flex: 1;
    text-align: left;
}

.section-title-left {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

/* Left-aligned Gradient Underline */
.section-header-left h2::after, .section-title-left::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-gold), transparent);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cccccc;
    margin-bottom: 30px;
}

.vision-mission-title {
    color: var(--text-white);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.mission-text {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #aaa;
    font-style: italic;
    border-left: 2px solid var(--accent-gold);
    padding-left: 20px;
}

.mission-icon {
    color: var(--accent-gold);
    flex-shrink: 0;
}

/* Right Side Logo & Animation */
.about-logo-container {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

.floating-logo {
    width: 100%;
    max-width: 350px;
    filter: drop-shadow(0 0 20px rgba(201, 162, 39, 0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Responsive Fix */
@media (max-width: 768px) {
    .about-flex {
        flex-direction: column;
        text-align: center;
    }
    .about-content { text-align: center; }
    .section-title-left::after { left: 50%; transform: translateX(-50%); }
    .mission-text { border-left: none; padding-left: 0; flex-direction: column; }
}

/*Events Section */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.event-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid #333;
    position: relative;
}

.event-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.event-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.event-overlay-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(201, 162, 39, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
}

.event-card:hover .event-img-container img { transform: scale(1.1); }
.event-card:hover .event-overlay-glow { opacity: 1; }

.event-info { padding: 20px; text-align: left; }
.event-info h3 { color: var(--accent-gold); margin-bottom: 5px; }
.event-info p { color: #aaa; font-size: 0.9rem; }
.view-album {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Headers */
.event-category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-title {
    margin-top: 30px;
    font-size: 1.5rem;
    color: var(--text-white);
    white-space: nowrap;
}

.title-line {
    margin-top: 30px;
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, var(--accent-gold), transparent);
}

/* Upcoming Card Specifics */
.event-card.upcoming {
    border: 1px dashed var(--accent-gold); /* Dashed border for "not yet arrived" feel */
    background: rgba(201, 162, 39, 0.05);
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-gold);
    color: #000;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 20px;
    z-index: 2;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-gold) !important;
    font-weight: 600;
    margin: 10px 0;
}

.btn-mini.disabled {
    background: transparent;
    border: 1px solid #444;
    color: #666;
    cursor: not-allowed;
    margin-top: 15px;
    padding: 8px 15px;
    font-size: 0.8rem;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.portal-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 162, 39, 0.1);
    padding: 40px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 4px;
}

.portal-card:hover {
    background: rgba(201, 162, 39, 0.05);
    border-color: var(--accent-gold);
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.portal-icon {
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.portal-icon svg { width: 50px; height: 50px; }

.portal-card h3 {
    color: var(--text-white);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.portal-card p { color: #888; }

/* Contact Section Styling */
.contact-section {
    padding: 80px 0;
    background: #0a0a0a; /* Slightly darker than main bg for depth */
}

.contact-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.contact-info {
    flex: 1;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 4px;
    transition: var(--transition);
}

.info-box:hover {
    background: rgba(201, 162, 39, 0.05);
}

.info-box i { color: var(--accent-gold); width: 30px; height: 30px; }
.info-box h4 { color: #fff; margin-bottom: 5px; font-size: 1.1rem; }
.info-box p { color: #888; }

/* Social Media Grid */
.social-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: #161616;
    border: 1px solid #222;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.social-card i { margin-bottom: 10px; width: 28px; height: 28px; transition: var(--transition); }

/* Hover Glows for Socials */
.social-card:hover { border-color: var(--accent-gold); transform: translateY(-5px); }
.social-card.fb:hover i { color: #1877f2; }
.social-card.ig:hover i { color: #e4405f; }
.social-card.ln:hover i { color: #0077b5; }
.social-card.tw:hover i { color: #1da1f2; }

/* Minimal Footer */
.site-footer {
    padding: 1px;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    background: #0f0f0f;
}

.footer-content p {
    color: #555;
    font-size: 1rem;
    margin: 0;
}

.footer-content strong { color: var(--accent-gold); }

/* --- Comprehensive Responsive Design --- */

/* Tablet & Mobile (Standard Breakpoint) */
@media (max-width: 992px) {
    .container { width: 90%; }
    .hero h1 { font-size: 3rem; }
    .masonry-grid { column-count: 2; } /* Gallery becomes 2 columns */
}

/* Mobile Devices (Phones) */
@media (max-width: 768px) {
    /* Navbar Adjustments */
    .nav-menu {
        display: none; /* Hide desktop menu; you can add a hamburger menu later */
    }
    
    /* Hero Section */
    .hero h1 { font-size: 2.2rem; padding: 0 10px; }
    .hero p { font-size: 1rem; }
    .hero-btns { display: flex; flex-direction: column; gap: 10px; align-items: center; }
    .btn { width: 80%; margin: 5px 0; }

    /* About Section */
    .about-flex { flex-direction: column; text-align: center; }
    .about-content { text-align: center; }
    .section-title-left::after { left: 50%; transform: translateX(-50%); }
    .mission-text { border-left: none; padding-left: 0; flex-direction: column; text-align: center; }
    .floating-logo { max-width: 250px; margin-top: 30px; }

    /* Events & Portal Grids */
    .event-grid, .portal-grid, .member-list {
        grid-template-columns: 1fr; /* Stack cards vertically */
        gap: 20px;
    }

    /* Gallery */
    .masonry-grid { column-count: 1; } /* Single column for photos */

    /* Contact Section (Your previous code updated) */
    .contact-flex { flex-direction: column; gap: 30px; }
    .social-grid { 
        width: 100%; 
        grid-template-columns: 1fr 1fr; /* Keep 2 icons per row on mobile */
    }
    .info-box { width: 100%; justify-content: center; text-align: center; flex-direction: column; }
}

/* Very Small Screens */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .social-grid { grid-template-columns: 1fr; } /* Stack socials in 1 column */
    .num { font-size: 2.5rem; }
}

/*Mobile menubar*/
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Hide off-screen */
        width: 70%;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.4s ease-in-out;
        z-index: 999;
    }

    /* When menu is open */
    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: block;
        z-index: 1000;
        color: var(--accent-gold);
    }
}

@media (max-width: 768px) {
    .hero {
        /* Change from 'cover' to 'contain' or a specific percentage 
           to ensure the full width of the logo is visible */
        background-size: 110% auto; 
        background-position: center 20%; /* Adjust 40% to move logo up/down */
        background-repeat: no-repeat;
        
        /* Ensure the hero section still takes full height */
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Optional: If the background becomes too light when 'contained', 
       add a solid color or a stronger gradient to the overlay */
    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(15, 15, 15, 0.8) 0%,
            rgba(15, 15, 15, 1) 100%
        );
    }
}