/* WorldCareMD — brand system
   Healthcare Reimagined. A blue→green gradient identity with violet accents,
   reproducing the look of worldcaremd.com. */

:root {
    --brand-blue: #1875f8;
    --brand-blue-dark: #095dd5;
    --brand-blue-deep: #0d1b36;
    --brand-green: #1acc96;
    --brand-green-dark: #1ac89c;
    --brand-violet: #9647fa;
    --brand-violet-soft: #7a61fb;

    --brand-ink: #0d1b36;
    --brand-body: #4e4e4e;
    --brand-muted: #818181;
    --brand-line: #e6ebf3;
    --brand-bg: #ffffff;
    --brand-bg-soft: #f5f9ff;
    --brand-surface: #ffffff;

    --brand-gradient: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-green) 100%);
    --brand-gradient-vert: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-green) 100%);
    --brand-gradient-tri: linear-gradient(120deg, var(--brand-violet) 0%, var(--brand-blue) 50%, var(--brand-green) 100%);
    /* Header bar: violet → blue → green, matching the live site's scrolled nav. */
    --brand-header: linear-gradient(90deg, #9647fa 0%, #1875f8 52%, #1acc96 100%);
    /* Hero: deep indigo diagonally washing to green. */
    --brand-hero: linear-gradient(115deg, #2b2a7e 0%, #29429f 32%, #1f6ae6 58%, #1acc96 100%);
    --brand-footer: #0d1b36;

    --brand-radius: 16px;
    --brand-radius-sm: 10px;
    --brand-shadow: 0 10px 30px rgba(13, 27, 54, .08);
    --brand-shadow-lg: 0 24px 60px rgba(13, 27, 54, .12);

    --brand-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --brand-display: "Comfortaa", "Inter", system-ui, sans-serif;

    --brand-container: 1200px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: var(--brand-font);
    color: var(--brand-body);
    background: var(--brand-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

a {
    color: var(--brand-blue-dark);
    text-decoration: none;
}

a:hover {
    color: var(--brand-blue);
}

h1, h2, h3, h4 {
    color: var(--brand-ink);
    font-family: var(--brand-display);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

img { max-width: 100%; display: block; }

/* Layout ---------------------------------------------------------------- */
main {
    display: block;
}

.container {
    width: 100%;
    max-width: var(--brand-container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4.5rem 0;
}

.section-soft { background: var(--brand-bg-soft); }

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-blue);
    margin-bottom: 1rem;
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}

.section-head p {
    color: var(--brand-muted);
    font-size: 1.05rem;
}

/* Buttons --------------------------------------------------------------- */
.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.9rem;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: var(--brand-font);
    font-size: .98rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(24, 117, 248, .28);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(24, 117, 248, .36);
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue-dark);
    border-color: var(--brand-blue);
}

.btn-outline:hover {
    background: var(--brand-blue);
    color: #fff;
}

.btn-ghost {
    background: #fff;
    color: var(--brand-blue-dark);
    border-color: var(--brand-line);
}

.btn-ghost:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.btn-lg {
    padding: 1rem 2.4rem;
    font-size: 1.05rem;
}

/* Cards & surfaces ------------------------------------------------------ */
.card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    padding: 1.75rem;
}

/* Tables ---------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius-sm);
    overflow: hidden;
    box-shadow: var(--brand-shadow);
}

.table thead th {
    background: var(--brand-blue-dark);
    color: #fff;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .75rem 1rem;
}

.table tbody td {
    padding: .65rem 1rem;
    border-top: 1px solid var(--brand-line);
    font-size: .9rem;
    word-break: break-word;
}

.table tbody tr:nth-child(even) { background: var(--brand-bg-soft); }

/* Header ---------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--brand-header);
    box-shadow: 0 2px 14px rgba(13, 27, 54, .12);
    transition: background-color .3s ease, background-image .3s ease, box-shadow .3s ease;
}

/* Transparent while sitting over the hero at the top of the home page. */
.site-header.transparent {
    background: transparent;
    box-shadow: none;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 76px;
}

/* flex-shrink:0 keeps the logo from being squeezed narrower than its natural
   width by the flex row; max-width:none overrides the global img{max-width:100%}
   that would otherwise crush its width while the fixed height distorts aspect. */
.site-header .brand { margin-right: auto; flex-shrink: 0; }
.site-header .brand img { height: 48px; width: auto; max-width: none; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.main-nav > a,
.nav-dropdown > span {
    color: rgba(255, 255, 255, .92);
    font-weight: 600;
    font-size: .98rem;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .15s ease, color .15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown:hover > span {
    color: #fff;
    border-bottom-color: #fff;
}

/* Services mega-menu */
.nav-dropdown { position: static; }

.nav-caret { font-size: .7rem; transition: transform .2s ease; }
/* Closed = down caret; open = up caret (matches the live site). */
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }

/* When open, the Services trigger becomes a white pill with blue text. */
.nav-dropdown.open > span {
    background: #fff;
    color: var(--brand-blue-dark);
    border-radius: 999px;
    padding: .45rem 1.2rem;
    border-bottom-color: transparent;
}

.mega-menu {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    /* Matches the live site: .container-xxl max-width 1240px, panel padding 18px 15px. */
    width: min(1240px, 94vw);
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--brand-shadow-lg);
    padding: 18px 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 200;
}

