/* ============================================================
   BloodBridge — Homepage Styles (Redesigned)
   Matches the reference UI exactly.
   ============================================================ */

/* ── Hero Section ── */
.hero {
    position: relative;
    min-height: 520px;
    background: linear-gradient(160deg, #1B2A4A 0%, #1B2A4A 40%, #7B1A1A 70%, #96281B 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Red-tinted cityscape silhouette at the bottom of hero */
.hero-cityscape {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    z-index: 2;
}

.hero-cityscape svg {
    width: 100%;
    height: 100%;
}

/* Particles */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.hero-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.03; }
    50% { transform: translateY(-18px) scale(1.2); opacity: 0.07; }
}

/* ── Hero Navbar ── */
.hero-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    position: relative;
    z-index: 10;
}

.hero-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-logo-icon {
    width: 32px;
    height: 32px;
    color: var(--red-primary);
}

.hero-logo-icon svg { width: 100%; height: 100%; }

.hero-logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
}

.hero-logo-text span {
    color: var(--white);
}

.btn-get-started {
    background: var(--red-primary);
    color: var(--white);
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 250ms var(--ease-out);
    border: none;
    cursor: pointer;
}

.btn-get-started:hover {
    background: #a93226;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192,57,43,0.35);
}

/* ── Hero Content ── */
.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px 80px;
    position: relative;
    z-index: 5;
    gap: 40px;
}

.hero-text {
    max-width: 520px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.12;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    color: rgba(255,255,255,0.65);
    font-size: 16px;
    line-height: 1.7;
    max-width: 400px;
}

/* ── Hero Blood Drop Illustration ── */
.hero-illustration {
    position: relative;
    width: 280px;
    height: 320px;
    flex-shrink: 0;
}

.hero-blood-drop {
    width: 240px;
    height: 280px;
    position: relative;
    animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.hero-blood-drop svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 12px 40px rgba(192,57,43,0.45));
}

.hero-ekg-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 60px;
    z-index: 2;
}

.hero-ekg-line svg {
    width: 100%;
    height: 100%;
}

/* ============================================================
   Join Our Network Section
   ============================================================ */
.network-section {
    padding: 80px 48px;
    background: var(--white);
    text-align: center;
}

.network-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.network-title .emoji {
    font-size: 30px;
}

.network-subtitle {
    color: var(--grey-600);
    font-size: 16px;
    margin-bottom: 48px;
}

/* ── Role Cards ── */
.role-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.role-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: 16px;
    padding: 40px 28px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 300ms var(--ease-bounce);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.role-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 200ms var(--ease-out);
}

.role-card.donor-card::after { background: var(--red-primary); }
.role-card.hospital-card::after { background: var(--navy); }
.role-card.bank-card::after { background: var(--teal-primary); }

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.role-card:hover::after {
    transform: scaleY(1);
}

.role-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.donor-card .role-card-icon { background: rgba(192,57,43,0.1); }
.hospital-card .role-card-icon { background: rgba(27,42,74,0.08); }
.bank-card .role-card-icon { background: rgba(26,122,138,0.1); }

.role-card-icon svg {
    width: 32px;
    height: 32px;
}

.donor-card .role-card-icon svg { color: var(--red-primary); }
.hospital-card .role-card-icon svg { color: var(--navy); }
.bank-card .role-card-icon svg { color: var(--teal-primary); }

.role-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--grey-900);
}

.role-card p {
    font-size: 14px;
    color: var(--grey-600);
    line-height: 1.65;
    margin-bottom: 24px;
}

.role-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 250ms var(--ease-out);
    border: none;
}

.donor-card .role-card-btn {
    background: var(--red-primary);
    color: var(--white);
}
.donor-card .role-card-btn:hover {
    background: #a93226;
    box-shadow: 0 4px 16px rgba(192,57,43,0.3);
}

.hospital-card .role-card-btn {
    background: var(--navy);
    color: var(--white);
}
.hospital-card .role-card-btn:hover {
    background: #243656;
    box-shadow: 0 4px 16px rgba(27,42,74,0.3);
}

.bank-card .role-card-btn {
    background: var(--teal-primary);
    color: var(--white);
}
.bank-card .role-card-btn:hover {
    background: #145F6E;
    box-shadow: 0 4px 16px rgba(26,122,138,0.3);
}

