/* ============================================================ */
/* FILE: style.css */
/* ============================================================ */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #f8f9fa;
    --accent-color: #1abc9c;
    --text-color: #34495e;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-color: #e9ecef;
    --input-border-color: #ced4da;
    --header-bg: #2c3e50;
    --header-text: white;
    --dropdown-bg: #ffffff;
    --icon-color: #ffffff; 
    --nav-link-color: #000000;
}

/* Add dark mode variables */
.dark-mode {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #1abc9c;
    --text-color: #ecf0f1;
    --card-bg: #34495e;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    --border-color: #4a627a;
    --input-border-color: #5d7a99;
    --header-bg: #1f2c38;
    --header-text: #ecf0f1;
    --dropdown-bg: #2c3e50;
    --icon-color: #ffffff;   
    --nav-link-color: #1abc9c;
}


/* ============================================================ */
/* ANIMATIONS */
/* ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
}


body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    animation: fadeIn 0.8s ease-in-out;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

header h1 a {
    color: var(--header-text);
    text-decoration: none;
}

header nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

header nav a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--accent-color);
}

#user-session .user-icon-link svg {
    width: 28px;
    height: 28px;
    stroke: var(--header-text);
    transition: stroke 0.3s ease, transform 0.3s ease;
}

#user-session .user-icon-link:hover svg {
    stroke: var(--accent-color);
    transform: scale(1.1);
}


/* Theme Toggle Button */
.theme-toggle-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    color: var(--header-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, transform 0.3s;
}
.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

main {
    padding: 2.5rem 5%;
}

/* Hero Image */
.hero-container {
    position: relative;
    height: 350px;
    width: 100%;
    margin-bottom: 2.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    transition: background-image 1s ease-in-out;
}

.hero-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
}

.hero-text {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.hero-text h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-text p {
    font-size: 1.25rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

/* Search & Grid */
.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0; 
    transition: background-color 0.3s;
}

.search-container input, .search-container select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--input-border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.search-container input:focus, .search-container select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2);
}

#research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.research-card.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.research-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
}

.research-card .notes {
    padding: 0 1.5rem 1.5rem;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.research-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    padding: 1.5rem;
    margin: 0;
    color: var(--text-color);
}

.image-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1.5rem 1rem;
}

.image-container img {
    width: 100%;
    height: 140px;
    border-radius: 6px;
    object-fit: cover;
}

.notes p {
    margin-top: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
}

.notes h3 {
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.4rem;
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AUDIO PLAYER STYLES */
.audio-player {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.audio-player h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    padding-bottom: 0;
    display: block;
}

audio {
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 50px;
    height: 50px;
}

.google-drive-audio {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 6px;
}

/* Article & About Pages */
.article-main, .about-main {
    max-width: 850px;
    margin: 2rem auto;
    padding: 3rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: background-color 0.3s;
}

#article-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.article-image-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.article-image-container img {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: var(--border-radius);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
}

.article-image-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

#article-notes p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Image Modal Styles */
.modal-overlay {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80%;
    animation: fadeInUp 0.4s ease;
}

.modal-caption {
    margin: 20px auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
}

#modal-download-btn {
    background-color: var(--accent-color);
}

#modal-download-btn:hover {
    background-color: #16a085;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 45px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* About Page Specifics */
.about-content h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    font-weight: 600;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 2.5rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member-card {
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.team-member-card:hover {
    transform: translateY(-8px);
}

.team-member-card img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease-in-out;
}

.team-member-card:hover img {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.team-member-card h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.team-member-card .title {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.8;
    margin: 0.25rem 0 0 0;
}

/* Article Creator Page */
.creator-main-container {
    max-width: 850px;
    margin: 2rem auto;
}

.creator-form {
    padding: 2.5rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.creator-form h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-top: 0;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--input-border-color);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s, color 0.3s;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2);
}

