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

@font-face {
    font-family: 'Sinhala';
    /* The name you will use to call the font */
    src: url('4u-Anuradax.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #f0f0f0;
    --text-dark: #1a1a2e;
    --accent-blue: #4a9eff;
    --accent-purple: #7c3aed;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.sinhalav {
    font-family: 'Sinhala', sans-serif;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: -1px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
    color: var(--accent-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    /* Adjusted translation */
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    /* Adjusted translation */
}

/* Mobile Menu FIX: Removed display: none and used transform for hiding */
.mobile-menu {
    position: fixed;
    top: 65px;
    /* Adjust this value based on your navbar height */
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    z-index: 999;
}

.mobile-menu.active {
    max-height: 300px;
}

.mobile-nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 1rem 2rem;
    display: block;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-blue);
    padding-left: calc(2rem + 5px);
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(20px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(240, 240, 240, 0.8);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 2px;
}

/* ========== BOOKS SECTION ========== */
.books-section {
    margin-bottom: 5rem;
}

.books-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.book-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition);
}

.book-card:hover::before {
    left: 100%;
}

.book-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px rgba(74, 158, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: center;

}

.card-header li {
    list-style: none;


}

.card-icon {
    font-size: 2.5rem;
    display: block;
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--text-light);
}

.card-description {
    color: rgba(240, 240, 240, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-features {
    list-style: none;
    margin-bottom: 2rem;
}

.card-features li {
    color: rgba(240, 240, 240, 0.7);
    margin: 0.8rem 0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.card-features li:hover {
    color: var(--accent-blue);
    transform: translateX(5px);
}

.card-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.card-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(74, 158, 255, 0.3);
}

.card-btn:active {
    transform: scale(0.98);
}

/* ========== DONATE SECTION ========== */
.donate-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
}

.donate-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.1), transparent);
    pointer-events: none;
}

.donate-content {
    position: relative;
    z-index: 1;
}

.donate-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.donate-section p {
    font-size: 1.1rem;
    color: rgba(240, 240, 240, 0.8);
    margin-bottom: 2rem;
}

.donate-btn {
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.donate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.3);
}

.donate-btn:active {
    transform: scale(0.98);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    margin-top: 5rem;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(240, 240, 240, 0.8);
    line-height: 1.8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-blue);
    transform: translateX(5px);
}

.footer-section ul {
    list-style: none;
}

