/* ==========================================================================
   1. GLOBAL RESET & VARIABLES
   ========================================================================== */
:root {
    --primary-color: #ea4335;      /* Crimson Red for Action Buttons */
    --primary-hover: #d33225;
    --navy-blue: #1976d2;          /* Custom Blue Gradient Start */
    --navy-light: #42a5f5;         /* Custom Blue Gradient Stop */
    --text-dark: #333333;
    --text-muted: #666666;
    --text-blue: #1a5c96;
    --bg-light: #ffffff;
    --bg-gray: #f8f9fa;
    --transition: all 0.3s ease;
    --container-width: 1240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ==========================================================================
   2. REUSABLE UTILITIES & LAYOUT STRUCTURING
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

.section {
    padding: 80px 0;
}
.section-light { background-color: var(--bg-light); }
.section-gray { background-color: var(--bg-gray); }

.subtitle {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

h1, h2, h3, h4 {
    color: #1d3557;
    margin-bottom: 15px;
    font-weight: 700;
}

p { 
    margin-bottom: 20px; 
    color: var(--text-muted); 
}

.section-desc { 
    max-width: 600px; 
    margin: 0 auto 50px auto; 
}

/* Global Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-size: 0.95rem;
}
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}
.btn-sm { 
    padding: 8px 18px; 
    font-size: 0.85rem; 
}
.btn-block { 
    width: 100%; 
    display: block; 
    text-align: center; 
}

/* ==========================================================================
   3. PRECISE HEADER & TOP BAR LAYOUT
   ========================================================================== */
.top-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
    padding: 14px 0;
    font-size: 0.82rem;
    color: #555;
}

.top-bar-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 60px;
    align-items: center;
}

.top-left strong {
    color: var(--text-blue);
    display: block;
}

.top-middle {
    text-align: left;
    line-height: 1.4;
}
.top-middle a {
    color: #555;
}

.top-right {
    text-align: left;
    line-height: 1.4;
}
.top-right strong {
    color: var(--text-blue);
    display: block;
}

.underline-link {
    text-decoration: underline;
    color: #666;
}
.underline-link:hover {
    color: var(--primary-color);
}

/* Header & Menu */
.main-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: #4a4a4a;
}
.drop-icon { 
    color: var(--primary-color); 
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}
.nav-menu a {
    font-size: 0.8rem;
    font-weight: 700;
    color: #333333;
    letter-spacing: 0.5px;
}
.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-donate {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 14px 28px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 2px;
    letter-spacing: 0.5px;
}
.btn-donate:hover {
    background-color: var(--primary-hover);
}

.social-icons {
    display: flex;
    gap: 8px;
}
.social-box {
    width: 32px;
    height: 32px;
    background-color: #1a73e8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 0.9rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #333;
}

/* ==========================================================================
   4. EXACT HERO SECTION GRADIENT LAYER
   ========================================================================== */
.hero-section {
    background: linear-gradient(100deg, var(--navy-blue) 0%, var(--navy-light) 50%, #90caf9 80%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-inner-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    min-height: 520px;
}

.hero-content {
    color: #ffffff;
    padding: 40px 0;
    z-index: 2;
}

.hero-tagline {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0.9;
    display: block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 25px;
    color: #ffffff;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 35px;
    opacity: 0.95;
    color: #ffffff;
}

.hero-action-row {
    display: flex;
    gap: 15px;
}

.btn-action-red {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 16px 32px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 2px;
    letter-spacing: 0.5px;
}
.btn-action-red:hover {
    background-color: var(--primary-hover);
}

.btn-action-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 14px 32px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 2px;
    letter-spacing: 0.5px;
}
.btn-action-outline:hover {
    background-color: #ffffff;
    color: var(--navy-blue);
}

.hero-graphic-mask {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.mask-img {
    max-height: 520px;
    width: auto;
    object-fit: contain;
}

/* ==========================================================================
   5. TWO-COLUMN SPLIT GRID LAYOUTS
   ========================================================================== */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.split-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
}
.split-text h2 {
    font-size: 2.2rem;
    line-height: 1.3;
}

/* ==========================================================================
   6. WAYS TO SUPPORT - THREE-COLUMN CARDS
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    transition: var(--transition);
}
.card:hover { 
    transform: translateY(-5px); 
}
.card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 0;
}
.card-content { 
    padding: 25px; 
    text-align: left; 
}
.card-content h3 { 
    font-size: 1.3rem; 
}

/* ==========================================================================
   7. QUICK LINKS ROW LAYOUT
   ========================================================================== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.ql-item {
    height: 260px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}
.ql-content h3 { 
    color: #fff; 
    margin-bottom: 15px; 
    font-size: 1.5rem;
}

/* ==========================================================================
   8. COMPACT REGISTRATION FORM COMPONENT
   ========================================================================== */