.creator-form button, .button-download {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.creator-form button:hover, .button-download:hover {
    background-color: #16a085;
    transform: translateY(-2px);
}

.output-container {
    padding: 1.5rem;
    background-color: #2c3e50;
    color: #ecf0f1;
    border-radius: var(--border-radius);
}

.dark-mode .output-container {
    background-color: #1f2b38;
}

#output-code {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #34495e;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #495057;
    font-family: 'Courier New', Courier, monospace;
}
.dark-mode #output-code {
    background-color: #2c3e50;
    border-color: #5d7a99;
}


#copy-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

#copy-btn:hover {
    background-color: #2980b9;
}

#copy-feedback {
    display: inline-block;
    margin-left: 1rem;
    color: var(--accent-color);
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Password Protection */
#password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-box {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.password-box h2 {
    color: var(--text-color);
    margin-top: 0;
    font-weight: 600;
}

#password-input {
    width: 100%;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    border: 1px solid var(--input-border-color);
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 6px;
    box-sizing: border-box;
}

#password-submit {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#password-submit:hover {
    background-color: #16a085;
}

#password-error {
    color: #e74c3c;
    margin-top: 1rem;
    font-weight: bold;
}

.add-image-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s, transform 0.2s;
}

.add-image-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Tabs and QR Generator */
.creator-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-link {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-color 0.3s, background-color 0.3s;
    margin-bottom: -1px;
}

.tab-link:hover:not(.active) {
    background-color: rgba(0,0,0,0.1);
    opacity: 1;
}

.tab-link.active {
    color: var(--text-color);
    opacity: 1;
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.qr-code-display {
    text-align: center;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

#qr-code-img {
    max-width: 250px;
    width: 100%;
    height: auto;
}

#download-qr-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.topic-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#topic {
    flex-grow: 1; 
}

.add-topic-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.add-topic-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem;
    background-color: var(--header-bg);
    color: var(--header-text);
    margin-top: 3rem;
    transition: background-color 0.3s;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: text-decoration 0.3s;
}

footer a:hover {
    text-decoration: underline;
}

/* Download Button */
#download-pdf-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    animation: pulse 2.5s infinite ease-in-out 2s;
}

#download-pdf-btn:hover {
    background-color: #218838;
    transform: translateY(-3px);
    cursor: pointer;
    animation-play-state: paused;
}


@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem 5%;
        gap: 1rem;
    }
    header nav {
        gap: 1.5rem;
    }
    .search-container {
        flex-direction: column;
    }
    .hero-text h2 {
        font-size: 2.2rem;
    }
    .hero-text p {
        font-size: 1.1rem;
    }
}
/* ============================================================ */
/* GALLERY PAGE STYLES */
/* ============================================================ */
.gallery-main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem; /* Add horizontal padding */
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.gallery-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.gallery-header p {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
}

#gallery-grid {
    column-count: 4;
    column-gap: 1.5rem;
}

.gallery-item {
    margin-bottom: 1.5rem;
    display: inline-block; /* Essential for masonry */
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    break-inside: avoid; /* Prevents items from breaking across columns */
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive adjustments for the gallery columns */
@media (max-width: 1200px) {
    #gallery-grid { column-count: 3; }
}
@media (max-width: 992px) {
    #gallery-grid { column-count: 2; }
}
@media (max-width: 576px) {
    #gallery-grid { column-count: 1; }
}


/* ============================================================ */
/* MODAL STYLES FOR GALLERY */
/* ============================================================ */
.modal-details-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: left;
}

#modal-title {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    color: #fff;
    font-weight: 600;
}

/* Style the two buttons in the modal */
.modal-caption .button-download {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
}

.modal-caption #modal-view-more {
    background-color: transparent;
    border: 2px solid var(--accent-color);
}
.modal-caption #modal-view-more:hover {
    background-color: var(--accent-color);
}
/* ============================================================
// DROPDOWN NAVIGATION STYLES (For All Screen Sizes)
// ============================================================ */

/* --- Give the header a relative position for the dropdown --- */
header {
    position: relative;
}

/* --- Main nav container --- */
nav {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align items to the right */
    gap: 1rem;
}

/* --- The Hamburger Menu Button (Now always visible) --- */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    order: 3;
}

