/* =========================================
   1. GLOBAL STYLES & RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F5F3E9; /* Cream Background */
    color: #222;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 40px;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-family: 'Merriweather', serif;
    font-size: 28px;
    font-weight: 700;
    color: #222;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin-right: 20px;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #222;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.btn-hosting {
    text-decoration: none;
    background-color: #E6E6E6;
    color: #222;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-hosting:hover {
    background-color: #d4d4d4;
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
    margin-top: 40px;
}

.toggle-buttons {
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 12px 24px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.toggle-btn.active {
    background-color: #222;
    color: #fff;
}

.toggle-btn:not(.active) {
    background-color: transparent;
    border: 1px solid #222;
    color: #222;
}

h1 {
    font-family: 'Merriweather', serif;
    font-size: 64px;
    line-height: 1.1;
    max-width: 800px;
    color: #1F2933;
    margin-bottom: 40px;
}

/* =========================================
   4. SEARCH BAR
   ========================================= */
.search-container {
    margin-bottom: 60px;
}

.search-bar {
    background-color: #fff;
    border-radius: 50px;
    padding: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.search-item {
    flex: 1;
    padding: 10px 20px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-item.no-border {
    border-right: none;
}

.search-item label {
    font-size: 12px;
    color: #777;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.search-item input {
    border: none;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    color: #222;
    width: 100%;
    outline: none;
}

.search-btn-container {
    padding: 5px;
}

.search-btn {
    background-color: #0e1317;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #333;
}

/* =========================================
   5. FEATURED CARDS
   ========================================= */
.featured-cards {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    flex: 1;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 -150px 150px -50px rgba(0,0,0,0.6); 
}

/* Replace with your own images */
.card-left {
    background-image: url('https://placehold.co/600x400/333/999?text=AI+Report');
}

.card-right {
    background-image: url('https://placehold.co/600x400/555/aaa?text=Prescriptions');
}
.card-right2 {
    background-image: url('https://placehold.co/600x400/777/ccc?text=Reports');
}

.card-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: #fff;
}

.card-content h2 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.btn-white {
    text-decoration: none;
    background-color: #fff;
    color: #222;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-white:hover {
    background-color: #f0f0f0;
}

/* =========================================
   6. DONOR LIST SECTION (For blood.html usage)
   ========================================= */
.donor-list-section {
    max-width: 800px;
    margin: 0 auto;
    display: none;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.donor-card {
    background-color: transparent;
    border: 1px solid #222;
    border-radius: 50px;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.donor-card:hover {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.donor-info h3 {
    font-family: 'Merriweather', serif;
    font-size: 20px;
    color: #222;
    margin-bottom: 5px;
}

.donor-info p {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.btn-contact {
    background-color: transparent;
    border: 1px solid #222;
    color: #222;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-contact:hover {
    background-color: #222;
    color: #fff;
}

/* =========================================
   7. SIDEBAR PROFILE STYLES (RIGHT SIDE)
   ========================================= */

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Sidebar */
.profile-sidebar {
    position: fixed;
    top: 0;
    right: -350px; /* Hidden on Right */
    width: 320px;
    height: 100%;
    background: #F5F3E9; /* Cream Background */
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

.profile-sidebar.active {
    right: 0; /* Slides In */
}

/* Close Button */
.close-sidebar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.05);
    border: none;
    color: #222;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.close-sidebar:hover {
    background: rgba(0,0,0,0.1);
}

/* Sidebar Content */
.sidebar-content {
    padding-bottom: 20px;
}

.profile-header {
    text-align: center;
    padding: 0 15px;
    margin-top: 50px; /* Space from top since cover is removed */
}

.profile-img-box {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 15px;
}

.profile-img-box img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #fff; /* White border to pop */
    object-fit: cover;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #2ecc71;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.profile-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 22px;
    color: #222;
    margin-bottom: 5px;
}

.user-role {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    background-color: #fff; /* White badge */
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.location {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
}

.btn-edit {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #222;
    background-color: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #222;
}

.btn-edit:hover {
    background-color: #222;
    color: #fff;
}

/* Stats Grid - White box on Cream bg */
.stats-grid {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-radius: 15px;
    margin: 25px 15px; 
    background-color: #fff; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.stat-box {
    text-align: center;
    flex: 1;
}

.border-sides {
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #777;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #222;
    font-family: 'Merriweather', serif;
}

.text-red { color: #d32f2f; }

/* Menu Items */
.profile-menu {
    padding: 10px 15px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
    text-decoration: none;
    color: #444;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: background 0.2s, padding-left 0.2s;
    margin-bottom: 5px;
}

.menu-item:hover {
    background-color: #fff; /* White on Hover */
    padding-left: 20px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-left {
    display: flex;
    align-items: center;
}

.menu-item .icon {
    margin-right: 15px;
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: #555;
}


/* --- Edit Profile Modal CSS --- */
.modal-overlay {
    display: none; /* শুরুতে লুকানো */
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5); /* কালো আবছা ব্যাকগ্রাউন্ড */
    z-index: 10000; /* সবার উপরে */
    justify-content: center; 
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}





/* --- Mobile Responsive Rules --- */
@media only screen and (max-width: 768px) {
    
    /* ১. পুরো বডি এবং কন্টেইনারের প্যাডিং ঠিক করা */
    .container {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ২. কার্ডগুলো পাশাপাশি না রেখে নিচে নিচে সাজানো */
    .featured-cards {
        display: flex;
        flex-direction: column; /* Column মানে নিচে নিচে */
        gap: 20px;
    }

    /* ৩. কার্ডের সাইজ মোবাইলের স্ক্রিন অনুযায়ী করা */
    .card, .card-left, .card-right, .card-right2 {
        width: 100% !important;
        max-width: 100%;
        margin-bottom: 15px;
    }

    /* ৪. সার্চ বার ঠিক করা */
    .search-bar {
        width: 100%;
        flex-direction: row; /* সার্চ বক্স আর বাটন পাশাপাশি থাকবে */
        padding: 5px 15px;
    }

    .search-item input {
        width: 100%;
        font-size: 14px;
    }

    /* ৫. সাইডবার (প্রোফাইল) মোবাইলে সুন্দর দেখানো */
    .profile-sidebar {
        width: 85%; /* মোবাইলে একটু চওড়া হবে */
        max-width: 300px;
    }

    /* ৬. ফন্ট সাইজ একটু ছোট করা যাতে ভেঙে না যায় */
    h1 { font-size: 24px; }
    h2 { font-size: 18px; }
    p { font-size: 14px; }
}


@media only screen and (max-width: 768px) {
    
    /* আগের কোডগুলো এখানে থাকবে... */

    /* নতুন বা আপডেট করা অংশ */
    body, html {
        overflow-x: hidden; /* ডানে-বামে স্ক্রল বন্ধ */
        overflow-y: auto;   /* উপরে-নিচে স্ক্রল চালু */
        height: auto !important;
    }

    main {
        height: auto !important; /* হাইট ফিক্সড থাকলে মুছে ফেলবে */
        padding-bottom: 50px;    /* নিচে একটু জায়গা রাখবে */
        overflow: visible !important; /* কন্টেন্ট যেন লুকিয়ে না যায় */
    }

    .featured-cards {
        display: flex;
        flex-direction: column;
        gap: 20px;
        height: auto !important; /* কার্ডের কন্টেইনারের হাইট অটো করা */
        margin-top: 20px;
    }

    .card, .card-left, .card-right, .card-right2 {
        width: 100% !important;
        height: auto !important; /* কার্ডের হাইট অটো */
        min-height: 150px;       /* অন্তত ১৫০ পিক্সেল দেখাবেই */
        display: block !important; /* অবশ্যই দেখাবে */
        opacity: 1 !important;     /* ট্রান্সপারেন্ট হবে না */
        visibility: visible !important;
    }
}


/* --- Apple Music Style Premium Cards CSS --- */
.premium-cards-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 35px;
}

.apple-card {
    display: flex;
    background-color: #111111; /* ডার্ক ব্যাকগ্রাউন্ড */
    border-radius: 16px;
    padding: 15px;
    gap: 25px;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apple-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ac-image-box {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    overflow: hidden;
    /* তোমার দেওয়া ছবির মতো ব্ল্যাক অ্যান্ড হোয়াইট ফিল্টার */
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

/* মাউস নিলে ছবিতে কালার ফিরে আসবে */
.apple-card:hover .ac-image-box {
    filter: grayscale(0%); 
}

.ac-img-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.ac-small-logo {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    align-self: flex-end;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ac-img-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: -0.5px;
}

.ac-content-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    position: relative;
    padding: 10px 0;
}

.ac-top-right-logo {
    position: absolute;
    top: 5px;
    right: 15px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.5px;
}

.ac-main-title {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
    max-width: 90%;
    letter-spacing: -0.5px;
}

.ac-btn {
    background-color: #fff;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    align-self: flex-end;
    position: absolute;
    bottom: 5px;
    right: 15px;
    transition: background 0.3s, transform 0.2s;
}

.ac-btn:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}

/* মোবাইলের জন্য রেস্পন্সিভ ডিজাইন */
@media (max-width: 600px) {
    .apple-card {
        flex-direction: column;
        padding: 12px;
        gap: 15px;
    }
    .ac-image-box {
        width: 100%;
        height: 250px;
    }
    .ac-content-box {
        padding: 15px 5px;
        min-height: 120px;
    }
    .ac-main-title {
        font-size: 20px;
        margin-bottom: 50px;
        max-width: 100%;
    }
    .ac-top-right-logo {
        display: none; /* মোবাইলে জায়গা বাঁচানোর জন্য লুকানো হলো */
    }
}