/* ============================================
   شركة لزز للمقاولات المعمارية
   Complete Design System CSS
   v2.0 — Full Project
============================================ */

:root {
    --primary-900: #0c4a6e;
    --primary-700: #0369a1;
    --primary-600: #0284c7;
    --primary-500: #0ea5e9;

    --gold-50:  #fffbeb;
    --gold-100: #fef3c7;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;

    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;

    --radius-sm:  0.5rem;
    --radius-md:  0.75rem;
    --radius-lg:  1rem;
    --radius-xl:  1.25rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
}

/* ============================================
   BASE
============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    color: var(--slate-700);
    background: #fff;
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', sans-serif;
    color: var(--slate-900);
    font-weight: 800;
    line-height: 1.2;
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }
address { font-style: normal; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--gold-500); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-600); }

/* Focus ring */
:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================
   NAVIGATION
============================================ */

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate-700);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gold-500);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-600);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-link {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--slate-700);
    transition: all 0.3s ease;
    text-decoration: none;
}

.mobile-link:hover,
.mobile-link.active {
    background: var(--slate-50);
    color: var(--gold-600);
}

/* ============================================
   BUTTONS
============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-700) 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.3); color: #fff !important; }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--slate-900) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--slate-200);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--gold-500);
    color: var(--gold-600) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: white !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    text-decoration: none;
    white-space: nowrap;
}

.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,158,11,0.45); color: white !important; }
.btn-gold:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-white-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: white !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    white-space: nowrap;
}

.btn-white-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
    color: white !important;
}

/* ============================================
   UTILITIES
============================================ */

.rtl-arrow { transform: scaleX(-1); }

.bg-grid-pattern {
    background-image:
        linear-gradient(to right,  rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

/* ============================================
   TRUST BADGES
============================================ */

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1.5px solid var(--slate-200);
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-700);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    border-color: var(--gold-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============================================
   STATS
============================================ */

.stat-box {
    border-right: 3px solid var(--gold-500);
    padding-right: 1.25rem;
}

.stat-number {
    font-family: 'Tajawal', sans-serif;
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--slate-900);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-500);
}

/* ============================================
   SECTION HEADINGS
============================================ */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--gold-500);
    border-radius: 10px;
}

.section-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--slate-900);
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .section-title { font-size: 3rem; }
}

.section-description {
    font-size: 1.125rem;
    color: var(--slate-600);
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.75;
}

/* ============================================
   FLOATING BADGES (Hero)
============================================ */

.floating-badge {
    position: absolute;
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border: 1px solid var(--slate-100);
    backdrop-filter: blur(10px);
    animation: float 3s ease-in-out infinite;
}

.badge-1 { top: 2.5rem; right: -2rem; z-index: 10; }
.badge-2 { bottom: 4rem; left: -1.5rem; max-width: 220px; z-index: 10; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }

@keyframes progress {
    from { transform: scaleX(0); transform-origin: right; }
    to   { transform: scaleX(1); transform-origin: right; }
}

.animate-progress { animation: progress 2s ease-out; }

/* ============================================
   SERVICE CARDS
============================================ */

.service-card {
    background: white;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-50) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover { transform: translateY(-8px); box-shadow: 0 24px 56px rgba(0,0,0,0.12); border-color: var(--gold-500); }
.service-card:hover::before { opacity: 1; }

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-50) 0%, var(--gold-100) 100%);
    color: var(--gold-600);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.service-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.service-description {
    font-size: 0.95rem;
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold-600);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.service-card:hover .service-link { gap: 0.75rem; }

/* ============================================
   PROJECT CARDS
============================================ */

.project-card {
    display: block;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--slate-200);
    text-decoration: none;
}

.project-card:hover { transform: translateY(-8px); box-shadow: 0 24px 56px rgba(0,0,0,0.15); border-color: var(--gold-500); }

.project-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--slate-200);
}

.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.project-card:hover .project-image img { transform: scale(1.08); }

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.8) 0%, rgba(15,23,42,0) 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay { opacity: 1; }

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold-500);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}