.menu-toggle .bar {
    width: 2rem;
    height: 0.25rem;
    background-color: var(--icon-color); /* Use the new icon color variable */
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(0.75rem) rotate(45deg);
}
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-0.75rem) rotate(-45deg);
}

/* --- Dropdown Menu Styling --- */
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    z-index: 1000;
    background-color: var(--dropdown-bg);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

/* --- Active state for dropdown --- */
.nav-links.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}

/* --- Style the links inside the dropdown --- */
.nav-links a,
.nav-links #user-session a {
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    color: var(--nav-link-color); /* Use the new link color variable */
    text-decoration: none;         /* Optional: remove underline */
    background-color: transparent; /* Ensure no background color on the link itself */
    transition: background-color 0.2s ease;
}

/* --- Optional: Add a hover effect for links --- */
.nav-links a:hover,
.nav-links #user-session a:hover {
    background-color: rgba(128, 128, 128, 0.1); /* A subtle hover effect */
}
#user-session {
    display: flex;
    align-items: center;
    gap: 15px; /* Creates space between the text and the icon */
}

.welcome-message {
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.5s ease-in-out; /* Animation for fading */
}

.welcome-message.fade-out {
    opacity: 0; /* Target state for the fade-out */
}
/* Add this to your existing style.css file */

/* ============================================================ */
/* NOTIFICATION STYLES */
/* ============================================================ */

/* --- Notification Icon in Header --- */
.notification-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--header-text);
}

.notification-icon-link svg {
    width: 28px;
    height: 28px;
    stroke: var(--header-text);
    transition: stroke 0.3s ease, transform 0.3s ease;
}

.notification-icon-link:hover svg {
    stroke: var(--accent-color);
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--header-bg);
}

/* --- Notifications Page --- */
.notifications-main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.notifications-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

#mark-all-read-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

#mark-all-read-btn:hover {
    background-color: rgba(26, 188, 156, 0.1);
}

#notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, transform 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    transform: translateY(-3px);
    background-color: var(--secondary-color);
}

.notification-item.unread {
    background-color: var(--secondary-color);
    border-left: 4px solid var(--accent-color);
}

.dark-mode .notification-item.unread {
    background-color: rgba(44, 62, 80, 0.5);
}

.notification-content {
    flex-grow: 1;
}

.notification-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

.notification-message {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
}

.notification-meta {
    text-align: right;
    flex-shrink: 0;
    margin-left: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.notification-timestamp {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.unread-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.no-notifications {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    opacity: 0.7;
}

#notification-feedback {
    display: inline-block;
    margin-left: 1rem;
    color: var(--accent-color);
    font-weight: bold;
}

/* Add this to your existing style.css file */

/* ============================================================ */
/* NOTIFICATION DELETE BUTTON STYLES */
/* ============================================================ */

.notification-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.delete-notification-btn {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, opacity 0.2s;
}

.delete-notification-btn:hover {
    background-color: rgba(231, 76, 60, 0.1); /* Reddish hover */
    color: #e74c3c;
    opacity: 1;
}

.dark-mode .delete-notification-btn {
    color: var(--text-color);
}

.dark-mode .delete-notification-btn:hover {
    color: #e74c3c;
}

/* Adjust meta layout for new actions container */
.notification-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}
/* ============================================================ */
/* INTERACTIVE MAP STYLES */
/* ============================================================ */

.map-container {
    position: relative;
    width: 100%;
    height: 550px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: grab;
    background-color: var(--secondary-color);
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}

.map-container:active {
    cursor: grabbing;
}

#hijra-map {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 0 0;
    user-select: none; /* Prevents image dragging ghost */
}

.map-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-controls button {
    background-color: var(--primary-color);
    color: var(--header-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.map-controls button:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

#reset-btn {
    font-size: 1.4rem;
}
/* ============================================================ */
/* REFERENCE SECTION STYLES */
/* ============================================================ */

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.reference-item {
    transition: transform 0.3s ease-in-out;
}

.reference-item:hover {
    transform: translateY(-8px);
}

.reference-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease-in-out;
}

.reference-item:hover img {
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.reference-item h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.reference-item .author {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin: 0.25rem 0 0 0;
}