/* Global Styles */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #c0392b;
    --gray-color: #95a5a6;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--danger-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.btn-service {
    display: inline-block;
    padding: 8px 20px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-service:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Preloader Animation */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.blood-drop {
    position: relative;
    width: 100px;
    height: 100px;
}

.drop {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    animation: drip 2s infinite;
    left: 25px;
    top: 0;
}

.waves {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.waves div {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: wave 1.5s infinite ease-in-out;
}

.waves div:nth-child(2) {
    animation-delay: 0.2s;
}

.waves div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes drip {
    0% {
        transform: rotate(-45deg) translateY(0);
        opacity: 1;
    }
    70% {
        transform: rotate(-45deg) translateY(20px);
        opacity: 1;
    }
    100% {
        transform: rotate(-45deg) translateY(40px);
        opacity: 0;
    }
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(0.5);
    }
    50% {
        transform: scaleY(1);
    }
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    background-color: #fff;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

nav ul {
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.btn-login {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
}

.btn-login:hover {
    background-color: var(--danger-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero-content h1 span {
    color: var(--primary-color);
    display: block;
}

.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.7s;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.9s;
}

.hero-image {
    flex: 1;
    text-align: right;
    opacity: 0;
    transform: translateX(20px);
    animation: fadeInRight 1s forwards 1.1s;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

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

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.blood-stats {
    background-color: #fff;
    padding: 30px 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 50px;
}

.blood-stats .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--gray-color);
}

/* About Section */
.about {
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.02);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray-color);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: center;
}

.feature i {
    color: var(--success-color);
    font-size: 1.2rem;
    margin-right: 10px;
}

/* Services Section */
.services {
    background-color: #f9f9f9;
}

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

.service-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

/* Donation Process Section */
.donation-process {
    background-color: #fff;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
    padding: 30px 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.step p {
    color: var(--gray-color);
}

/* Blood Availability Section */
.blood-availability {
    background-color: #f9f9f9;
}

.blood-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.blood-type {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.blood-type:hover {
    transform: translateY(-5px);
}

.blood-group {
    padding: 20px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.a-positive, .a-negative {
    background-color: #e74c3c;
}

.b-positive, .b-negative {
    background-color: #3498db;
}

.ab-positive, .ab-negative {
    background-color: #9b59b6;
}

.o-positive, .o-negative {
    background-color: #2ecc71;
}

.availability {
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.high {
    color: var(--success-color);
}

.medium {
    color: var(--warning-color);
}

.low {
    color: var(--primary-color);
}

.critical {
    color: var(--danger-color);
}

.blood-request {
    text-align: center;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.blood-request h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.blood-request p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

/* Testimonials Section */
.testimonials {
    background-color: #fff;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
}

.testimonial-slide:first-child {
    display: block;
}

.testimonial-content {
    display: flex;
    align-items: center;
    gap: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.testimonial-image {
    flex: 0 0 120px;
}

.testimonial-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: var(--box-shadow);
}

.testimonial-text {
    flex: 1;
}

.testimonial-text p {
    font-style: italic;
    color: var(--gray-color);
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text p::before,
.testimonial-text p::after {
    content: '"';
    font-size: 1.5rem;
    color: var(--primary-color);
}

.testimonial-author h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--gray-color);
    margin-bottom: 0;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
}

.prev-btn, .next-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid var(--gray-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Contact Section */
.contact {
    background-color: #f9f9f9;
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-item p {
    color: var(--gray-color);
    margin-bottom: 5px;
}

.social-media h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark-color);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    text-align: center;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    height: 150px;
    resize: none;
}

/* Footer Section */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 70px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 50px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo img {
    width: 50px;
    margin-bottom: 15px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #fff;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    flex: 1;
    min-width: 150px;
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-newsletter {
    flex: 1;
    min-width: 250px;
}

.footer-newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
}

.footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.footer-newsletter form {
    display: flex;
}

.footer-newsletter input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-family: 'Poppins', sans-serif;
}

.footer-newsletter button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.footer-newsletter button:hover {
    background-color: var(--danger-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 20px;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--box-shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--danger-color);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image,
    .about-text,
    .contact-info,
    .contact-form {
        flex: auto;
        width: 100%;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 768px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        text-align: center;
        margin-bottom: 50px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .process-steps {
        flex-direction: column;
    }
    
    .step {
        width: 100%;
    }
    
    .testimonial-content {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-image {
        margin-bottom: 20px;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 20px 0;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

@media screen and (max-width: 576px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .blood-stats .container {
        flex-direction: column;
    }
    
    .stat-item {
        margin-bottom: 20px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-content > div {
        flex: 100%;
        margin-bottom: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        margin-top: 15px;
    }
    
    .footer-bottom-links a {
        margin: 0 10px;
    }
}