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

:root {
    --primary: #E63946;
    --primary-glow: rgba(230, 57, 70, 0.3);
    --secondary: #1D3557;
    --whatsapp: #25D366;
    --bg-light: #FFFFFF;
    --bg-alt: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    font-family: 'Outfit', 'Cairo', sans-serif;
}

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

/* Language Logic */
.lang-fr { display: none !important; }
body.fr .lang-fr { display: block !important; }
body.fr .lang-ar { display: none !important; }
span.lang-fr { display: none !important; }
body.fr span.lang-fr { display: inline-block !important; }
body.fr span.lang-ar { display: none !important; }
body.fr { direction: ltr; }
[dir="rtl"] { direction: rtl; }

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.8rem 0;
    z-index: 2000;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

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

.logo-container { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; flex: 1; }
.logo-img { height: 35px; width: auto; }
.logo-text { font-size: 1.1rem; font-weight: 700; }
.logo-text span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; flex: 2; justify-content: center; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 0.85rem; transition: var(--transition); }
.nav-links a:hover { color: var(--primary); }
.nav-right { display: flex; align-items: center; gap: 1rem; flex: 1; justify-content: flex-end; }

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    background: var(--bg-alt);
    transition: var(--transition);
}
.lang-switch:hover { background: #f1f5f9; color: var(--primary); }
.lang-switch svg { width: 18px; height: 18px; fill: currentColor; }

.nav-call-btn { padding: 0.5rem 1.2rem !important; font-size: 0.8rem !important; border-radius: 12px !important; }
body.fr .nav-call-btn.lang-fr { display: block !important; }
body:not(.fr) .nav-call-btn.lang-ar { display: block !important; }
.nav-call-btn.lang-ar, .nav-call-btn.lang-fr { display: none !important; }

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 3000;
}
.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
    border-radius: 2px;
}
.mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 160px 0 100px;
    background: #000;
    color: white;
    text-align: center;
}

.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%); z-index: 2; }
.hero .container { position: relative; z-index: 5; max-width: 850px; animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.1; margin-bottom: 1.8rem; font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.hero h1 span { color: var(--primary); background: linear-gradient(120deg, var(--primary) 0%, #ff6b6b 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.hero p { font-size: 1.25rem; margin-bottom: 2.5rem; opacity: 0.95; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.6; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* Hero Badges */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 4rem;
}
.badge-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}
.badge-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}
.badge-icon { font-size: 1.2rem; }
.badge-label { font-size: 0.9rem; font-weight: 600; color: white; }

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge-24 { background: rgba(230, 57, 70, 0.15); border: 1px solid var(--primary); color: white; padding: 0.6rem 1.2rem; border-radius: 50px; font-size: 0.85rem; font-weight: 700; margin-bottom: 2rem; display: inline-block; backdrop-filter: blur(5px); animation: pulse-red 2s infinite; }

@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(230, 57, 70, 0); } 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); } }

/* Stats Bar */
.stats-bar {
    background: white;
    padding: 2.5rem 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
    margin-top: -40px;
    border-radius: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid { display: flex; justify-content: space-around; align-items: center; text-align: center; }
.stat-item h3 { font-size: 2.2rem; color: var(--primary); font-weight: 700; margin-bottom: 0.2rem; }
.stat-item p { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; }

/* About New Section (Image Based) */
.about-new {
    padding: 8rem 0 4rem;
    background-color: #F0FDFA;
    position: relative;
    overflow: hidden;
}
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    height: 480px; /* Fixed height container to act as a window */
}
.about-image img {
    width: 110%; /* Slightly wider to allow centering and covering */
    height: 115%; /* Taller to push the bottom part (with the badge) out of the container */
    object-fit: cover;
    object-position: center top; /* Keep the top of the image (ambulance) visible */
    transform: rotate(2deg);
    transition: var(--transition);
    margin-left: -5%;
    margin-top: -5%;
}
.about-image img:hover { transform: rotate(0deg) scale(1.05); }

.blob-bg {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.1) 0%, rgba(45, 212, 191, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}
.about-new .container { position: relative; z-index: 5; }
.about-new-content { max-width: 100%; }

/* New Stats Section */
.new-stats {
    padding: 0 0 8rem;
    background-color: #F0FDFA;
}
.new-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

@media (max-width: 992px) {
    .about-grid { 
        display: flex !important;
        flex-direction: column !important;
        text-align: center; 
        gap: 3rem; 
    }
    .about-image {
        order: 2 !important; /* Forces image to be after text */
        height: 350px !important; /* Adjusted height for mobile */
    }
    .about-new-content {
        order: 1 !important; /* Forces text to be first */
    }
    .new-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.sub-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2DD4BF;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}
.about-new h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.2;
    color: #0F172A;
    margin-bottom: 2rem;
    font-weight: 800;
}
.about-new .priority {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1.5rem;
}
.about-new p {
    font-size: 1.1rem;
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 2rem;
    border: 2px solid #2DD4BF;
    border-radius: 50px;
    color: #0D9488;
    text-decoration: none;
    font-weight: 700;
    margin-top: 1rem;
    transition: var(--transition);
}
.btn-learn-more:hover {
    background: #2DD4BF;
    color: white;
}
.btn-learn-more svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
[dir="rtl"] .btn-learn-more svg { transform: rotate(180deg); }

/* Service List Items */
.service-list {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
}
.service-list-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

