/* ==========================================================================
   Style Washer - المركز المعتمد لصيانة الغسالات
   ========================================================================== */

/* 1. المتغيرات الهيكلية والألوان (CSS Variables)
   -------------------------------------------------------------------------- */
:root {
    --primary: #0284c7;         /* أزرق مائي ديناميكي */
    --primary-dark: #0369a1;    /* أزرق داكن للنصوص والعناوين */
    --primary-hover: #075985;   /* درجة أغمق للتفاعل */
    --secondary: #0f172a;       /* داكن جداً خلفيات الفوتر والنصوص الرئيسية */
    --accent: #22c55e;          /* أخضر للتحويل والواتساب والخصومات */
    --accent-hover: #16a34a;
    --bg-light: #f8fafc;        /* خلفية عامة مريحة للعين */
    --bg-card: #ffffff;         /* خلفية البطاقات */
    --text-main: #334155;       /* لون النص الأساسي */
    --text-muted: #64748b;      /* لون النصوص الثانوية */
    --border-color: #e2e8f0;    /* حدود خفيفة */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;             /* زوايا منحنية حديثة */
    --transition: all 0.3s ease;
}

/* 2. التنسيقات العامة والنصوص
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}
figure {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

figure img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

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

/* إخفاء القفز للقارئ الآلي */
.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100;
}
.skip-link:focus {
    top: 0;
}

/* 3. العناوين (Headings)
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}

h1 {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    position: relative;
    padding-right: 15px;
    margin-top: 35px;
}

h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 5px;
    background: var(--primary);
    border-radius: 4px;
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--secondary);
    margin-top: 25px;
}

p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* 4. الهيدر والقائمة الملاحة (Header & Nav)
   -------------------------------------------------------------------------- */
header {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--border-color);
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: rgba(2, 132, 199, 0.08);
}

.cta-header {
    background: var(--primary);
    color: #fff !important;
    border-radius: 20px !important;
    padding: 8px 18px !important;
}

.cta-header:hover {
    background: var(--primary-dark) !important;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--secondary);
}

/* 5. قسم البطل (Contact Hero & Action Card)
   -------------------------------------------------------------------------- */
.contact-hero {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #bae6fd;
    border-radius: var(--radius);
    padding: 25px;
    margin: 25px 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.contact-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff !important;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-decoration: none !important;
}

.btn-call {
    background: var(--primary);
}

.btn-call:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-wa {
    background: var(--accent);
}

.btn-wa:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* 6. جدول التكلفة والخدمات (Pricing Grid)
   -------------------------------------------------------------------------- */
.fridge-plans {
    margin: 30px 0;
}

.fridge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.fridge {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.fridge:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.fridge__top {
    padding: 20px;
    background: #f1f5f9;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.fridge--blue .fridge__top { background: #e0f2fe; }
.fridge--green .fridge__top { background: #dcfce7; }
.fridge--purple .fridge__top { background: #f3e8ff; }

.fridge__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #ffffff;
    color: var(--text-main);
}

.fridge__title {
    margin: 10px 0 5px 0;
    font-size: 1.25rem;
}

.fridge__price {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fridge__num {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fridge__cur {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
}

.fridge__per {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fridge__body {
    padding: 20px;
    flex: 1;
}

.fridge__list {
    list-style: none;
}

.fridge__list li {
    position: relative;
    padding-right: 22px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.fridge__list li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--accent);
    font-weight: bold;
}

/* 7. فهرس المحتويات (TOC Box)
   -------------------------------------------------------------------------- */
.toc-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.toc-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    user-select: none;
}

.toc-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--secondary);
}

#toc-list {
    list-style: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

#toc-list li {
    margin-bottom: 8px;
    padding-right: 10px;
}

#toc-list a {
    color: var(--text-main);
    font-size: 0.95rem;
}

#toc-list a:hover {
    color: var(--primary);
}

/* 8. الجداول الاحترافية (Tables)
   -------------------------------------------------------------------------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

table, .service-data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    text-align: right;
    font-size: 0.95rem;
}

table th, table td, .service-data-table th, .service-data-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
}

table th, .service-data-table th {
    background: #f1f5f9;
    color: var(--secondary);
    font-weight: 700;
}

table tbody tr:nth-child(even), .service-data-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

table tbody tr:hover {
    background-color: #f0f9ff;
}

/* 9. الفيديو المتوافق (Video Embed)
   -------------------------------------------------------------------------- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* نسبة 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin: 20px 0;
    background: #000;
}

.yt-lazy {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.yt-lazy img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-play {
    position: absolute;
    width: 68px;
    height: 48px;
    background-color: rgba(2, 132, 199, 0.9);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.yt-lazy:hover .yt-play {
    background-color: #ff0000;
    transform: scale(1.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 10. الأسئلة الشائعة (FAQ Accordion)
   -------------------------------------------------------------------------- */
.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-item summary {
    padding: 15px 20px;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.faq-item summary:hover {
    background: #f8fafc;
    color: var(--primary);
}

.faq-item div {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

.faq-item p {
    margin: 0;
}

/* 11. القوائم والشكل التوضيحي (Lists & Figures)
   -------------------------------------------------------------------------- */
ul, ol {
    margin-bottom: 20px;
    padding-right: 25px;
}

li {
    margin-bottom: 8px;
}

figure {
    margin: 25px 0;
    text-align: center;
}

figcaption {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* 12. الفوتر (Footer)
   -------------------------------------------------------------------------- */
footer {
    background: var(--secondary);
    color: #f8fafc;
    padding: 40px 20px 20px;
    margin-top: 50px;
}

footer h3, footer h4 {
    color: #ffffff;
}

.footer-content {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col a {
    color: #94a3b8;
}

.footer-col a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 20px;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* 13. أزرار التواصل العائمة للشاشات الصغيرة (Floating Bar)
   -------------------------------------------------------------------------- */
.float-contact-wrapper {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 90%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 35px;
    padding: 8px 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    align-items: center;
}

.float-contact-label {
    font-size: 0.75rem;
    color: #006dff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.float-pulse-dot {
    font-size: 0.6rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.float-contact-actions {
    display: flex;
    width: 100%;
    gap: 10px;
}

.float-contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border-radius: 5px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
}

.float-btn-call {
    background: var(--primary);
}

.float-btn-whatsapp {
    background: var(--accent);
}

/* 14. التجاوب مع شاشات الهواتف (Responsive Mobile View)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border-color);
    }
.float-contact-wrapper {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 90%;
    max-width: 420px;
    background: none;
    backdrop-filter: blur(8px);
    border-radius: 0px;
    padding: 1px 1px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
    .nav-links.active {
        display: flex;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    body {
        padding-bottom: 80px; /* مسافة لحماية المحتوى من الزر العائم */
    }
}