/* --- VARIABLES & RESET --- */

:root {
    --bg-color: #0E0F12;
    --surface-color: #1A1D24;
    --surface-hover: #232730;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --primary: #10D8DE;
    --primary-hover: #0AC3C9;
    --border: #2D3748;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; border-radius: 12px; }

/* --- UTILITIES --- */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(16, 216, 222, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(16, 216, 222, 0.5);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(16, 216, 222, 0.1);
}

h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 3rem; text-align: center; }

/* --- HEADER --- */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(14, 15, 18, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover { color: var(--primary); }

.mobile-toggle { display: none; cursor: pointer; font-size: 1.5rem; }

/* --- HERO --- */

.hero {
    padding-top: 160px;
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
}

/* Background glow effect */

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 216, 222, 0.15) 0%, rgba(14, 15, 18, 0) 70%);
    z-index: -1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    max-width: 900px;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-image-wrapper {
    margin-top: 60px;
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* --- ABOUT (GRID) --- */

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.about-card {
    background: var(--surface-color);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 16px;
    transition: 0.3s;
}

.about-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.about-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

.about-card h3 { color: var(--primary); font-size: 1.25rem; }
.about-card p { color: var(--text-muted); font-size: 0.95rem; }

/* --- HOW IT WORKS --- */

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.step-number {
    display: inline-block;
    background: var(--surface-hover);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

/* --- FEATURE SPLITS (Providers/Patients) --- */

.feature-split {
    display: flex;
    align-items: center;
    gap: 60px;
}

.feature-split.reverse {
    flex-direction: row-reverse;
}

.feature-image { flex: 1; }
.feature-image img { box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 1px solid var(--border); }

.feature-content { flex: 1; }
.feature-content h2 { text-align: left; margin-bottom: 1.5rem; }

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.feature-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
    margin-right: 15px;
    background: rgba(16, 216, 222, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* New Badge Style */

.app-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1); /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 500;
}

.app-badge-pill i {
    color: var(--primary); /* Cyan accent */
    font-style: normal;
    font-weight: bold;
}

/* Update Button to accommodate Icon */

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* --- PRICING --- */

.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--surface-color);
    border-radius: 30px;
    cursor: pointer;
    border: 1px solid var(--border);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    transition: 0.3s;
    transform: translateX(30px);
}

.toggle-active .toggle-switch::after {
    transform: translateX(0px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pricing-card {
    background: var(--surface-color);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.pricing-card.featured {
    background: linear-gradient(180deg, rgba(16, 216, 222, 0.05) 0%, var(--surface-color) 100%);
    border-color: var(--primary);
}

.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.price { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 5px; }
.period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }

.plan-features {
    margin: 20px 0;
    flex-grow: 1;
}

.plan-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.free-plan-banner {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(16, 216, 222, 0.05);
    border-radius: 12px;
    border: 1px dashed var(--primary);
}

.pricing-button {
    margin-top: 2.5rem;
    text-align: center;
}

/* --- FAQ --- */

.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.faq-question {
    padding: 20px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0,0,0,0.2);
}

.faq-answer p {
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- FOOTER --- */

footer {
    background: var(--surface-color);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p { color: var(--text-muted); margin-top: 15px; font-size: 0.9rem; }
.footer-col h4 { margin-bottom: 20px; color: var(--text-main); }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-links { display: flex; gap: 20px; }

/* Footer App Button */

.footer-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000; /* Apple-style black */
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    margin-top: 10px;
    transition: 0.3s;
}

.footer-app-btn:hover {
    border-color: var(--primary);
    background: #111;
}

.footer-app-btn .btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.footer-app-btn .small-text {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.footer-app-btn .large-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

/* --- TERMS AND CONDITIONS PAGE --- */

.terms-page header {
    position: relative;
    background: var(--surface-color);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.terms-page header h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary);
}

/* Back to Home Button */

.terms-page .back-home {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary);
    color: var(--bg-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color 0.2s;
}

.terms-page .back-home:hover {
    background-color: var(--primary-hover);
}

.terms-page pre {
    white-space: pre-wrap;      /* wrap long lines */
    word-wrap: break-word;      /* break words if needed */
    overflow-x: auto;           /* optional: show horizontal scroll if still too wide */
    background: var(--surface-color);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.95rem;
    line-height: 1.5;
}   

.terms-page main {
    max-width: 800px;
    margin: 120px auto 3rem auto; /* 120px to account for fixed header */
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.terms-page main h2 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.terms-page main p {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.terms-page main ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-page main ul li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.terms-page a {
    color: var(--primary);
    text-decoration: none;
}

.terms-page a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.terms-page footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-container { grid-template-columns: repeat(2, 1fr); } /* 2 cols */
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-color);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; color: var(--text-main); }
    .header-btn { display: none; } /* Hide CTA on mobile nav or move inside */

    .logo > img {width: 100px; }
    
    .about-grid { grid-template-columns: 1fr; }
    .steps-container { grid-template-columns: 1fr; }
    .feature-split, .feature-split.reverse { flex-direction: column; gap: 30px; }
    .pricing-grid { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 15px; }

    .terms-page main {
        margin: 100px 20px 3rem 20px;
        padding: 1.5rem;
    }

    .terms-page header h1 {
        font-size: 1.5rem;
    }

    .terms-page main h2 {
        font-size: 1.5rem;
    }

    .terms-page .back-home {
        position: sticky;
        top: 12px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}