/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #DC2626;
    --dark-red: #991B1B;
    --light-red: #FEE2E2;
    --accent-red: #EF4444;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-gray: #F3F4F6;
    --bg-dark: #1F2937;
    --border-gray: #E5E7EB;
    --success-green: #10B981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: var(--shadow);
}

.navbar {
    padding: 1.25rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-red);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-red);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 50%, #FEE2E2 100%);
    padding: 140px 0 100px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.75rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-text h1 span {
    color: var(--primary-red);
}

.hero-text p {
    font-size: 1.35rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn-secondary:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.stat-card h3 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-card p {
    font-size: 1.15rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Section Styling */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.3rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Form Sections */
.donate-section {
    background: var(--bg-gray);
}

.request-section {
    background: var(--bg-white);
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-gray);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 1.15rem;
    margin-top: 1rem;
}

/* Requests Section */
.requests-section {
    background: var(--bg-gray);
}

.filter-bar {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.filter-bar select,
.filter-bar input {
    padding: 14px 18px;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    font-size: 1rem;
    flex: 1;
    min-width: 220px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.request-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary-red);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.request-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.request-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-left-width: 8px;
}

.request-card .blood-group {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.request-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.request-card p {
    color: var(--text-gray);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.request-card .urgent {
    color: var(--primary-red);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.request-card .urgent::before {
    content: '⚠';
    font-size: 1.2rem;
}

.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-gray);
    font-size: 1.3rem;
    font-weight: 600;
}

/* About Section */
.about-section {
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-gray) 100%);
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 2px solid var(--border-gray);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.feature-card:hover::before {
    transform: scale(1);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-red);
}

.feature-icon {
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-white) 100%);
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

.contact-item {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-red);
}

.contact-item h3 {
    color: var(--primary-red);
    margin-bottom: 1.25rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.contact-item p {
    color: var(--text-gray);
    font-size: 1.15rem;
    font-weight: 600;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #111827 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 800;
}

footer p {
    font-size: 1.05rem;
    opacity: 0.8;
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 20px 28px;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    transform: translateX(500px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 380px;
    border-left: 5px solid;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--success-green);
}

.notification.error {
    border-left-color: var(--primary-red);
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-content {
        gap: 60px;
    }
    
    .hero-image svg {
        width: 320px;
        height: 320px;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-white);
        padding: 2rem;
        box-shadow: var(--shadow-xl);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        gap: 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        margin-bottom: 1.5rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }
    
    .hero {
        padding: 100px 0 80px;
        margin-top: 70px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image svg {
        width: 280px;
        height: 280px;
    }
    
    section {
        padding: 80px 0;
    }
    
    .stats {
        padding: 60px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2.25rem;
    }
    
    .section-header p {
        font-size: 1.15rem;
    }
    
    .form-container {
        padding: 35px 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .requests-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .notification {
        right: 15px;
        left: 15px;
        max-width: calc(100% - 30px);
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-text p {
        font-size: 1.05rem;
    }
    
    .hero-image svg {
        width: 240px;
        height: 240px;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }

    .stat-card p {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .btn {
        padding: 14px 30px;
        width: 100%;
        font-size: 1rem;
    }
    
    .form-container {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .section-header h2 {
        font-size: 1.9rem;
    }

    .section-header p {
        font-size: 1.05rem;
    }

    .request-card {
        padding: 25px;
    }

    .request-card .blood-group {
        font-size: 1.3rem;
        padding: 8px 16px;
    }

    .feature-card {
        padding: 30px 25px;
    }

    .contact-item {
        padding: 30px 25px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-card,
.request-card,
.contact-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stat-card {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Print Styles */
@media print {
    header,
    footer,
    .hero-buttons,
    .mobile-menu-btn,
    .notification {
        display: none;
    }
    
    .hero {
        margin-top: 0;
    }
    
    section {
        padding: 40px 0;
        page-break-inside: avoid;
    }
}