.role-card-btn .arrow {
    transition: transform 200ms var(--ease-out);
    font-size: 16px;
}

.role-card:hover .role-card-btn .arrow {
    transform: translateX(5px);
}

/* ============================================================
   How It Works Section
   ============================================================ */
.how-section {
    padding: 64px 48px 80px;
    background: var(--white);
    text-align: center;
}

.how-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--grey-900);
}

.how-subtitle {
    color: var(--grey-600);
    font-size: 15px;
    margin-bottom: 56px;
}

.how-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.how-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.how-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.how-step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(27,42,74,0.2);
    transition: transform 300ms var(--ease-out), box-shadow 300ms;
}

.how-step:hover .how-step-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(27,42,74,0.3);
}

.how-step-icon svg {
    width: 26px;
    height: 26px;
}

.how-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--teal-primary);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    margin: 0 auto 10px;
}

.how-step h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--grey-900);
}

.how-step p {
    font-size: 13px;
    color: var(--grey-600);
    line-height: 1.55;
}

/* Dashed connector line between steps */
.how-connector {
    position: absolute;
    top: 32px;
    left: 15%;
    right: 15%;
    height: 2px;
    z-index: 1;
}

.how-connector-line {
    width: 100%;
    height: 2px;
    background-image: repeating-linear-gradient(
        to right,
        var(--grey-300) 0,
        var(--grey-300) 8px,
        transparent 8px,
        transparent 16px
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s var(--ease-out);
}

.how-connector-line.drawn {
    transform: scaleX(1);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--teal-dark);
    color: var(--white);
    padding: 56px 48px 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 40px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand .footer-logo-icon {
    width: 28px;
    height: 28px;
    color: var(--red-primary);
}

.footer-brand .footer-logo-icon svg { width: 100%; height: 100%; }

.footer-brand .footer-logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.footer-brand p {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.65;
    max-width: 280px;
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

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

.footer-col ul li a {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    transition: color 150ms;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.footer-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms var(--ease-out);
    cursor: pointer;
}

.footer-social-icon:hover {
    background: var(--teal-primary);
    transform: translateY(-3px);
}

.footer-social-icon svg {
    width: 16px;
    height: 16px;
    color: var(--white);
    fill: var(--white);
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    margin-top: 16px;
}

.footer-contact svg {
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,0.55);
    fill: rgba(255,255,255,0.55);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

/* ── Scroll-triggered entrance animations ── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleReveal {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes getStartedGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(192,57,43,0); }
    50% { box-shadow: 0 0 20px rgba(192,57,43,0.25); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-nav { padding: 16px 24px; }
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px 60px;
    }
    .hero-text { max-width: 100%; }
    .hero-subtitle { max-width: 100%; margin: 0 auto; }
    .hero-illustration { display: none; }
    .network-section { padding: 48px 24px; }
    .role-cards { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .how-section { padding: 48px 24px; }
    .how-steps { flex-direction: column; gap: 32px; }
    .how-connector { display: none; }
    .footer { padding: 40px 24px 20px; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 480px) {
    .footer-content { grid-template-columns: 1fr; }
}

/* ── Dark Mode Overrides ── */
body.dark-mode .roles-subtitle,
body.dark-mode .how-subtitle {
    color: #c9d1d9;
}

body.dark-mode .hospital-card .role-card-icon { background: rgba(255,255,255,0.05); }
body.dark-mode .hospital-card .role-card-icon svg { color: #f1f3f5; }
body.dark-mode .hospital-card .role-card-btn { background: #243656; color: #f1f3f5; }
body.dark-mode .hospital-card .role-card-btn:hover { background: #30446b; }

body.dark-mode .donor-card .role-card-btn { color: #f1f3f5; }
body.dark-mode .bank-card .role-card-btn { color: #f1f3f5; }

body.dark-mode .how-step-icon { background: #243656; color: #f1f3f5; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
body.dark-mode .how-step-number { background: #1A7A8A; color: #f1f3f5; }
body.dark-mode .how-connector { border-top-color: #30363d; }
body.dark-mode .how-section { background: #0f1117; }
body.dark-mode .hero-logo-text,
body.dark-mode .hero-logo-text span { color: #f1f3f5 !important; }
