/* ================================================
   Matar Clinic — Landing Page Styles
   ================================================ */

:root {
    --primary: #29D8DB;
    --primary-dark: #01578C;
    --primary-light: #52E4E7;
    --accent: #16a34a;
    --accent-dark: #15803d;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
    --radius: 10px;
    --radius-lg: 16px;
    --font: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    --transition: all 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    direction: rtl;
    text-align: right;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= Navbar ================= */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-cta {
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ================= Hero ================= */
.hero {
    background: linear-gradient(135deg, #1DB5AD 0%, #4CC9C2 100%);
    color: #fff;
    padding: 70px 0 90px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: -50%; right: -30%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}
.hero h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 18px;
}
.hero h1 .highlight {
    background: linear-gradient(120deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p.lead {
    font-size: 19px;
    opacity: 0.95;
    margin-bottom: 28px;
    font-weight: 400;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--primary);
    padding: 16px 34px;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.hero-cta .arrow { transition: var(--transition); }
.hero-cta:hover .arrow { transform: translateX(-6px); }

.hero-badges {
    display: flex;
    gap: 18px;
    margin-top: 24px;
    font-size: 14px;
    opacity: 0.9;
}
.hero-badges .badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(10px);
}
.hero-card h3 {
    font-size: 20px;
    margin-bottom: 18px;
}
.hero-card .step {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.hero-card .step:last-child { border-bottom: none; }
.hero-card .step-num {
    background: #fbbf24;
    color: var(--primary-dark);
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}
.hero-card .step-text {
    font-size: 15px;
    line-height: 1.6;
}

/* ================= Sections ================= */
section { padding: 70px 0; }
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 14px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto 50px;
}

/* ================= Benefits ================= */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    text-align: center;
    transition: var(--transition);
}
.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.benefit-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 18px;
}
.benefit-card h3 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}
.benefit-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ================= How It Works ================= */
.howit { background: var(--bg-card); }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.step-box {
    text-align: center;
    padding: 20px;
}
.step-box .num {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    margin: 0 auto 16px;
}
.step-box h4 { font-size: 17px; margin-bottom: 6px; }
.step-box p { color: var(--text-muted); font-size: 14px; }

