/* 
   =========================================
   Cytotec Riyadh Platform - Main Stylesheet
   =========================================
   Arabic Luxury, Clean Medical Informatics & High trust Aesthetics.
   RTL First, fully optimized, Light/Dark Modes, performant transitions.
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Tajawal:wght@400;500;700;800;900&display=swap');

/* --- Root & Themes --- */
:root {
    /* Color Palette - Emerald Green & Deep Sage (Trust, Health, Luxury, Pure) */
    --primary-hsl: 165, 85%, 26%;
    --secondary-hsl: 154, 48%, 45%;
    --accent-hsl: 38, 92%, 50%; /* Pure Gold */
    --danger-hsl: 350, 80%, 48%;
    
    /* Light Mode Variables */
    --primary: hsl(var(--primary-hsl));
    --primary-light: hsl(var(--primary-hsl), 0.1);
    --secondary: hsl(var(--secondary-hsl));
    --accent: hsl(var(--accent-hsl));
    --bg-base: #f7faf9;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f6f4;
    --text-primary: #121c19;
    --text-secondary: #4a5c57;
    --text-on-primary: #ffffff;
    --border-color: #e2ede9;
    --shadow-sm: 0 2px 4px rgba(18, 28, 25, 0.04);
    --shadow-md: 0 10px 25px rgba(18, 28, 25, 0.08);
    --shadow-lg: 0 20px 40px rgba(18, 28, 25, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-display: 'Tajawal', sans-serif;
    --font-body: 'Cairo', sans-serif;
}

[data-theme="dark"] {
    --primary: #2bc096;
    --primary-light: rgba(43, 192, 150, 0.15);
    --secondary: #1a7f63;
    --accent: #f0bd47;
    --bg-base: #0a110e;
    --bg-surface: #121d19;
    --bg-surface-alt: #172621;
    --text-primary: #f2f7f5;
    --text-secondary: #a3b8b1;
    --border-color: #20352e;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    direction: rtl;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* --- Typography System --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 2.5rem; font-weight: 900; }
h2 { font-size: 1.85rem; position: relative; padding-bottom: 12px; margin-bottom: 2rem; }
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}
h3 { font-size: 1.4rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary); }

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}
[data-theme="dark"] .site-header {
    background-color: rgba(18, 29, 25, 0.9);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--primary);
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}
.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}
.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- Custom Theme Toggle --- */
.theme-toggle-btn {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}
.theme-toggle-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* --- CTA Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.8rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    color: white;
}
.btn-secondary {
    background-color: var(--bg-surface-alt);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}
.btn-whatsapp {
    background-color: #25d366;
    color: white !important;
}
.btn-whatsapp:hover {
    background-color: #1ebe57;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 6rem 0 5rem 0;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, var(--primary-light) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(240,189,71,0.05) 0%, transparent 50%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.25;
}
.hero-title span {
    color: var(--primary);
}

.hero-description {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- Styled Medical Frame / Visual Card --- */
.hero-visual {
    position: relative;
}
.medical-frame {
    background: var(--bg-surface);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}
.medical-frame::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    border: 2px dashed var(--secondary);
    opacity: 0.3;
    border-radius: 24px;
    z-index: -1;
}

.badge-trust {
    background: #fff8e7;
    border: 1px solid #ffe3a8;
    color: #b25e00;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}
[data-theme="dark"] .badge-trust {
    background: rgba(240, 189, 71, 0.1);
    border-color: rgba(240, 189, 71, 0.2);
    color: var(--accent);
}

/* --- Features & Services --- */
.section {
    padding: 5rem 0;
}
.section-alt {
    background-color: var(--bg-surface-alt);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}
.section-subtitle {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.service-card:hover::before {
    height: 100%;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* --- Informational Steps (How it works) --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.step-card {
    position: relative;
    text-align: center;
    padding: 2rem;
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
.step-num {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- FAQ Accordion --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}
.faq-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-family: var(--font-display);
}
.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 1px solid transparent;
}
.faq-item.open .faq-body {
    max-height: 500px; /* high fallback */
}
.faq-item.open .faq-content {
    border-top: 1px solid var(--border-color);
}
.faq-item.open .faq-icon {
    transform: rotate(180deg);
    background: var(--primary);
    color: white;
}

/* --- Custom Contact Form & Trust Info --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}
.contact-info-card {
    background: var(--primary);
    color: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-lg);
}
.contact-info-card h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
.contact-info-card p {
    color: rgba(255, 255, 255, 0.8);
}
.info-list {
    list-style: none;
    margin: 2.5rem 0;
}
.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    align-items: center;
}
.info-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.info-text strong {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
}
.info-text span {
    font-size: 1.05rem;
    font-weight: 600;
}

.contact-form-wrapper {
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-md);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface-alt);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px var(--primary-light);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Form success message */
.form-success-msg {
    display: none;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
}

/* --- Real interactive Blog elements --- */
.blog-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.blog-card {
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.blog-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}
.blog-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
}
.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    gap: 15px;
}
.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.blog-card-title a {
    color: var(--text-primary);
}
.blog-card-title a:hover {
    color: var(--primary);
}
.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.blog-card-more {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
}

/* --- Full Article Page Styling --- */
.article-header {
    padding: 4rem 0 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.article-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.article-body {
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
}
.article-body h2 {
    font-size: 1.65rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}
.article-body h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-body p {
    margin-bottom: 1.5rem;
}
.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}
.article-body li {
    margin-bottom: 0.5rem;
}
.article-body blockquote {
    border-right: 5px solid var(--primary);
    background: var(--bg-surface-alt);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* --- Floating Whatsapp Button --- */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.45);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.floating-whatsapp:hover {
    transform: scale(1.1) rotate(5deg);
}

/* --- Footer --- */
.site-footer {
    background-color: #121c19;
    color: #e2ede9;
    padding: 5rem 0 2rem 0;
    border-top: 1px solid #1a2a25;
}
[data-theme="dark"] .site-footer {
    background-color: #070d0b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}
.footer-logo {
    color: white;
    margin-bottom: 1.5rem;
}
.footer-logo .logo-icon {
    background: var(--primary);
}
.footer-description {
    color: #a3b8b1;
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-title {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.75rem;
}
.footer-links a {
    color: #a3b8b1;
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: white;
    padding-right: 5px;
}
.footer-bottom {
    border-top: 1px solid #1a2a25;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #79948c;
    font-size: 0.85rem;
}

/* --- Mobile Menu Button --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 999;
    }
    .nav-menu.open {
        right: 0;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    .hero-title { font-size: 2.1rem; }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
    }
}
