/* 
    ClinicFlow Website Design System
    Developer: Hossam Elbesh
*/

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

:root {
    /* Light Mode Tokens */
    --primary: #1A73E8;
    --primary-light: #4c8df5;
    --secondary: #00BFA5;
    --bg-system: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-main: #1E293B;
    --text-sub: #64748B;
    --sidebar-bg: #0F1B2D;
    --border: #E2E8F0;
    --gradient: linear-gradient(135deg, #1A73E8 0%, #00BFA5 100%);
    --hero-overlay: radial-gradient(circle at top right, rgba(26, 115, 232, 0.05), transparent), linear-gradient(180deg, rgba(248, 250, 252, 0.7) 0%, rgba(248, 250, 252, 0.98) 100%);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Mode Tokens */
    --bg-system: #0F172A;
    --bg-card: #1E293B;
    --text-main: #F1F5F9;
    --text-sub: #94A3B8;
    --hero-overlay: radial-gradient(circle at top right, rgba(0, 191, 165, 0.1), transparent), linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 1) 100%);
    --border: #334155;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

/* RTL Support */
[lang="ar"] {
    direction: rtl;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(var(--bg-system), 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 80px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
}

.logo img {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover img {
    transform: scale(1.1) rotate(3deg);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
}

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

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

.mobile-only {
    display: none;
}

/* Sidebar overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.4);
}

.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    font-size: 1.2rem;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-icon i {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    padding: 200px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-system);
}

.hero-badge {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(to bottom, var(--text-main) 60%, var(--text-sub));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-sub);
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

/* Slider Mockup */
.hero-slider-container {
    margin-top: 5rem;
    position: relative;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    background: var(--sidebar-bg);
    border-radius: clamp(16px, 3vw, 32px);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slider-container:hover {
    box-shadow: 0 30px 60px -15px rgba(26, 115, 232, 0.25);
    transform: translateY(-8px);
    border-color: rgba(26, 115, 232, 0.3);
}

.swiper {
    width: 100%;
    height: auto;
    border-radius: clamp(12px, 2.5vw, 24px);
}

@keyframes floatBanner {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: clamp(12px, 2.5vw, 24px);
    animation: floatBanner 8s ease-in-out infinite;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

.swiper-slide:hover img {
    transform: scale(1.02) translateY(-5px);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.15));
    animation-play-state: paused;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--secondary) !important;
    opacity: 1;
    width: 25px !important;
    border-radius: 5px !important;
}

/* Features Grid */
.section-padding {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

[data-theme="dark"] .feature-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(51, 65, 85, 0.5);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(26, 115, 232, 0.15);
    border-color: transparent;
}

.feature-card:hover h3 {
    color: var(--primary);
}

[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0%, rgba(0, 191, 165, 0.1) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.7rem;
    transition: var(--transition);
    border: 1px solid rgba(26, 115, 232, 0.1);
}

.feature-card:hover .feature-icon {
    background: var(--gradient);
    color: white;
    transform: rotate(5deg) scale(1.1);
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    transition: var(--transition);
}

.feature-card p {
    color: var(--text-sub);
    font-size: 0.95rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

[lang="en"] .feature-list {
    text-align: left;
}

.feature-list li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.5;
}

[lang="en"] .feature-list li {
    padding-right: 0;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 8px;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
    transition: var(--transition);
}

[lang="en"] .feature-list li::before {
    right: auto;
    left: 0;
}

.feature-card:hover .feature-list li::before {
    width: 12px;
    background: var(--primary);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.pricing-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 32px;
    border: 1px solid var(--border);
    width: 100%;
    text-align: center;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.pricing-card .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    z-index: 5;
}

.price {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 1.5rem 0;
    color: var(--text-main);
}

.price span {
    font-size: 1rem;
    color: var(--text-sub);
    font-weight: 500;
}

.pricing-features {
    list-style: none;
    text-align: right;
    margin: 2rem 0;
    flex-grow: 1;
}

[lang="en"] .pricing-features {
    text-align: left;
}

.pricing-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-sub);
    font-size: 0.95rem;
}

.pricing-features li i {
    color: var(--secondary);
    flex-shrink: 0;
}

/* Footer */
footer {
    background: var(--sidebar-bg);
    color: white;
    padding: 60px 0 30px;
    text-align: center;
}

.footer-content {
    margin-bottom: 3rem;
}

.footer-logo {
    color: white;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.copyright {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.developer-tag {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 32px;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-sub);
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary);
}

.modal-header h2 {
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.steps-list {
    list-style: none;
}

.steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(26, 115, 232, 0.05);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.3);
}

.step-text {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Responsive Fixes */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    nav {
        height: 70px;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        padding: 100px 2rem;
        z-index: 999;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
    }

    [lang="ar"] .nav-links {
        right: auto;
        left: 0;
        border-left: none;
        border-right: 1px solid var(--border);
        transform: translateX(-100%);
    }

    .nav-links.active {
        transform: translateX(0) !important;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    .hero {
        padding: 120px 0 60px;
    }
    .hero h1 {
        font-size: 2.2rem;
        padding: 0 10px;
    }
    .hero p {
        margin-bottom: 2.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-card.popular {
        transform: scale(1);
        margin: 2rem 0;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .nav-actions {
        gap: 0.75rem;
    }
    .btn-icon {
        width: 42px;
        height: 42px;
    }
    .hide-mobile {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .section-padding {
        padding: 60px 0;
    }
    .feature-card {
        padding: 1.5rem;
    }
    .price {
        font-size: 2.5rem;
    }
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    .modal-header h2 {
        font-size: 1.4rem;
    }
    .step-text {
        font-size: 0.9rem;
    }
    .logo img {
        height: 32px !important;
    }
    .logo span {
        font-size: 1.2rem;
    }
}

/* Glow Blobs */
.glow-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

[data-theme="dark"] .glow-blob {
    background: radial-gradient(circle, rgba(0, 191, 165, 0.1) 0%, transparent 70%);
}

.blob-1 {
    top: -100px;
    right: -100px;
}

.blob-2 {
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 191, 165, 0.1) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Comparison Section Styles */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.comparison-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 32px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.paper-card {
    opacity: 0.8;
}

.digital-card.active {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 115, 232, 0.05) 100%);
    opacity: 1;
    transform: scale(1.02);
}

.comparison-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.paper-icon {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-sub);
}

.digital-icon {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.2);
}

.comparison-card h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.comparison-list {
    list-style: none;
    padding: 0;
}

.comparison-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.comparison-list li i {
    margin-top: 3px;
    flex-shrink: 0;
}

@media (max-width: 850px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .digital-card.active {
        transform: scale(1);
    }
}

/* Animations */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}
