:root {
    --primary: #b22222;
    --primary-dark: #8b0000;
    --secondary: #343a40;
    --white: #ffffff;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --primary-light: #ff6659;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --black: #212121;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
}

.bengali-text {
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Header styles */
.main-header {
    background-color: var(--white);
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-header .navbar {
    padding: 0.5rem 0;
}

.main-header .navbar-brand {
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

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

.logo-image img {
    height: 60px;
    width: auto;
}

.logo-text {
    line-height: 1.3;
}

.logo-text div:first-child {
    font-size: 16px;
    margin-bottom: 2px;
}

.logo-text div:last-child {
    font-size: 14px;
}

@media (max-width: 576px) {
    .logo-image img {
        height: 40px;
    }
    
    .logo-text {
        line-height: 1.2;
    }
    
    .logo-text div:first-child {
        font-size: 12px;
        margin-bottom: 0;
    }
    
    .logo-text div:last-child {
        font-size: 10px;
    }
}

/* Ensure the navbar is properly positioned on mobile */
@media (max-width: 992px) {
    .main-header .navbar-collapse {
        margin-top: 10px;
    }
    
    .navbar-nav {
        margin-bottom: 10px;
    }
}

.main-header .nav-link {
    color: var(--dark-gray) !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.main-header .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.main-header .nav-link.active {
    color: var(--primary) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
}

.auth-buttons .btn {
    border-radius: 4px;
    padding: 0.375rem 1rem;
    font-weight: 500;
}

.btn-login {
    background-color: var(--primary);
    color: var(--white);
    border: none;
}

.btn-register {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-register:hover {
    background-color: rgba(198, 40, 40, 0.1);
    color: var(--primary);
}

/* Notice bar */
.notice-bar {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Footer styles */
.footer {
    background-color: #1a1a2e;
    color: var(--white);
    padding: 3rem 0 0;
}

.footer-title {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary);
}

.copyright {
    background-color: #151525;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Section title */
.section-title {
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    text-transform: uppercase;
}

/* Donor summary cards */
.donor-summary-card {
    color: white;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
}

.donor-summary-card.total {
    background-color: #ef5350;
}

.donor-summary-card.available {
    background-color: #66bb6a;
}

.donor-summary-card.donations {
    background-color: #42a5f5;
}

/* Blood cell background */
.blood-cell-bg {
    background-image: url('../images/blood-cells-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.blood-cell-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 25px;
    bottom: -50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    z-index: 999;
}

.back-to-top.show {
    bottom: 25px;
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 400px;
    overflow: hidden;
    background-color: #fce7e6;
}

.hero-swiper {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

.hero-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #b0acac;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.hero-box {
    max-width: 500px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-box h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.hero-box p {
    font-size: 1.2rem;
    margin-bottom: 0;
    color: var(--dark-gray);
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.hero-swiper .swiper-button-prev:after,
.hero-swiper .swiper-button-next:after {
    font-size: 18px;
}

.hero-swiper .swiper-pagination {
    bottom: 20px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: white;
    opacity: 1;
}

/* Search Section */
.search-section {
    background-color: #a51c1c;
    padding: 2rem 0;
    position: relative;
    z-index: 10;
}

.search-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px 15px 15px 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.search-row .form-control,
.search-row .form-select {
    flex: 1;
    min-width: 150px;
    height: 45px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0 15px;
    background-color: white;
}

.search-button-container {
    text-align: center;
}

.btn-search {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 30px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    width: auto;
}

.btn-search:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* Donor Summary Section */
.donor-summary-section {
    background-color: var(--light);
    padding: 70px 0 50px;
}

.donation-message {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(178, 34, 34, 0.1);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 500;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background: linear-gradient(to right, rgba(178, 34, 34, 0.9), rgba(139, 0, 0, 0.9)), url('../images/testimonial-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
}

.testimonials-section .section-title {
    color: var(--white);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    margin: 20px 10px;
    backdrop-filter: blur(5px);
}

.testimonial-content {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author .author-image img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.testimonial-author .author-info h4 {
    font-weight: 600;
    font-size: 1.1rem;
}

.testimonial-swiper .swiper-button-prev,
.testimonial-swiper .swiper-button-next {
    color: var(--white);
}

.testimonial-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.testimonial-swiper .swiper-pagination-bullet-active {
    background: var(--white);
}

/* Sponsors Section */
.sponsors-section {
    padding: 70px 0;
    background-color: var(--white);
}

.sponsor-card {
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.sponsor-logo img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.sponsor-card:hover .sponsor-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.sponsor-name {
    margin-top: 15px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray);
}

.sponsors-swiper .swiper-button-prev,
.sponsors-swiper .swiper-button-next {
    color: var(--primary);
    background: rgba(178, 34, 34, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sponsors-swiper .swiper-button-prev:after,
.sponsors-swiper .swiper-button-next:after {
    font-size: 18px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/contact-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.contact-section .section-title {
    color: var(--white);
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    padding: 12px 15px;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.3);
    background: rgba(255, 255, 255, 0.3);
}

.btn-send {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    transition: all 0.3s;
}

.btn-send:hover {
    background-color: var(--primary-dark);
}

.btn-map {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    transition: all 0.3s;
}

.btn-map:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: 450px;
    }
    
    .hero-box h2 {
        font-size: 1.8rem;
    }
    
    .hero-box p {
        font-size: 1rem;
    }
    
    .search-section {
        margin-top: -30px;
    }
    
    .search-container {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-box {
        padding: 1.5rem;
    }
    
    .hero-box h2 {
        font-size: 1.5rem;
    }
    
    .search-section {
        margin-top: -20px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
}

/* Sidebar Toggle Functionality */
.sidebar-toggler {
    position: relative;
    z-index: 99;
    display: block;
}

.sidebar-toggler .btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: white;
}

.sidebar-toggler .btn:hover {
    background-color: #f8f9fa;
}

/* Collapsed sidebar styles */
.sidebar-collapsed .sidebar {
    margin-left: -16.666667%;
    transform: translateX(-100%);
}

.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

.sidebar {
    transition: all 0.3s ease;
    width: 16.666667%;
}

.main-content {
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 1000;
        margin-left: 0;
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggler {
        display: block;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
}