.reg-form {
    background: #fff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.form-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.form-meta i { 
    color: var(--primary-color); 
}
.reg-form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

/* ==========================================================================
   9. TESTIMONIALS QUAD GRID
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
.testimonial {
    background: #fff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.01);
    position: relative;
}
.quote-icon {
    color: rgba(234, 67, 53, 0.12);
    font-size: 2.5rem;
    position: absolute;
    top: 15px;
    right: 20px;
}
.testimonial p { 
    font-style: italic; 
    margin-bottom: 10px; 
}
.testimonial h4 { 
    margin-bottom: 0; 
    font-size: 1rem; 
    color: var(--primary-color); 
}

/* ==========================================================================
   10. CTA PARALLAX BANNER
   ========================================================================== */
.cta-banner {
    background: linear-gradient(rgba(29, 53, 87, 0.92), rgba(29, 53, 87, 0.92)), url('/images/photo-1519494026892-80bbd2d6fd0d.jpg') center/cover fixed;
    color: #fff;
    padding: 70px 0;
    text-align: center;
}
.cta-content h2 { 
    color: #fff; 
    font-size: 2.3rem; 
}
.cta-content p { 
    color: rgba(255,255,255,0.8); 
}

/* ==========================================================================
   11. DARK MODULAR FOOTER GRID
   ========================================================================== */
footer {
    background-color: #111111;
    color: #b0b0b0;
    padding: 70px 0 25px 0;
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.7fr 1.3fr;
    gap: 40px;
    margin-bottom: 40px;
}
footer h3, footer h4 { color: #fff; }
footer h4 { 
    margin-bottom: 22px; 
    font-size: 1.1rem; 
}
footer ul { 
    list-style: none; 
}
footer ul li { 
    margin-bottom: 12px; 
}
footer ul li a:hover { 
    color: var(--primary-color); 
}
footer p i { 
    color: var(--primary-color); 
    margin-right: 8px; 
}
.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 25px;
    font-size: 0.8rem;
}

/* ==========================================================================
   12. RESPONSIVE BREAKPOINTS (100% MOBILE RESPONSIVE)
   ========================================================================== */
@media (max-width: 1150px) {
    .nav-menu { gap: 15px; }
    .hero-title { font-size: 2.6rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 992px) {
    .top-bar-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    .top-middle, .top-right { text-align: center; }

    .mobile-toggle { display: block; }
    .nav-actions, .nav-menu { display: none; }

    /* Sliding Drawer Activation rules */
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        padding: 25px;
        box-shadow: 0 15px 25px rgba(0,0,0,0.08);
        z-index: 100;
        gap: 15px;
    }

    .hero-inner-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 30px;
    }
    .hero-title { font-size: 2.3rem; }
    .hero-action-row { justify-content: center; }
    .hero-graphic-mask { justify-content: center; margin-top: 30px; }
    .mask-img { max-height: 380px; }

    .split-grid, .cards-grid, .quick-links, .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .image-left { order: -1; }
    .split-image img { height: 340px; }
}

@media (max-width: 576px) {
    .top-bar { display: none; } /* Drop redundant mobile items */
    .hero-title { font-size: 1.9rem; }
    .hero-action-row { flex-direction: column; gap: 12px; }
    .hero-action-row .btn { width: 100%; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 50px 0; }
}


/* ==========================================================================
   BLOOD DONATION DASHBOARD STYLES
   Matches Laravel Blade Template Elements with Global Design System
   ========================================================================== */

/* Component Root Scope */
.blood-app {
    margin-bottom: 30px;
}

/* 1. GRID LAYER & SPACING UTILITIES */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 15px !important; }
.mb-4 { margin-bottom: 30px !important; }

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

/* 2. WELCOME BANNER COMPONENT */
.bg-danger {
    background-color: var(--primary-color) !important;
}

.text-white {
    color: #ffffff !important;
}

.p-4 {
    padding: 30px !important;
}

.rounded {
    border-radius: 6px !important;
}

.shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04) !important;
}

/* 3. CARD & TEXT WRAPPERS */
.card {
    background: var(--bg-light);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    word-wrap: break-word;
}

.border-0 {
    border: none !important;
}

.h-100 {
    height: 100% !important;
}

.card-header {
    padding: 18px 25px;
    margin-bottom: 0;
    border-bottom: none;
}

.card-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.card-body {
    flex: 1 1 auto;
    padding: 25px;
}

