/*
 * قالب نبض الطبي V1.1.0
 * نقطة انطلاق لقوالب منصة إدارة المركز الطبي
 */

:root {
    --primary: #7c173d;
    --primary-strong: #5b0d2b;
    --primary-deep: #310817;
    --primary-soft: #fbecf2;
    --secondary: #ae3e68;
    --accent: #e0a5bb;
    --success: #117761;
    --success-soft: #e5f6f0;
    --bg: #fffafb;
    --surface: #ffffff;
    --surface-soft: #fbf4f6;
    --text: #1c2430;
    --text-soft: #596476;
    --muted: #7b8390;
    --line: #eadde2;
    --line-strong: #dbc8d0;
    --shadow-sm: 0 12px 34px rgba(73, 15, 40, .07);
    --shadow: 0 24px 68px rgba(70, 12, 36, .13);
    --radius-sm: 14px;
    --radius: 24px;
    --radius-lg: 34px;
}

body {
    background:
        radial-gradient(circle at 8% 5%, rgba(174, 62, 104, .045), transparent 22rem),
        var(--bg);
}

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

.utility-bar {
    background: linear-gradient(90deg, #250511, var(--primary-deep) 48%, #250511);
}

.status-dot {
    background: #70e0bb;
    box-shadow: 0 0 0 5px rgba(112, 224, 187, .11), 0 0 18px rgba(112, 224, 187, .35);
}

.header {
    border-bottom-color: rgba(124, 23, 61, .09);
    background: rgba(255, 251, 252, .92);
    box-shadow: 0 12px 36px rgba(49, 8, 23, .045);
}

.brand-mark {
    position: relative;
    overflow: hidden;
    border-radius: 17px 17px 17px 7px;
    background: linear-gradient(145deg, #9d2b56, var(--primary) 52%, var(--primary-deep));
    box-shadow: 0 12px 30px rgba(124, 23, 61, .24);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: -35% 45% 45% -35%;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}

.menu a {
    position: relative;
}

.menu a::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 4px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--secondary);
    transition: width .2s ease;
}

.menu a:hover::after {
    width: calc(100% - 20px);
}