.project-content { padding: 1.5rem; }

.project-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-title { color: var(--gold-600); }

.project-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--slate-500);
    margin-bottom: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold-600);
    transition: all 0.3s ease;
}

.project-card:hover .project-link { gap: 0.75rem; }

/* ============================================
   MASONRY GRID (Projects Index)
============================================ */

.masonry-grid {
    columns: 1;
    column-gap: 1.5rem;
}

@media (min-width: 640px)  { .masonry-grid { columns: 2; } }
@media (min-width: 1024px) { .masonry-grid { columns: 3; } }

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* ============================================
   LIGHTBOX
============================================ */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fade-in 0.25s ease;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.lightbox-inner img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-xl);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 1.25rem;
}

.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { right: -3.5rem; }
.lightbox-next { left: -3.5rem; }

.lightbox-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lightbox-thumb {
    width: 56px;
    height: 56px;
    border-radius: 0.5rem;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    opacity: 0.6;
}

.lightbox-thumb.active,
.lightbox-thumb:hover { border-color: var(--gold-500); opacity: 1; }

/* ============================================
   BLOG CARDS
============================================ */

.blog-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: white;
    border: 1px solid var(--slate-200);
    transition: all 0.35s ease;
    text-decoration: none;
    display: block;
}

.blog-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(15,16,53,0.10); }

.blog-card img { transition: transform 0.5s ease; width: 100%; object-fit: cover; }
.blog-card:hover img { transform: scale(1.04); }

/* ============================================
   BLOG / ARTICLE CONTENT
============================================ */

.article-content {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--slate-700);
}

.article-content h2 {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--slate-900);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-500);
}

.article-content h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-content p { margin-bottom: 1.4rem; }

.article-content ul,
.article-content ol { margin-bottom: 1.4rem; padding-right: 1.5rem; }

.article-content li { margin-bottom: 0.6rem; }
.article-content ul li::marker { color: var(--gold-500); }

.article-content blockquote {
    border-right: 4px solid var(--gold-500);
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, var(--gold-50), #fefce8);
    border-radius: 0.5rem;
    font-style: italic;
    color: var(--slate-700);
    border-radius: var(--radius-md);
}

.article-content img {
    border-radius: var(--radius-xl);
    margin: 2rem auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    width: 100%;
    height: auto;
}

.article-content a { color: var(--gold-600); text-decoration: underline; transition: color 0.3s ease; }
.article-content a:hover { color: var(--gold-700); }

.article-content strong { font-weight: 800; color: var(--slate-900); }