.footer-bottom {
    text-align: center;
    color: rgba(240, 240, 240, 0.6);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        /* Mobile: Hide the desktop menu */
        display: none;
    }

    /* FIX: Ensure mobile menu is hidden off-screen until active */
    .mobile-menu {
        max-height: 0;
        /* Temporarily override the absolute positioning for mobile view if needed, but max-height/overflow:hidden is the key */
    }


    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .books-container {
        grid-template-columns: 1fr;
    }

    .donate-section {
        padding: 2rem;
    }

    .donate-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .footer-content {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .hero {
        min-height: 50vh;
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .book-card {
        padding: 1.5rem;
    }

    .card-header h3 {
        font-size: 1.2rem;
    }

    .donate-section {
        padding: 1.5rem;
    }

    .donate-section h2 {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Donate Page Specific Styles */

.donate-main {
    min-height: calc(100vh - 80px);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: var(--text-light);
    padding: 40px 20px;
    margin-top: 80px;
}

.donate-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Form Section */
.form-section {
    animation: fadeIn 0.5s ease-in;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Glass Form */
.glass-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Form Steps */
.form-step {
    display: none;
    animation: slideIn 0.3s ease-in-out;
}

.form-step.active {
    display: block;
}

.form-step h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.radio-label:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Error Message */
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-prev,
.btn-next,
.btn-submit {
    flex: 1;
    min-width: 150px;
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-prev {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-prev:hover {
    background: rgba(102, 126, 234, 0.2);
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.progress-line {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

/* Success Section */
.success-section {
    opacity: 1;
    visibility: visible;
    transition: all 0.5s ease;
}

.success-section.hidden {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.success-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: scaleIn 0.5s ease-in-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    animation: bounceIn 0.6s ease;
}

.success-card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.success-card p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.success-details {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 30px;
}

.btn-home {
    display: inline-block;
    padding: 12px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .donate-main {
        padding: 20px 15px;
        margin-top: 70px;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }

    .glass-form {
        padding: 25px 20px;
    }

    .form-step h2 {
        font-size: 1.4rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .progress-indicator {
        gap: 8px;
    }

    .progress-step {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .progress-line {
        width: 25px;
    }

    .success-card {
        padding: 40px 20px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 1.5rem;
    }

    .glass-form {
        border-radius: 15px;
        padding: 20px 15px;
    }

    .form-step h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

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

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px;
    }

    .radio-label {
        padding: 8px 12px;
    }

    .progress-indicator {
        gap: 5px;
        flex-wrap: wrap;
    }

    .progress-step {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .progress-line {
        width: 20px;
        height: 2px;
    }
}

.request-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.request-popup-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.request-popup-header {
    margin-bottom: 30px;
    text-align: center;
}

.request-popup-header h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 10px;
}

.request-popup-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.close-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.request-form-group {
    margin-bottom: 25px;
}

.request-form-group label {
    display: block;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.request-form-group input,
.request-form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.request-form-group input:focus,
.request-form-group select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.request-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.request-form-group select option {
    background: #1a1a2e;
    color: white;
}

.request-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.request-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    cursor: pointer;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.request-radio-label:hover {
    background: rgba(255, 255, 255, 0.15);
}

.request-radio-label input[type="radio"] {
    width: auto;
    cursor: pointer;
}

.request-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

.request-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.request-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.request-submit-btn:active {
    transform: translateY(0);
}

.request-success {
    text-align: center;
    padding: 40px 20px;
}

.request-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.request-success h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.request-success p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.request-close-btn {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.request-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hidden {
    display: none !important;
}

/* Scrollbar styling for popup */
.request-popup-content::-webkit-scrollbar {
    width: 8px;
}

.request-popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.request-popup-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.request-popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Request Feed Section */
.requests-feed-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.requests-feed-header {
    text-align: center;
    margin-bottom: 50px;
}

.requests-feed-header h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.requests-feed-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.requests-feed-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.request-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.request-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    gap: 10px;
}

.request-subject {
    color: white;
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
}

.request-category-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.request-category-badge.ol {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.request-category-badge.al {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.request-details {
    margin-bottom: 20px;
}

.request-details p {
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0;
    font-size: 0.95rem;
}

.request-details strong {
    color: white;
}

.request-requester {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.request-actions {
    display: flex;
    gap: 10px;
}

.upvote-btn,
.donate-to-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.upvote-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.upvote-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.upvote-btn.voted {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
    cursor: not-allowed;
}

.donate-to-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.donate-to-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

/* Donate Popup */
#donate-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

#donate-popup.active {
    visibility: visible;
    opacity: 1;
}

.donate-popup-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.donate-popup-content h2 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 2rem;
}

.donate-popup-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.donate-popup-content input,
.donate-popup-content select,
.donate-popup-content textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.donate-popup-content input::placeholder,
.donate-popup-content textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.donate-popup-content select option {
    background: #1a1a2e;
    color: white;
}

.donate-popup-content input:focus,
.donate-popup-content select:focus,
.donate-popup-content textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.donate-popup-content button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.donate-popup-content button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.success-message {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.success-message.show {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {

    .request-popup-content,
    .donate-popup-content {
        padding: 30px 20px;
    }

    .request-popup-header h2 {
        font-size: 1.5rem;
    }

    .request-radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .requests-feed-container {
        grid-template-columns: 1fr;
    }
}

.feed-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.feed-header {
    text-align: center;
    margin-bottom: 3rem;
}

.feed-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feed-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ============================================
   SORTING SECTION STYLES
   ============================================ */

.sorting-section {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sorting-container {
    max-width: 100%;
}

.sorting-wrapper {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sort-group {
    flex: 1;
    min-width: 200px;
}

.sort-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.sort-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-white);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   FEED CONTAINER & DONATION CARDS
   ============================================ */

.feed-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.donation-card {
    background-color: rgba(255, 255, 255, 0.126);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgb(255, 255, 255);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.donation-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.donation-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.donation-tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(229, 37, 235, 0.451), rgba(255, 107, 129, 0.462));
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.donation-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.read-more {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.donor-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.donor-name small {
    font-weight: 600;
    color: var(--text-primary);
}

.donor-location,
.donor-phone {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.donor-location strong,
.donor-phone strong {
    color: var(--text-primary);
}

/* ============================================
   DONATION ACTIONS
   ============================================ */

.donation-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.like-btn,
.request-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: style 2px;;
    border-color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(229, 37, 235, 0), rgba(255, 107, 129, 0.462));

}

.like-btn {
    background-color: var(--accent-color);
    color: white;
}

.like-btn:hover {
    background-color: var(--accent-light);
    transform: scale(1.05);
}

.like-btn:active {
    transform: scale(0.98);
}

.request-btn {
    background-color: var(--primary-color);
    color: white;
}

.request-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.request-btn:active {
    transform: scale(0.98);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state p {
    font-size: 1.1rem;
}

/* ============================================
   REQUEST POPUP STYLES
   ============================================ */

#request-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* semi-transparent dark background */
    backdrop-filter: blur(5px); /* blur behind the popup */
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 1.5rem;
}

#request-popup.active {
    visibility: visible;
    opacity: 1;
}

.popup-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: popupFadeIn 0.3s ease;
}

.popup-content h2 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.popup-content input,
.popup-content select,
.popup-content textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.popup-content input:focus,
.popup-content select:focus,
.popup-content textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.popup-content textarea {
    resize: vertical;
    min-height: 100px;
}

.popup-content button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.popup-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.popup-content button:active {
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Success message */
.success-message {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-message.show {
    display: block;
    opacity: 1;
}

/* Animation */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Scrollbar styling */
.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   ACCESSIBILITY & UTILITIES
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
#request-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.452);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 1.5rem;
  overflow-y: auto;
}

#request-popup.active {
  visibility: visible;
  opacity: 1;
}

.popup-content {
   padding: 2.5rem;
  border-radius: 12px;
  max-width: 550px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;

  /* Background blur effect */
  background-color: rgba(0, 0, 0, 0.5); /* semi-transparent wheat */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* for Safari */
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

#requestForm {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-row .form-group {
  margin-bottom: 0;
}

.popup-content input,
.popup-content select,
.popup-content textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  margin-bottom: 0;
  border: 2px solid white;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-white);
  transition: all 0.3s ease;
}

.popup-content input::placeholder,
.popup-content select::placeholder,
.popup-content textarea::placeholder {
  color: var(--text-light);
}

.popup-content input:focus,
.popup-content select:focus,
.popup-content textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background-color: rgba(37, 99, 235, 0.02);
}

.popup-content textarea {
  resize: vertical;
  min-height: 110px;
  font-family: inherit;
}

.popup-content label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.popup-content button {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);;
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.popup-content button:active {
  transform: translateY(0);
}

.popup-content button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.close-popup {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  background: none;
  border: none;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
}

.close-popup:hover {
  color: var(--text-primary);
  background-color: var(--border-light);
}

/* ============================================
   SUCCESS MESSAGE - ENHANCED
   ============================================ */

.success-message {
  display: none;
  background: var(--success-bg);
  color: var(--success-text);
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
  opacity: 0;
  transition: all 0.5s ease-in-out;
  border: 2px solid var(--success-text);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-message.show {
  display: block;
  opacity: 1;
}

.success-message strong {
  color: var(--success-text);
}
