/* =============================================
   SOS Médecins Ouarzazate
   Design matching medic-128.webflow.io
   ============================================= */

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

:root {
    --primary: #E05A76;
    --primary-dark: #CC3F5E;
    --primary-light: #FDF0F3;
    --teal: #4FBDBA;
    --teal-dark: #3AA8A5;
    --teal-light: #E8F8F7;
    --navy: #1A1C3A;
    --text: #1A1C3A;
    --text-secondary: #6E7191;
    --bg: #FFFFFF;
    --bg-light: #F9FAFB;
    --border: #EFF0F6;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 5px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --whatsapp: #25D366;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section Headers (medic-128 style) --- */
.section-header {
    text-align: center;
    max-width: 540px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: 'Bitter', serif;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy);
}

/* --- Buttons (medic-128 style: coral gradient with striped pattern) --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 34px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #E8758A 100%);
    color: #fff;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(255,255,255,0.12) 3px,
        rgba(255,255,255,0.12) 6px
    );
    border-radius: 0 50px 50px 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224,90,118,0.35);
}

.btn-text {
    background: none;
    color: var(--navy);
    padding: 16px 8px;
    font-weight: 600;
}

.btn-text:hover {
    color: var(--primary);
    gap: 14px;
}

.btn-full { width: 100%; justify-content: center; }

/* --- Navbar (medic-128 style: clean white, outline CTA) --- */
.navbar {
    background: #fff;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow);
}

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

.logo { display: flex; align-items: center; }

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar.scrolled .logo-img { height: 70px; }

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

.nav-links a {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

/* Outline CTA like medic-128 */
.nav-cta {
    border: 1.5px solid var(--navy);
    color: var(--navy);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--navy);
    color: #fff;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 26px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 3px;
    transition: var(--transition);
}

/* --- Hero (medic-128 style) --- */
.hero {
    padding: 60px 0 80px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 520px;
}

.hero-content h1 {
    font-family: 'Bitter', serif;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--navy);
    margin-bottom: 24px;
}

/* Underline accent like medic-128 */
.text-underline {
    position: relative;
    display: inline-block;
}

.text-underline::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 12px;
    background: var(--teal);
    opacity: 0.3;
    border-radius: 4px;
    z-index: -1;
}

.hero-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 460px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Hero Image area with arc (like medic-128) */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 520px;
}

.hero-arc {
    position: absolute;
    top: 0;
    right: -40px;
    width: 440px;
    height: 480px;
    background: var(--teal-light);
    border-radius: 220px 220px 0 0;
    z-index: 0;
}

.hero-doctor-placeholder {
    position: relative;
    z-index: 1;
    width: 280px;
    height: 380px;
    background: linear-gradient(180deg, var(--teal) 0%, var(--teal-dark) 100%);
    border-radius: 140px 140px 30px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 0;
}

.hero-doctor-placeholder i {
    font-size: 7rem;
    opacity: 0.35;
}

/* Floating card like "Find a doctor" in medic-128 */
.hero-float-card {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 3;
    min-width: 250px;
}

.hero-float-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 18px;
}

.float-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.float-card-item + .float-card-item {
    border-top: 1px solid var(--border);
}

.float-avatar {
    width: 40px;
    height: 40px;
    background: var(--teal-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.float-card-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
}

.hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

/* --- How It Works (Step by step - medic-128 style) --- */
.how-it-works {
    padding: 100px 0;
    background: #fff;
}

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

.step-card {
    text-align: center;
    padding: 32px 20px;
}

.step-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--teal-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1.6rem;
    margin: 0 auto;
    transition: var(--transition);
}

.step-card:hover .step-icon {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 8px 24px rgba(79,189,186,0.3);
}