/* Card State Colors */
.bg-primary {
    background-color: var(--navy-blue) !important;
}

.bg-success {
    background-color: #2e7d32 !important; /* Rich Green */
}

.bg-dark {
    background-color: #111111 !important;
}

/* Text Alerts */
.text-success { color: #2e7d32 !important; }
.text-warning { color: #f57c00 !important; } /* Amber Orange */
.text-danger { color: var(--primary-color) !important; }

/* 4. DASHBOARD INTERACTION ELEMENT BUTTONS */
.w-100 {
    width: 100% !important;
}

/* Reusing & extending button utilities safely */
.card-body .btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card-body .btn-danger {
    background-color: var(--primary-color);
    color: #ffffff;
}
.card-body .btn-danger:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.card-body .btn-primary {
    background-color: var(--navy-blue);
    color: #ffffff;
}
.card-body .btn-primary:hover {
    background-color: var(--navy-light);
    transform: translateY(-2px);
}

.card-body .btn-dark {
    background-color: #222222;
    color: #ffffff;
}
.card-body .btn-dark:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

/* 5. HISTORY DATA TABLE COMPONENT */
.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-dark);
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-top: 1px solid #eaeaea;
    text-align: left;
    font-size: 0.9rem;
}

.table-bordered th, .table-bordered td {
    border: 1px solid #eaeaea;
}

.table-danger {
    background-color: #fff5f5;
}

.table-danger th {
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid #fed7d7;
}

/* 6. RESPONSIVE LAYER ADAPTATION */
@media (max-width: 992px) {
    .col-md-4, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   BLOOD DONATION - SEARCH PAGE COMPONENT STYLES
   Binds Laravel Blade Search Form & Result Structures to the Core CSS Layout
   ========================================================================== */

/* 1. CONTAINER SPACING & LAYOUT WRAPPERS */
.py-5 {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
}

.mt-4 {
    margin-top: 24px !important;
}

.justify-content-center {
    display: flex;
    justify-content: center;
}

.col-md-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding: 0 15px;
}

/* 2. FORM INTEGRATION LAYOUT */
.form-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Control Element Restructuring */
.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 40px;
}

.form-control:focus {
    border-color: var(--navy-light);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

/* Column Utilities specific to query rows */
.col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
    padding: 0 15px;
}

.col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    padding: 0 15px;
}

/* Form Action Grid Control */
.d-grid {
    display: grid !important;
}

.d-grid .btn {
    width: 100%;
}

/* 3. TABLE LAYER & RESULT STRIPING */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg-gray);
}

.table-striped tbody tr:hover {
    background-color: rgba(234, 67, 53, 0.03);
}

/* 4. ERROR & NO RESULT ALERT CONTAINER */
.alert {
    position: relative;
    padding: 16px 20px;
    margin-bottom: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert-danger {
    color: #c53030;
    background-color: #fff5f5;
    border-color: #fed7d7;
}

/* 5. RESPONSIVE BREAKPOINT SYSTEM */
@media (max-width: 768px) {
    .col-md-10, .col-md-5, .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .justify-content-center {
        display: block;
    }
    
    .d-grid .btn {
        padding: 14px;
        margin-top: 5px;
    }
}


/* ==========================================================================
   BLOOD DONATION - TRANSACTION FORM COMPONENT STYLES
   Binds Laravel Blade Input Fields, Readonly Elements, & System Messaging
   ========================================================================== */

/* 1. STRUCTURAL COLUMN MODIFIERS */
.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

/* 2. ADVANCED CONTROL ELEMENTS & TEXTAREAS */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Readonly Lock State styling */
.form-control[readonly] {
    background-color: var(--bg-gray);
    color: var(--text-muted);
    border-color: #eaeaea;
    cursor: not-allowed;
    box-shadow: none;
}
.form-control[readonly]:focus {
    border-color: #eaeaea;
    box-shadow: none;
}

/* 3. APP-WIDE SYSTEM VALIDATION MESSAGING */
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Overriding global base list margins inside alerts */
.alert ul {
    list-style-position: inside;
    padding-left: 0;
}

.alert ul li {
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.alert ul li:last-child {
    margin-bottom: 0;
}

/* 4. TRANSACTION ACTION INTERACTION */
form .btn-danger {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.15);
    transition: var(--transition);
}

form .btn-danger:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(234, 67, 53, 0.25);
}

form .btn-danger:active {
    transform: translateY(0);
}

/* 5. SMOOTH MOBILE VIEWPORT CONVERSION */
@media (max-width: 768px) {
    .col-md-8, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    form .btn-danger {
        width: 100%;
        text-align: center;
        padding: 16px;
    }
}