/* ================= Form ================= */
#form-section {
    background: linear-gradient(180deg, var(--bg) 0%, #e2eaf5 100%);
}
.form-wrapper {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.form-progress {
    height: 6px;
    background: var(--border);
    position: relative;
}
.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 16.66%;
    transition: width 0.35s ease;
}
.form-header {
    background: var(--primary);
    color: #fff;
    padding: 24px 30px;
}
.form-header h2 { font-size: 22px; margin-bottom: 4px; }
.form-header p { opacity: 0.85; font-size: 14px; }
.form-body {
    padding: 30px;
}
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.form-step h3 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 6px;
}
.form-step .step-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 22px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14.5px;
    color: var(--text);
}
.form-group label .req { color: var(--danger); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-card);
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,75,138,0.1);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.option-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.option-group label {
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    background: #fafbfc;
    font-weight: 600;
}
.option-group label:hover { border-color: var(--primary-light); }
.option-group input[type="radio"] { display: none; }
.option-group input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 800;
}
.option-group input[type="radio"]:checked ~ * { }
.option-group label:has(input[type="radio"]:checked) {
    background: rgba(13,75,138,0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    background: #fafbfc;
}
.checkbox-group label:hover { border-color: var(--primary-light); }
.checkbox-group label:has(input:checked) {
    background: rgba(13,75,138,0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}
.btn {
    padding: 12px 30px;
    border-radius: var(--radius);
    border: none;
    font-weight: 700;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-submit {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    padding: 14px 36px;
    font-size: 16px;
}
.btn-submit:hover { box-shadow: 0 8px 20px rgba(22,163,74,0.3); transform: translateY(-1px); }

.form-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
    display: none;
}
.form-error.visible { display: block; }

/* ================= FAQ ================= */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    padding: 18px 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.faq-question::after {
    content: "+";
    font-size: 22px;
    color: var(--primary);
    transition: var(--transition);
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    color: var(--text-muted);
    line-height: 1.8;
}
.faq-item.open .faq-answer {
    padding: 0 24px 20px;
    max-height: 500px;
}

/* ================= Footer ================= */
.footer {
    background: var(--text);
    color: #cbd5e1;
    padding: 50px 0 20px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer h4 { color: #fff; margin-bottom: 14px; font-size: 16px; }
.footer a { color: #cbd5e1; text-decoration: none; display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
}

/* ================= Loading overlay ================= */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
}
.loading-overlay.visible { display: flex; }
.loading-box {
    background: #fff;
    padding: 40px 50px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
}
.spinner {
    width: 56px; height: 56px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box h3 {
    color: var(--primary);
    margin-bottom: 8px;
}
.loading-box p { color: var(--text-muted); font-size: 14px; }

/* ================= Responsive ================= */
@media (max-width: 768px) {
    .hero-grid, .benefits-grid, .steps-grid, .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
    .hero p.lead { font-size: 16px; }
    .section-title { font-size: 24px; }
    .form-row, .checkbox-group, .option-group { grid-template-columns: 1fr; }
    .form-body { padding: 20px; }
    .nav-cta { padding: 8px 14px; font-size: 14px; }
}

/* MATAR CLINIC BRAND OVERRIDES */
body, input, textarea, select, button { font-family: 'Cairo', 'Tajawal', -apple-system, sans-serif !important; font-weight: 400; line-height: 1.6; }
h1, h2, h3, h4, h5, h6, .logo, .section-title, .hero-title { font-family: 'Cairo', 'Roboto', sans-serif !important; font-weight: 700; }
:root { --accent-teal: #29D8DB; --brand-dark: #01578C; --brand-bg: #F6FEF9; }
.logo-img { height: 56px; width: auto; display: block; }
.hero, section.hero, .hero-section { background: linear-gradient(135deg, #F6FEF9 0%, #E0F8F8 100%) !important; color: #01578C !important; padding: 80px 0 60px !important; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(41, 216, 219, 0.12) 0%, transparent 70%); pointer-events: none; }
.hero h1, .hero .hero-title, .hero-section h1 { color: #01578C !important; font-weight: 800 !important; font-size: clamp(1.8rem, 4vw, 2.8rem) !important; line-height: 1.3; }
.hero p, .hero .hero-subtitle, .hero-section p { color: #334155 !important; font-size: clamp(1rem, 1.8vw, 1.15rem); line-height: 1.7; }
.hero .highlight, .hero strong { color: #29D8DB !important; font-weight: 700; }
.btn, button[type="submit"], .cta-button, .submit-btn { background: linear-gradient(135deg, #29D8DB 0%, #1BC5C8 100%) !important; color: #FFFFFF !important; border: none !important; border-radius: 50px !important; padding: 14px 32px !important; font-weight: 700 !important; font-family: 'Cairo', sans-serif !important; font-size: 1rem !important; box-shadow: 0 4px 14px rgba(41, 216, 219, 0.35); transition: all 0.3s ease; cursor: pointer; }
.btn:hover, button[type="submit"]:hover, .cta-button:hover, .submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(41, 216, 219, 0.45); background: linear-gradient(135deg, #1BC5C8 0%, #0FA9AC 100%) !important; }
.btn-secondary { background: transparent !important; color: #01578C !important; border: 2px solid #01578C !important; box-shadow: none; }
header, .site-header, nav.main-nav { background: #FFFFFF !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); border-bottom: 1px solid rgba(41, 216, 219, 0.12); }
.form-section, section.form { background: linear-gradient(180deg, #FFFFFF 0%, #F6FEF9 100%) !important; }
input:focus, textarea:focus, select:focus { border-color: #29D8DB !important; box-shadow: 0 0 0 3px rgba(41, 216, 219, 0.15) !important; outline: none; }
.feature-card, .card, .service-card { background: #FFFFFF; border: 1px solid rgba(41, 216, 219, 0.15); border-radius: 16px; transition: all 0.3s ease; }
.feature-card:hover, .card:hover, .service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(1, 87, 140, 0.1); border-color: rgba(41, 216, 219, 0.4); }
.feature-icon, .card-icon { color: #29D8DB; }
footer, .site-footer { background: #01578C !important; color: #F6FEF9 !important; }
footer a, .site-footer a { color: #29D8DB !important; }
footer a:hover, .site-footer a:hover { color: #FFFFFF !important; }
body { direction: rtl; text-align: right; }