.article-content code {
    background: var(--slate-100);
    color: var(--slate-800);
    padding: 0.15em 0.45em;
    border-radius: 0.3rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.article-content pre {
    background: var(--slate-900);
    color: var(--slate-100);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 1.4rem;
    direction: ltr;
    text-align: left;
}

.article-content pre code { background: transparent; color: inherit; padding: 0; font-size: 0.9rem; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.4rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.article-content thead { background: linear-gradient(135deg, var(--slate-800), var(--slate-900)); color: white; }
.article-content th { padding: 0.875rem 1.25rem; font-weight: 700; font-size: 0.9rem; }
.article-content td { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--slate-200); }
.article-content tbody tr:nth-child(even) { background: var(--slate-50); }
.article-content tbody tr:hover { background: var(--gold-50); }

/* Share Buttons */
.share-button {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid var(--slate-200);
    background: white;
    color: var(--slate-600);
    text-decoration: none;
}

.share-button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.share-button.facebook:hover { background: #1877f2; border-color: #1877f2; color: white; }
.share-button.twitter:hover  { background: #000;    border-color: #000;    color: white; }
.share-button.linkedin:hover { background: #0077b5; border-color: #0077b5; color: white; }
.share-button.whatsapp:hover { background: #25d366; border-color: #25d366; color: white; }
.share-button.copy:hover     { background: var(--gold-500); border-color: var(--gold-500); color: white; }

/* ============================================
   FAQ
============================================ */

.faq-item {
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.faq-item.open {
    border-color: var(--gold-400);
    box-shadow: 0 8px 32px rgba(245,158,11,0.10);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: right;
    gap: 1rem;
    transition: background 0.3s ease;
}

.faq-trigger:hover { background: var(--slate-50); }
.faq-item.open .faq-trigger { background: var(--gold-50); }

.faq-question {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--slate-900);
    text-align: right;
    line-height: 1.4;
}

.faq-item.open .faq-question { color: var(--gold-700); }

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: var(--slate-500);
}

.faq-item.open .faq-icon {
    background: var(--gold-500);
    color: white;
    transform: rotate(45deg);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-body.open { max-height: 600px; }

.faq-answer {
    padding: 0 1.75rem 1.75rem;
    font-size: 0.95rem;
    color: var(--slate-600);
    line-height: 1.8;
}

/* ============================================
   PAGINATION
============================================ */

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.pagination-btn {
    min-width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.875rem;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--slate-200);
    background: white;
    color: var(--slate-700);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover { border-color: var(--gold-500); color: var(--gold-600); transform: translateY(-1px); }

.pagination-btn.active {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(245,158,11,0.35);
}

.pagination-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.pagination-btn.disabled:hover { transform: none; border-color: var(--slate-200); color: var(--slate-700); }

/* ============================================
   CONTACT FORM
============================================ */

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.95rem;
    color: var(--slate-900);
    background: white;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--slate-400); }

.form-input.error,
.form-textarea.error,
.form-select.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.10); }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
}

.form-label .required { color: #ef4444; margin-right: 0.25rem; }

.form-error { font-size: 0.8rem; color: #ef4444; margin-top: 0.35rem; display: block; }
.form-success { font-size: 0.8rem; color: #22c55e; margin-top: 0.35rem; display: block; }

/* Character counter */
.char-counter { font-size: 0.8rem; color: var(--slate-400); text-align: left; margin-top: 0.25rem; }
.char-counter.warn { color: #f59e0b; }
.char-counter.over { color: #ef4444; }

/* ============================================
   SIDEBAR WIDGETS
============================================ */

.sidebar-widget {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 1.75rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.sidebar-widget-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--slate-900);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--slate-100);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-500);
    flex-shrink: 0;
}

/* Popular Post in Sidebar */
.popular-post-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--slate-100);
    transition: all 0.3s ease;
    text-decoration: none;
}

.popular-post-item:last-child { border-bottom: none; }
.popular-post-item:hover { transform: translateX(-4px); }

.popular-post-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.popular-post-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--slate-900);
    line-height: 1.4;
    margin-bottom: 0.35rem;
    transition: color 0.3s ease;
}

.popular-post-item:hover .popular-post-title { color: var(--gold-600); }
.popular-post-meta { font-size: 0.8rem; color: var(--slate-400); display: flex; align-items: center; gap: 0.5rem; }

/* Tags Cloud */
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--slate-100);
    color: var(--slate-700);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid transparent;
}

.tag-pill:hover {
    background: var(--gold-500);
    color: white;
    border-color: var(--gold-500);
    transform: translateY(-1px);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
    border-radius: var(--radius-3xl);
    padding: 1.75rem;
    border: 1px solid var(--slate-700);
}

.newsletter-widget input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--slate-600);
    background: var(--slate-700);
    color: white;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.9rem;
    direction: rtl;
    transition: border-color 0.3s ease;
}

.newsletter-widget input::placeholder { color: var(--slate-400); }
.newsletter-widget input:focus { outline: none; border-color: var(--gold-500); }

/* ============================================
   FILTER TABS (Projects)
============================================ */

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    border: 2px solid var(--slate-200);
    background: white;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover { border-color: var(--gold-400); color: var(--gold-600); }

.filter-tab.active {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(15,23,42,0.2);
}

.filter-tab .count {
    background: rgba(255,255,255,0.15);
    color: inherit;
    font-size: 0.75rem;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
}