@media (max-width: 576px) {
    .service-list { grid-template-columns: 1fr; }
}
.item-icon {
    width: 50px;
    height: 50px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.item-text h4 {
    font-size: 1.2rem;
    color: #0F172A;
    margin-bottom: 0.3rem;
    font-weight: 700;
}
.item-text p {
    font-size: 0.95rem !important;
    color: #64748B;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
}


.new-stats .stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.new-stats .stat-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 700;
}

@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-image { order: -1; }
    .new-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .new-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Services */
.services { padding: 6rem 0; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.service-card { background: white; padding: 3rem 2rem; border-radius: 24px; border: 1px solid #f1f5f9; text-align: center; transition: var(--transition); box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 30px 60px rgba(0,0,0,0.05); }
.service-icon-box { width: 60px; height: 60px; background: var(--bg-alt); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem; }
.service-icon-box svg { width: 28px; height: 28px; fill: var(--primary); }
.service-card h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--secondary); }
.service-card p { font-size: 0.95rem; color: var(--text-muted); }

/* Funeral Focus - Premium Section */
.funeral-focus {
    padding: 8rem 0;
    background: linear-gradient(135deg, #1D3557 0%, #0F172A 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.funeral-content { max-width: 900px; margin: 0 auto; position: relative; z-index: 5; }
.funeral-focus h2 { font-size: 2.2rem; margin-bottom: 2rem; font-weight: 700; }
.funeral-focus p { font-size: 1.15rem; line-height: 1.9; opacity: 0.9; }

/* Final CTA V2 (Vibrant) */
.final-cta-v2 {
    padding: 10rem 0;
    background-color: #2DD4BF; /* Vibrant teal from image */
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-blobs {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15) 0%, transparent 40%);
    pointer-events: none;
}
.cta-content-new { max-width: 800px; margin: 0 auto; position: relative; z-index: 5; }
.final-cta-v2 h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 800;
}
.final-cta-v2 p {
    font-size: 1.15rem;
    line-height: 1.8;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}
.final-cta-v2 .highlight {
    font-weight: 700;
    margin-bottom: 3rem;
}
.btn-white-cta {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 3.5rem;
    background: white;
    color: #0D9488;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.btn-white-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}
.btn-white-cta svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
[dir="rtl"] .btn-white-cta svg { transform: rotate(180deg); }

@media (max-width: 768px) {
    .final-cta-v2 { padding: 6rem 0; }
    .btn-white-cta { width: 100%; justify-content: center; padding: 1rem 2rem; }
}

/* Buttons */
.btn { padding: 0.8rem 2rem; border-radius: 50px; font-weight: 700; text-decoration: none; transition: var(--transition); display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-whatsapp { background: var(--whatsapp); color: white; }
.btn-group { display: flex; gap: 1rem; justify-content: center; }

/* Floating Call Button */
.floating-call {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px var(--primary-glow);
    z-index: 10000;
}
.floating-call svg { width: 24px; height: 24px; fill: white; }

/* Premium Footer */
.main-footer {
    padding: 6rem 0 3rem;
    background: #0F172A;
    color: white;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}
.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
}
.footer-col p {
    font-size: 0.95rem;
    color: #94A3B8;
    margin-bottom: 1rem;
    line-height: 1.7;
}
.footer-col.about .logo-text { font-size: 1.5rem; margin-bottom: 1.5rem; color: white; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a { color: #94A3B8; text-decoration: none; transition: var(--transition); font-size: 0.95rem; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #64748B;
    font-size: 0.85rem;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    .main-footer { padding: 4rem 0 2rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        z-index: 2500;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }
    .mobile-toggle { display: flex !important; min-width: 40px; height: 40px; align-items: center; justify-content: center; background: var(--bg-alt); border-radius: 10px; }
    
    /* Force hide call btn on mobile regardless of language */
    .nav-call-btn.lang-ar, .nav-call-btn.lang-fr, 
    body.fr .nav-call-btn.lang-fr,
    body:not(.fr) .nav-call-btn.lang-ar { display: none !important; }

    .lang-switch .lang-text { display: none; }
    .lang-switch svg { display: none; }
    .lang-switch::before { content: 'F'; font-weight: 800; font-family: sans-serif; color: var(--primary); }
    body.fr .lang-switch::before { content: 'A'; }
    .lang-switch { padding: 0.5rem; width: 40px; height: 40px; justify-content: center; background: var(--bg-alt); border-radius: 10px; }
    
    .hero { padding: 120px 0 60px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .hero-badges { margin-top: 3rem; gap: 0.8rem; }
    .badge-item { padding: 0.5rem 1rem; }
    
    .stats-grid { flex-direction: column; gap: 2rem; }
    .stats-bar { margin-top: 0; border-radius: 0; max-width: 100%; }

    /* Contact Mobile Optimizations */
    .contact-page-header { padding: 100px 0 30px; }
    .info-item { flex-direction: column; text-align: center; gap: 1rem; padding: 2rem 1.5rem; }
    .info-item .btn { width: 100%; justify-content: center; }
    .info-item p { font-size: 1.1rem !important; }
}

/* Contact Page Styles - COMPACT */
.contact-page-header {
    padding: 120px 0 40px;
    background: var(--bg-alt);
    text-align: center;
}

.contact-page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.contact-page-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.contact-info-card {
    background: white;
    max-width: 700px;
    margin: 0 auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--bg-alt);
}

.info-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.info-item h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.1rem;
    color: var(--text-muted);
}

.info-item p {
    font-size: 1.3rem !important;
    font-weight: 700;
    color: var(--secondary);
}

.copyable {
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    display: inline-block;
}
.copyable:hover { color: var(--primary); }
.copy-note {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    opacity: 0.8;
}

/* Toast/Alert for Copy */
.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #0F172A;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