.step-number {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-card h3 {
    font-family: 'Bitter', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Services (Department cards - medic-128 style) --- */
.services {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.service-card {
    background: #fff;
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid var(--border);
    text-align: center;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: transparent;
}

.service-icon {
    width: 72px;
    height: 72px;
    background: var(--teal-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--teal);
    margin: 0 auto 22px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--teal);
    color: #fff;
}

.service-card h3 {
    font-family: 'Bitter', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
}

.service-link:hover { gap: 10px; }

/* --- Why Us (image left, content right like medic-128) --- */
.why-us {
    padding: 100px 0;
    background: #fff;
}

.why-us-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 70px;
    align-items: center;
}

.why-image-wrapper {
    position: relative;
}

.why-placeholder {
    width: 100%;
    height: 460px;
    background: linear-gradient(135deg, var(--teal-light) 0%, #D4F1F0 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 6rem;
    opacity: 0.5;
}

.why-badge {
    position: absolute;
    bottom: -16px;
    right: -16px;
    background: var(--primary);
    color: #fff;
    padding: 18px 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.why-badge-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Bitter', serif;
}

.why-badge-text {
    font-size: 0.82rem;
    opacity: 0.9;
}

.why-us-content .section-tag { margin-bottom: 12px; }

.why-us-content h2 {
    font-family: 'Bitter', serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 18px;
}

.why-desc {
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 1rem;
    line-height: 1.8;
}

.why-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.why-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.why-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--teal-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.why-feature:hover .why-feature-icon {
    background: var(--teal);
    color: #fff;
}

.why-feature h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.why-feature p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Stats (clean, light bg) --- */
.stats {
    padding: 70px 0;
    background: var(--teal);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item { padding: 20px; color: #fff; }

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Bitter', serif;
    display: inline;
}

.stat-suffix {
    font-size: 1.6rem;
    font-weight: 700;
    display: inline;
    opacity: 0.85;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 4px;
}

/* --- Testimonials (medic-128 card style) --- */
.testimonials {
    padding: 100px 0;
    background: var(--bg-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.testimonial-card {
    background: #fff;
    padding: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.testimonial-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

/* --- Contact (clean form like medic-128 consultation form) --- */
.contact {
    padding: 100px 0;
    background: #fff;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info .section-tag { margin-bottom: 12px; }

.contact-info h2 {
    font-family: 'Bitter', serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 0.98rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--teal-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-detail strong {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-detail a,
.contact-detail span {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
}

.contact-detail a:hover { color: var(--primary); }

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--radius-xl);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group { margin-bottom: 16px; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #B0B7C3;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(79,189,186,0.1);
}

.form-group textarea { resize: vertical; }
.form-group select { cursor: pointer; }

/* --- Footer (clean dark) --- */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo { margin-bottom: 16px; }

.footer-logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-about p {
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul a {
    font-size: 0.88rem;
    opacity: 0.7;
}

.footer-col ul a:hover { opacity: 1; color: var(--primary); }

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i { color: var(--primary); width: 18px; text-align: center; }

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.82rem;
    opacity: 0.5;
}

/* --- Floating Buttons --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--whatsapp);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 20px rgba(37,211,102,0.4);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
    70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.phone-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 6px 20px rgba(224,90,118,0.4);
    z-index: 999;
    animation: pulse-pink 2s infinite;
}

@keyframes pulse-pink {
    0% { box-shadow: 0 0 0 0 rgba(224,90,118,0.4); }
    70% { box-shadow: 0 0 0 14px rgba(224,90,118,0); }
    100% { box-shadow: 0 0 0 0 rgba(224,90,118,0); }
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-text { margin: 0 auto 36px; }
    .hero-buttons { justify-content: center; }
    .hero-image { display: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .why-us-inner { grid-template-columns: 1fr; }
    .why-us-image { order: -1; }
    .why-placeholder { height: 320px; }
    .contact-inner { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .nav-cta { display: none; }
    .hamburger { display: flex; }
    .hero { padding: 40px 0 60px; }
    .hero-content h1 { font-size: 2.2rem; }
    .section-header h2 { font-size: 2rem; }
    .services-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 28px 20px; }
    .phone-float { display: flex; }
    .why-us-content h2,
    .contact-info h2 { font-size: 2rem; }
    .how-it-works, .services, .why-us, .testimonials, .contact { padding: 70px 0; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.9rem; }
    .hero-text { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .stat-number { font-size: 2.2rem; }
    .steps-grid { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.7rem; }
}