.btn {
    border-radius: 14px 14px 14px 6px;
    background: linear-gradient(135deg, var(--primary), #941f4b);
    box-shadow: 0 8px 20px rgba(124, 23, 61, .12);
}

.btn:hover {
    box-shadow: 0 14px 30px rgba(124, 23, 61, .22);
}

.btn.secondary {
    background: linear-gradient(135deg, var(--secondary), #c0587e);
}

.btn.alt,
.btn.light,
.btn.outline {
    box-shadow: none;
}

.hero {
    isolation: isolate;
    padding-block: 92px 108px;
    background:
        radial-gradient(circle at 10% 5%, rgba(255, 255, 255, .14), transparent 24rem),
        radial-gradient(circle at 92% 110%, rgba(224, 165, 187, .25), transparent 32rem),
        linear-gradient(122deg, #260510, var(--primary-deep) 42%, #681333 72%, #8a234b);
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -8rem;
    bottom: -14rem;
    width: 34rem;
    height: 34rem;
    border: 5.5rem solid rgba(255, 255, 255, .045);
    border-radius: 50%;
    animation: medical-pulse 6s ease-in-out infinite;
}

.hero::before {
    opacity: .9;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='120' viewBox='0 0 600 120'%3E%3Cpath d='M0 60H86l14-24 18 58 18-42 14 8h90l12-15 14 31 17-54 18 75 19-37h280' fill='none' stroke='%23f6bdd2' stroke-opacity='.22' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-repeat: repeat-x, repeat, repeat;
    background-position: 0 calc(100% - 74px), 0 0, 0 0;
    background-size: 600px 120px, 48px 48px, 48px 48px;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    animation: medical-ecg-flow 14s linear infinite;
}

.hero-grid > div:first-child {
    position: relative;
}

.hero-grid > div:first-child::before {
    content: "♥";
    position: absolute;
    top: -72px;
    left: -28px;
    z-index: -1;
    color: #ffd7e5;
    font-size: clamp(78px, 10vw, 132px);
    line-height: 1;
    opacity: .09;
    filter: drop-shadow(0 0 28px rgba(255, 215, 229, .28));
    transform-origin: center;
    animation: medical-heartbeat 1.45s ease-in-out infinite;
}

.hero h1 {
    max-width: 780px;
    text-wrap: balance;
}

.hero h1 span {
    color: #ffd7e5;
    text-shadow: 0 8px 30px rgba(0, 0, 0, .16);
}

.hero .eyebrow {
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
}

.hero .eyebrow::before {
    background: #74e6c0;
    box-shadow: 0 0 0 5px rgba(116, 230, 192, .12);
}

.patient-console::before {
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .075);
}

.patient-console::after {
    content: "♥  72 نبضة/د   •   الضغط 120/80   •   السكر 95";
    position: absolute;
    right: 34px;
    bottom: -24px;
    z-index: 3;
    width: max-content;
    max-width: calc(100% - 68px);
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 14px 14px 14px 6px;
    background: rgba(255, 250, 251, .92);
    color: var(--primary);
    box-shadow: 0 15px 36px rgba(28, 3, 13, .22);
    backdrop-filter: blur(14px);
    font-size: 11px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    animation: medical-vitals-float 4.8s ease-in-out infinite;
}

.console-card {
    z-index: 1;
    border-color: rgba(255, 255, 255, .45);
    border-radius: 30px 30px 30px 12px;
    background: rgba(255, 255, 255, .975);
    box-shadow: 0 38px 90px rgba(19, 2, 9, .32);
}

.quick-link {
    border-radius: 16px 16px 16px 7px;
}

.quick-link:hover {
    border-color: #d7a6b8;
    background: linear-gradient(135deg, #fff, var(--primary-soft));
}

.quick-icon,
.service-icon {
    border-radius: 16px 16px 16px 7px;
    background: linear-gradient(145deg, #f9e4ec, #fff);
}

.stats-box {
    border-color: rgba(124, 23, 61, .12);
    border-radius: 26px 26px 26px 10px;
    box-shadow: 0 22px 54px rgba(70, 12, 36, .12);
}

.stats-item strong {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section h2 {
    text-wrap: balance;
}

.card,
.journey-step,
.about-point,
.empty {
    border-color: rgba(124, 23, 61, .11);
    box-shadow: var(--shadow-sm);
}

.card,
.journey-step {
    overflow: hidden;
    border-radius: var(--radius) var(--radius) var(--radius) 9px;
}

.card::before,
.journey-step::after {
    pointer-events: none;
}

.card:hover {
    border-color: rgba(124, 23, 61, .25);
    box-shadow: 0 24px 60px rgba(70, 12, 36, .13);
}

.service-card::before {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -55px;
    width: 110px;
    height: 110px;
    border: 20px solid rgba(124, 23, 61, .035);
    border-radius: 50%;
}

.journey-step::before {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 15px 15px 15px 6px;
    background: var(--primary-soft);
}

.about-visual,
.page-hero,
.cta {
    background:
        radial-gradient(circle at 8% 8%, rgba(255, 255, 255, .13), transparent 13rem),
        linear-gradient(135deg, #2b0614, #59102c 52%, var(--primary));
}

.about-visual {
    border-radius: 36px 36px 36px 13px;
    box-shadow: 0 30px 75px rgba(49, 8, 23, .19);
}

.about-visual .medical-symbol {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 24px 24px 24px 8px;
    box-shadow: inset 0 0 0 7px rgba(255, 255, 255, .025);
}

.about-metric div {
    backdrop-filter: blur(9px);
}

.page-hero {
    padding-block: 74px;
}

.cta {
    border-radius: 30px 30px 30px 12px;
}

.footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #22040e, var(--primary-deep) 60%, #490d25);
}

.footer::before {
    content: "";
    position: absolute;
    left: -7rem;
    bottom: -10rem;
    width: 27rem;
    height: 27rem;
    border: 4.5rem solid rgba(255, 255, 255, .025);
    border-radius: 50%;
}

@keyframes medical-pulse {
    0%, 100% { transform: scale(.96); opacity: .7; }
    50% { transform: scale(1.04); opacity: 1; }
}

@keyframes medical-heartbeat {
    0%, 28%, 60%, 100% { transform: scale(1); opacity: .09; }
    10% { transform: scale(1.13); opacity: .16; }
    18% { transform: scale(.98); opacity: .1; }
    38% { transform: scale(1.08); opacity: .14; }
    46% { transform: scale(1); opacity: .09; }
}

@keyframes medical-ecg-flow {
    from { background-position: 0 calc(100% - 74px), 0 0, 0 0; }
    to { background-position: -600px calc(100% - 74px), 0 0, 0 0; }
}

@keyframes medical-vitals-float {
    0%, 100% { transform: translateY(0); box-shadow: 0 15px 36px rgba(28, 3, 13, .22); }
    50% { transform: translateY(-6px); box-shadow: 0 20px 42px rgba(28, 3, 13, .28); }
}

@media (max-width: 760px) {
    .hero {
        padding-block: 62px 82px;
    }

    .hero::after {
        left: -17rem;
        bottom: -20rem;
    }

    .hero-grid > div:first-child::before {
        top: -48px;
        left: 2px;
        font-size: 74px;
    }

    .patient-console::after {
        position: relative;
        right: auto;
        bottom: auto;
        display: block;
        width: calc(100% - 24px);
        max-width: none;
        margin: -2px auto 0;
        text-align: center;
        white-space: normal;
    }

    .stats-box {
        border-radius: 22px 22px 22px 8px;
    }
}

@media (max-width: 420px) {
    .patient-console::after {
        padding-inline: 10px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