.nav-dropdown.open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.75rem;
}

/* Photo fills the card; the white text panel floats over its bottom-left,
   so the image wraps around it (top strip + right edge) — matches the live site. */
.svc-card {
    position: relative;
    aspect-ratio: 1.1 / 1;
}

.svc-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.svc-stamp {
    position: absolute;
    top: 34%;
    left: 52%;
    width: 210px;
    height: auto;
    transform: translate(-50%, -50%) rotate(-12deg);
    pointer-events: none;
    z-index: 3;
}

.svc-body {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    width: 70%;
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem 1.1rem;
    box-shadow: 0 6px 18px rgba(13, 27, 54, .12);
}

.svc-body h4 {
    font-family: var(--brand-font);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #1a1a1a;
    margin-bottom: .4rem;
}

.svc-body p {
    font-family: var(--brand-font);
    color: #595959;
    font-size: .84rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 .9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svc-actions { display: flex; align-items: center; gap: 1.1rem; }

.btn-svc-login {
    background: var(--brand-blue-dark);
    color: #fff;
    padding: .5rem 1.5rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}

.btn-svc-login:hover { background: var(--brand-blue); color: #fff; }

/* Learn More is a button styled to read like the original text link. */
.svc-learn {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: var(--brand-font);
    color: var(--brand-green-dark);
    font-weight: 600;
    font-size: .85rem;
}
.svc-learn:hover { color: var(--brand-blue); }

/* Service detail modal ("Learn More" pop-up) --------------------------- */
.svc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.svc-modal.open { display: flex; }

body.svc-modal-lock { overflow: hidden; }

.svc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 27, 54, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.svc-modal-card {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--brand-shadow-lg);
    padding: 1.5rem 2rem 2rem;
    animation: svcModalIn .18s ease;
}

@keyframes svcModalIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.svc-modal-x {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 1.3rem;
    color: var(--brand-ink);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.svc-modal-x:hover { background: var(--brand-bg-soft); color: var(--brand-blue); }

.svc-modal-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 2.5rem;
    margin-bottom: 1.5rem;
}

.svc-modal-logo { height: 49px; width: auto; }

.svc-modal-sep {
    width: 1px;
    align-self: stretch;
    min-height: 26px;
    background: var(--brand-line);
}

.svc-modal-head h3 {
    margin: 0;
    font-family: var(--brand-font);
    font-size: 1.5625rem; /* 25px — matches the live site */
    font-weight: 700;
    color: #000;
}

.svc-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.svc-modal-media { position: relative; }

.svc-modal-media img {
    width: 100%;
    /* Portrait crop matching the live site's modal photo (440 × 535). */
    aspect-ratio: 440 / 535;
    object-fit: cover;
    border-radius: 14px;
}

/* Higher specificity than `.svc-modal-media img` so the badge keeps its
   intrinsic size instead of stretching to fill the photo. */
.svc-modal-media img.svc-modal-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: auto;
    transform: translate(-50%, -50%) rotate(-12deg);
    pointer-events: none;
}

.svc-modal-detail > p {
    color: #000;
    font-size: 1rem; /* 16px */
    line-height: 1.5; /* 24px */
    margin: 0 0 1rem;
}

.svc-modal-assist {
    font-weight: 700;
    color: #000;
    margin: 0 0 .75rem;
}

.svc-modal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: .55rem;
}

.svc-modal-list li {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #000;
    font-size: 1rem; /* 16px */
}