.filter-tab:not(.active) .count {
    background: var(--slate-100);
    color: var(--slate-500);
}

/* ============================================
   AUTHOR CARD
============================================ */

.author-card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 1.75rem;
    border: 1px solid var(--slate-200);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--gold-400);
}

.author-name {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--slate-900);
    margin-bottom: 0.35rem;
}

.author-role {
    font-size: 0.8rem;
    color: var(--gold-600);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.author-stat {
    background: var(--slate-50);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    text-align: center;
}

.author-stat-val {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--slate-900);
}

.author-stat-lbl { font-size: 0.75rem; color: var(--slate-500); font-weight: 600; }

/* ============================================
   PREV / NEXT POST NAV
============================================ */

.post-nav-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--slate-200);
    background: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-nav-card:hover {
    border-color: var(--gold-500);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.post-nav-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.post-nav-label { font-size: 0.75rem; font-weight: 700; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.post-nav-title { font-weight: 800; font-size: 0.9rem; color: var(--slate-900); line-height: 1.4; transition: color 0.3s ease; }
.post-nav-card:hover .post-nav-title { color: var(--gold-600); }

/* ============================================
   FOOTER
============================================ */

.footer-input {
    flex: 1;
    min-width: 220px;
    background: white;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.95rem;
    color: var(--slate-900);
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
}

.footer-input:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(245,158,11,0.1); }

.footer-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.0625rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }

.footer-links a {
    color: var(--slate-400);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
}

.footer-links a::before { content: '‹'; color: var(--gold-500); font-weight: bold; line-height: 1; }
.footer-links a:hover { color: white; transform: translateX(-4px); }

.footer-contacts { list-style: none; display: flex; flex-direction: column; gap: 1rem; }

.footer-contacts li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--slate-400);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-contacts a { color: var(--slate-400); transition: color 0.3s ease; text-decoration: none; }
.footer-contacts a:hover { color: white; }

.footer-social {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.125rem;
}

.footer-social:hover {
    background: var(--gold-500);
    border-color: var(--gold-500);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   WHATSAPP FLOAT
============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(37,211,102,0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover { transform: scale(1.1) translateY(-4px); box-shadow: 0 12px 36px rgba(37,211,102,0.6); }

.whatsapp-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.6;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0%       { transform: scale(1);   opacity: 0.6; }
    70%, 100% { transform: scale(1.4); opacity: 0;   }
}

/* ============================================
   BACK TO TOP BUTTON
============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--slate-900);
    border: 2px solid var(--slate-700);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.back-to-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { background: var(--gold-500); border-color: var(--gold-500); transform: translateY(-2px); }

/* ============================================
   TOAST NOTIFICATION
============================================ */

.toast {
    position: fixed;
    top: 6rem;
    right: 1.5rem;
    z-index: 9998;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    animation: slide-in-right 0.4s cubic-bezier(0.4,0,0.2,1);
    max-width: 340px;
}

.toast.success { background: #22c55e; }
.toast.error   { background: #ef4444; }
.toast.info    { background: var(--gold-500); }

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   LOADING SKELETON
============================================ */

.skeleton {
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   ANIMATIONS
============================================ */

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s cubic-bezier(0.4,0,0.2,1) forwards;
    opacity: 0;
}

.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }

/* Intersection Observer reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 640px) {
    .badge-1, .badge-2 { display: none; }
    .stat-number       { font-size: 1.875rem; }
    .section-title     { font-size: 2rem; }
    .footer-input      { min-width: 0; }
    .toast             { right: 1rem; left: 1rem; max-width: none; }
    .lightbox-prev, .lightbox-next { display: none; }
}

@media (max-width: 1024px) {
    .whatsapp-float { width: 56px; height: 56px; bottom: 1.5rem; left: 1.5rem; }
    .back-to-top    { bottom: 1.5rem; right: 1.5rem; }
}

@media print {
    .whatsapp-float, .back-to-top, .nav-link::after { display: none; }
    body { color: #000; }
}
