/* style_index_v5.css (Polished Refresh) */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --bg-color: #0d1117; /* GitHub dark background */
    --card-bg: rgba(22, 27, 34, 0.75); /* Semi-transparent card */
    --border-color: #30363d; /* GitHub dark border */
    --glow-color: rgba(88, 166, 255, 0.1); /* Blue glow */
    --text-primary: #e6edf3; /* Brighter text */
    --text-secondary: #8b949e; /* GitHub secondary text */
    --accent-primary: #58a6ff; /* GitHub blue */
    --accent-secondary: #3fb950; /* GitHub green */
    --dept-card-bg: rgba(33, 38, 45, 0.8); /* Darker card */
    --dept-card-hover-bg: rgba(88, 166, 255, 0.1); /* Blue hover */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column; /* Allow stacking of elements */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    overflow-x: hidden;
}

/* Particles.js container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2; /* Behind all content */
}

#aurora-cursor {
    display: none; /* Disable the old effect */
}

.hero-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px; /* Slightly more rounded */
    padding: 40px;
    width: 95%;
    max-width: 80vw; /* Takes up 80% of the viewport width */
    text-align: center;
    box-shadow: 0 10px 50px var(--glow-color);
    /* Increased blur */
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: box-shadow 0.4s ease;
}

.hero-container:hover {
    box-shadow: 0 10px 60px rgba(187, 134, 252, 0.15);
}

.hero-container h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #e0e3ff, var(--accent-primary));
    -webkit-background-clip: text;
    color: transparent;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-container p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.department-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.dept-card {
    background: var(--dept-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px 15px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px; 
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dept-card:hover {
    transform: translateY(-6px);
    background-color: var(--dept-card-hover-bg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: var(--accent-primary);
}

.dept-card i {
    font-size: 2rem;
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.dept-card:hover i {
    color: var(--accent-secondary);
}

.dept-card span {
    font-weight: 600;
    font-size: 1rem;
}

/* Common FAB and Donate Popup */
.fab-chat {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-primary);
    color: #161b22;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 999;
}
.fab-chat:hover {
    background-color: var(--accent-secondary);
    box-shadow: 0 0 25px rgba(63, 185, 80, 0.6);
    transform: scale(1.1) rotate(15deg);
}

/* Donation Popup */
#donate-blur-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.donate-popup-content {
    background: rgba(40, 40, 70, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 2vw;
    text-align: center;
    width: 80vw;
    max-width: 900px;
    height: 80vh;
    max-height: 600px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space */
    align-items: center;
}

.popup-text {
    font-size: 1.1rem;
    flex-shrink: 0; /* Prevent text from shrinking */
    padding: 10px;
}

.popup-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    width: 100%;
    flex-grow: 1; /* Allow container to grow */
    min-height: 0; /* Allow shrinking */
}

.popup-image {
    max-width: 48%;
    max-height: 100%; /* Fill the height of the container */
    object-fit: contain;
    border-radius: 10px;
}

.popup-close-btn {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* This rule was hiding the images and has been removed. */

@media (max-width: 768px) {
    .popup-image-container {
        flex-direction: column;
        gap: 2vh;
    }
    .popup-image {
        max-width: 90%;
        max-height: 48%;
    }
    .donate-popup-content {
        width: 90vw;
        height: 75vh;
        padding: 4vw;
    }
}

.donate-popup-content h3 {
    color: var(--text-color);
    margin-top: 0;
    font-size: 1.5em;
}

.donate-popup-content p {
    color: var(--text-secondary-color);
    font-size: 1.05em;
    margin-bottom: 22px;
    line-height: 1.6;
}

.donate-link-btn {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background 0.2s, transform 0.2s;
    margin: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.donate-link-btn:hover {
    background: #6a5acd; /* Slightly lighter purple */
    transform: translateY(-2px);
}

.close-donate-btn {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.close-donate-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Scrolling Text Banner */
.scrolling-text-container {
    width: 95%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    border-radius: 10px;
    z-index: 10;
    position: relative;
    margin: 16px auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-text 40s linear infinite;
    visibility: visible;
    color: var(--text-color);
    font-size: 1.1em;
    font-weight: 500;
}

@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 768px) {
    .scrolling-text-container {
        width: 98%;
        margin: 12px auto;
    }
    .scrolling-text {
        font-size: 1em;
        animation-duration: 25s;
    }
}

/* Responsive Fixes */
@media (max-width: 1200px) {
    .hero-container {
        max-width: 90vw; /* Adjust for medium-large screens */
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }
    .hero-container {
        padding: 30px 15px; 
        max-width: 95vw; /* Ensure it fits well on mobile */
    }
    .hero-container h1 {
        font-size: 2.2rem;
    }
    .hero-container p {
        font-size: 1rem;
    }
    .department-card-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
        gap: 12px;
    }
    .fab-chat {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
        bottom: 20px;
        right: 20px;
    }
}