.svc-modal-list i {
    color: var(--brand-green);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.btn-svc-modal-login {
    display: inline-block;
    background: var(--brand-blue-dark);
    color: #fff;
    padding: .65rem 2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
}

.btn-svc-modal-login:hover { background: var(--brand-blue); color: #fff; }

@media (max-width: 720px) {
    .svc-modal-body { grid-template-columns: 1fr; gap: 1.25rem; }
    .svc-modal-media img { max-height: 240px; }
    .svc-modal-detail { background: none; }
}

/* "How it works" hero modal -------------------------------------------- */
/* Wider than the service modal to fit three columns; overrides the
   .svc-modal-card width since it appears later in the cascade. */
.how-modal-card { width: min(1000px, 100%); }

.how-modal-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 2.5rem;
    margin-bottom: 1.75rem;
}

.how-modal-logo { height: 49px; width: auto; }

.how-modal-titles h3 {
    margin: 0;
    font-family: var(--brand-font);
    font-size: 1.125rem; /* 18px — matches the live site */
    font-weight: 700;
    color: #000;
}

.how-modal-titles p {
    margin: .2rem 0 0;
    font-size: .92rem;
    color: #595959;
}

.how-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.how-modal-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* The howOne/Two/Three PNGs are pre-cropped circular portraits with the blue
   ring baked in, so no border-radius is needed here. */
.how-modal-photo {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin-bottom: 1.1rem;
}

.how-modal-col h4 {
    font-family: var(--brand-font);
    font-size: 1.375rem; /* 22px */
    font-weight: 700;
    color: #000;
    margin: 0 0 .6rem;
}

.how-modal-col > p {
    color: #595959;
    font-size: .95rem;
    line-height: 1.45;
    margin: 0 0 .85rem;
    max-width: 240px;
}

.how-modal-dash {
    color: #000;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* margin-top:auto bottom-aligns the footer graphics across the three
   equal-height columns even though their natural heights differ. */
.how-modal-foot {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin-top: auto;
}

@media (max-width: 720px) {
    .how-modal-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Give the modal a little more room on narrow phones. */
    .svc-modal { padding: 1rem; }
    .svc-modal-card { padding: 1.5rem 1.25rem 1.75rem; }

    /* Stack the header vertically so the title and description get the full
       card width instead of being squished into a narrow column beside the
       logo. The vertical separator only makes sense in the side-by-side
       desktop layout, so hide it here. */
    .how-modal-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: .6rem;
        padding-right: 0;
    }
    .how-modal-head .svc-modal-sep { display: none; }
}

@media (max-width: 820px) {
    /* In the mobile nav column the mega-menu drops the fixed desktop dropdown
       styling and becomes an inline, full-width, single-column panel that flows
       within the open hamburger menu. Hidden until the Services row is tapped. */
    .nav-dropdown { width: 100%; }
    .mega-menu {
        display: none;
        position: static;
        transform: none;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        padding: 1rem 0 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }
    .nav-dropdown.open .mega-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .mega-grid { grid-template-columns: 1fr; gap: 1rem; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.header-actions .greeting {
    color: rgba(255, 255, 255, .9);
    font-size: .9rem;
}

.btn-on-grad {
    background: #fff;
    color: var(--brand-blue-dark);
}

.btn-on-grad:hover { color: var(--brand-blue-dark); transform: translateY(-2px); }

.btn-on-grad-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .7);
}

.btn-on-grad-outline:hover { background: rgba(255, 255, 255, .15); color: #fff; }

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

/* Footer ---------------------------------------------------------------- */
.site-footer {
    background: var(--brand-footer);
    padding: 3.5rem 0 1.5rem;
    color: #c5cddd;
}

.footer-brand-logo img { height: 30px; margin-bottom: 2rem; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: 2.5rem;
}

.footer-col h4 {
    font-family: var(--brand-font);
    font-size: .98rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .65rem; }

.footer-col a,
.footer-col address {
    color: #8fa0bd;
    font-size: .95rem;
    font-style: normal;
    line-height: 1.7;
}

.footer-col a:hover { color: var(--brand-green); }

.store-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; }
/* Both badges share a ~3.38 aspect ratio. Fix the width (matching the live
   site's 162px) and let height follow — otherwise the flex column's default
   align-items: stretch overrides width:auto and distorts them. */
.store-stack img { width: 162px; height: auto; }

.footer-bottom {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    font-size: .85rem;
    color: #6b7c97;
}

/* Generic prose pages (legal/about) ------------------------------------- */
.prose {
    max-width: 860px;
    margin: 0 auto;
}

.prose h2 { margin-top: 2.25rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.75rem; font-size: 1.15rem; color: var(--brand-blue-dark); }
.prose p, .prose li { color: var(--brand-body); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .5rem; }

.page-hero {
    background: var(--brand-gradient);
    color: #fff;
    text-align: center;
    padding: 3.5rem 0;
}

.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, .9); margin: 0; }

.cta-row { margin-top: 2.25rem; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .main-nav,
    .header-actions .greeting { display: none; }
    .nav-toggle { display: block; }
    /* Tighten the bar and shrink the logo so the full-aspect wordmark, the Login
       button and the hamburger all fit on a narrow viewport without squishing. */
    .site-header .container { gap: 1rem; }
    .site-header .brand img { height: 38px; }
    .main-nav.open {
        display: flex;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        /* Override the desktop .main-nav's align-items:center so the stacked
           links (About, Contact, Services) left-align in the column. */
        align-items: flex-start;
        gap: 1.25rem;
        background: var(--brand-blue-dark);
        padding: 1.5rem;
        margin: 0;
    }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .section { padding: 3rem 0; }
}
