/* Gitut Static Document Styles - SEO, Blog & Generated Pages */

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

/* Global Layout & Typography */
html, body { margin: 0 !important; padding: 0 !important; width: 100%; height: 100%; position: relative; overflow-x: hidden; }
#root { margin: 0 !important; padding: 0 !important; width: 100%; min-height: 100%; }
body { background-color: #f8fafc; color: #1e293b; scroll-behavior: smooth; }

html[lang="ar"] body { font-family: 'Cairo', sans-serif !important; }
html:not([lang="ar"]) body { font-family: 'Inter', sans-serif !important; }

/* Target UI elements specifically to avoid overriding document template fonts */
html[lang="ar"] h1:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] h2:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] h3:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] h4:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] h5:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] h6:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] p:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] span:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] a:not([class*="document-preview"] *):not([class*="arabic-document-preview"] *), 
html[lang="ar"] button, 
html[lang="ar"] input, 
html[lang="ar"] select, 
html[lang="ar"] textarea, 
html[lang="ar"] .btn, 
html[lang="ar"] [role="button"], 
html[lang="ar"] .font-cairo { 
    font-family: 'Cairo', sans-serif !important; 
}

/* Static Page Structure (Blog/Article) */
.static-page-article {
    max-width: 56rem;
    margin: 3rem auto;
    background-color: white;
    border-radius: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    border: 1px solid #f1f5f9;
}

@media (min-width: 768px) {
    .static-page-article { padding: 5rem; }
}

.static-page-header {
    margin-bottom: 4rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 2.5rem;
}

.static-page-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .static-page-title { font-size: 3.75rem; }
}

.static-page-content {
    color: #334155;
    line-height: 1.625;
    font-weight: 500;
    font-size: 1.125rem;
}

.static-page-content h2 { font-weight: 900; letter-spacing: -0.025em; margin-top: 2rem; }
.static-page-content a { color: #2563eb; text-decoration: none; }
.static-page-content blockquote { background-color: #eff6ff; border-inline-start: 4px solid #3b82f6; border-radius: 1rem; padding: 1rem 1.5rem; margin: 1.5rem 0; }

.blog-list-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 2rem; margin-top: 3rem; }
@media (min-width: 768px) { .blog-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .blog-list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.blog-card {
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.blog-card:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.blog-card-body { padding: 2rem; flex-grow: 1; }
.blog-card-date { font-size: 10px; font-weight: 700; color: #0ea5e9; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 1rem; }
.blog-card-title { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-bottom: 1rem; line-height: 1.25; }
.blog-card:hover .blog-card-title { color: #0284c7; }
.blog-card-snippet { color: #64748b; font-size: 0.875rem; line-height: 1.625; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-footer { padding: 1.25rem 2rem; background-color: #f8fafc; border-top: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; }
.read-more-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: #0284c7; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; }

.header-search-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-trigger {
    width: 2.75rem;
    height: 2.75rem;
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.header-search-trigger:hover {
    background-color: #e2e8f0;
    color: #2563eb;
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .site-header {
        justify-content: flex-start;
        gap: 2rem;
    }
    
    html[lang="ar"] .site-header {
        justify-content: flex-start;
        gap: 2rem;
    }

    .header-search-box {
        margin-left: auto;
    }
    
    html[lang="ar"] .header-search-box {
        margin-left: 0;
        margin-right: auto;
    }
}

@media (max-width: 767px) {
    .header-logo {
        flex: 0 0 auto;
    }
    .header-nav {
        flex: 0 0 auto;
    }
    .header-search-box {
        flex: 1;
        display: flex;
        justify-content: center;
    }
}

/* Search Modal Styles */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.search-modal-card {
    background-color: white;
    border-radius: 2rem;
    width: 100%;
    max-width: 50rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-modal-overlay.active .search-modal-card {
    transform: translateY(0);
}

.search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
}

html[lang="ar"] .search-modal-header {
    flex-direction: row-reverse;
}

.search-modal-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
}

.search-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.search-modal-close:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

.search-modal-body {
    padding: 1.5rem;
    min-height: 300px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Custom styles for Google CSE to match our theme */
.gcse-search {
    width: 100%;
}

.gsc-control-cse {
    font-family: inherit !important;
    border: none !important;
    padding: 0 !important;
    background-color: transparent !important;
}

.gsc-search-button-v2 {
    background-color: #2563eb !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
}

.gsc-input-box {
    border-radius: 8px !important;
    border: 2px solid #e2e8f0 !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
}

.gsc-input {
    padding: 0 10px !important;
}

/* Service Cards (Home/List) */
.service-card-static {
    background-color: white;
    border-radius: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.5s;
}

.service-card-static:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.5rem);
}

.service-card-body { padding: 2.5rem; flex-grow: 1; }
.service-icon-box {
    width: 3.5rem;
    height: 3.5rem;
    background-color: #f8fafc;
    color: #94a3b8;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.5s;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.service-card-static:hover .service-icon-box {
    background-color: #2563eb;
    color: white;
}

.service-card-footer {
    padding: 1.5rem 2.5rem;
    background-color: rgba(248, 250, 252, 0.5);
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Header & Footer */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Fix direction for Arabic */
html[lang="ar"] .site-header {
    flex-direction: row-reverse;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

html[lang="ar"] .header-logo {
    flex-direction: row-reverse;
}

.logo-box {
    width: 2.75rem;
    height: 2.75rem;
    background-color: #2563eb;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.logo-text {
    font-weight: 900;
    font-size: 1.5rem;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.logo-text .brand-suffix-dz {
    color: #2563eb;
}

@media (max-width: 767px) {
    .md-show {
        display: none !important;
    }
}

.header-nav {
    display: flex;
    gap: 1rem;
}

html[lang="ar"] .header-nav {
    flex-direction: row-reverse;
}

.header-btn {
    background-color: #f1f5f9;
    color: #2563eb;
    font-weight: 800;
    padding: 0.65rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.header-btn:hover {
    background-color: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-btn-primary {
    background-color: #eef2ff;
    color: #4f46e5;
}

.site-footer {
    background-color: #0f172a;
    color: white;
    padding: 3rem 0;
    margin-top: 2.5rem;
}
.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}
.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 900;
}
.footer-brand-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
}
.footer-link {
    text-decoration: none;
    color: white;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #60a5fa;
}

/* Modal & Popups (Used in static pages for download flow) */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 400;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}
.preview-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.preview-modal-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: white;
    margin: 0;
}
.preview-modal-close {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.preview-modal-close:hover {
    background-color: #f43f5e;
}
.preview-modal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
@media (min-width: 1024px) {
    .preview-modal-main {
        flex-direction: row;
    }
}
.preview-modal-sidebar {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .preview-modal-sidebar {
        width: 20rem;
    }
}
.preview-modal-ad-box {
    display: flex;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 1024px) {
    .preview-modal-ad-box {
        padding: 2rem;
    }
}
.preview-modal-ad-placeholder {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3/4;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow: hidden;
}
.preview-modal-content-area {
    flex: 1;
    padding: 1rem;
    display: flex;
    justify-content: center;
    background-color: rgba(241, 245, 249, 0.1);
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .preview-modal-content-area {
        padding: 3rem;
    }
}
.preview-modal-doc-wrap {
    width: 100%;
    max-width: 56rem;
    background-color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.preview-modal-iframe {
    width: 100%;
    flex: 1;
    border: 0;
    background-color: white;
    min-height: 800px;
    max-width: 210mm;
    margin: 0 auto;
    transform-origin: top center;
}
@media (min-width: 768px) {
    .preview-modal-iframe {
        min-height: 1200px;
    }
}
.preview-modal-mobile-ad {
    display: flex;
    width: 100%;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .preview-modal-mobile-ad {
        display: none;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-card {
    background-color: white;
    border-radius: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    max-width: 40rem;
    width: 95%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-card {
    transform: translateY(0);
    opacity: 1;
}
.modal-body {
    padding: 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

@media (max-width: 767px) {
    .modal-body {
        padding: 1.5rem;
        gap: 1.5rem;
    }
}
.timer-circle-wrap {
    position: relative;
    width: 7rem;
    height: 7rem;
    margin: 0 auto 1.5rem;
}
.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.timer-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
}
.success-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
}
.success-icon-box {
    width: 5rem;
    height: 5rem;
    background-color: #dcfce7;
    color: #16a34a;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.cv-promo-btn {
    display: block;
    background: linear-gradient(to right, #2563eb, #4f46e5);
    color: white;
    font-weight: 900;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    text-decoration: none;
}
.cv-promo-btn:hover {
    transform: scale(1.05);
}
.share-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.share-text {
    color: #64748b;
    font-weight: 700;
    margin: 0;
}
.share-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.share-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    color: white;
}
.modal-ad-wrap {
    width: 100%;
    min-height: 200px;
    background-color: #f8fafc;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}
.format-selection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}
@media (min-width: 640px) {
    .format-selection {
        grid-template-columns: repeat(3, 1fr);
    }
    /* When it contains the static confirmation, it should span all columns or not be a 3-col grid */
    .format-selection:has(.static-format-confirm) {
        display: flex;
        justify-content: center;
        grid-template-columns: 1fr;
    }
}
/* Fallback for browsers that don't support :has */
.format-selection .static-format-confirm {
    grid-column: 1 / -1;
}
.format-btn {
    padding: 1.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 1.5rem;
    font-weight: 900;
    transition: all 0.3s;
    cursor: pointer;
    background-color: white;
}
.format-btn-pdf { color: #ef4444; }
.format-btn-pdf:hover { border-color: #f87171; }
.format-btn-word { color: #3b82f6; }
.format-btn-word:hover { border-color: #60a5fa; }
.format-btn-print { color: #334155; }
.format-btn-print:hover { border-color: #94a3b8; }

.modal-footer-btn {
    background-color: #f8fafc;
    padding: 1rem 0;
    color: #94a3b8;
    font-weight: 700;
    border: none;
    border-top: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s;
}
.modal-footer-btn:hover {
    background-color: #f1f5f9;
}

.static-format-confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 0;
    width: 100%;
}
.pdf-confirm-icon {
    width: 4.5rem;
    height: 4.5rem;
    background-color: #fee2e2;
    color: #ef4444;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.1);
}
#modal-timer-section, #success-view, #final-download-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
}

.format-confirm-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}
.format-btn-static-pdf {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    font-size: 1.25rem;
    font-weight: 900;
    padding: 1.25rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.25);
    transition: all 0.3s;
    cursor: pointer;
}
.format-btn-static-pdf:hover {
    transform: scale(1.02);
    opacity: 0.95;
    box-shadow: 0 15px 30px rgba(225, 29, 72, 0.3);
}

/* Service Document Layout (Static Landing) */
.service-hero {
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.service-hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.service-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .service-container {
        flex-direction: row;
        align-items: center; /* Center items vertically */
    }
    
    /* Swap order in RTL context for proper photo/text placement */
    html[lang="ar"] .service-container {
        flex-direction: row-reverse;
    }
}

.wizard-container {
    width: 100%;
}

@media (min-width: 1024px) {
    .wizard-container {
        width: 45%; /* Slightly wider text block */
    }
}

/* Landing View Styles */
.landing-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

html[lang="ar"] .landing-view {
    text-align: right;
    align-items: flex-start; /* Ensure everything aligns to start side (right in RTL) */
}

.landing-title {
    font-size: 2.75rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .landing-title {
        font-size: 4.5rem;
    }
}

.landing-title span {
    color: #2563eb;
    display: block; /* Force the blue part to next line for punchy header */
}

.landing-desc {
    font-size: 1.25rem;
    color: #64748b;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
    max-width: 32rem;
}

.btn-massive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    padding: 1.25rem 3.5rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 15px 35px -5px rgba(0, 114, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    width: 100%;
}

@media (min-width: 640px) {
    .btn-massive {
        width: auto;
    }
}

.btn-massive:hover {
    transform: translateY(-0.4rem) scale(1.02);
    box-shadow: 0 25px 45px -10px rgba(0, 114, 255, 0.5);
    filter: brightness(1.1);
}

.btn-massive:active {
    transform: translateY(-0.1rem);
}

/* Preview Section */
.preview-column {
    flex: 1;
    width: 100%;
}

.preview-box {
    background-color: #f1f5f9;
    padding: 1.5rem;
    border-radius: 2.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
    .preview-box {
        padding: 2.5rem;
    }
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    direction: ltr; /* Ensure tokens stay at ends regardless of page dir */
}

/* Flip positions in Arabic */
html[lang="ar"] .preview-header {
    direction: rtl;
}

.preview-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: white;
    color: #2563eb;
    font-weight: 900;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.preview-btn:hover {
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.live-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 800;
    color: #64748b;
}

.status-dot {
    width: 0.65rem;
    height: 0.65rem;
    background-color: #22c55e;
    border-radius: 9999px;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.preview-wrap {
    position: relative;
    background-color: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    cursor: zoom-in;
    aspect-ratio: 210/297;
    transition: transform 0.3s;
}

.preview-wrap:hover {
    transform: scale(1.01);
}

.preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(180deg, transparent 80%, rgba(255, 255, 255, 0.5) 100%);
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0.5rem;
}

/* Details Section */
.details-section {
    max-width: 80rem;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .details-section {
        grid-template-columns: 2fr 1fr;
    }
}

.details-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.details-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 2rem;
    border-inline-start: 4px solid #2563eb;
    padding-inline-start: 1rem;
}

.details-text {
    color: #475569;
    line-height: 1.8;
}

.details-text h3 { color: #0f172a; font-weight: 900; margin-bottom: 1rem; }
.details-text p { margin-bottom: 1.5rem; }
.details-text ul { margin-bottom: 1.5rem; padding-inline-start: 1.5rem; list-style-type: square; }

/* Similar Models */
.similar-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.similar-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
}

.similar-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.similar-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    transition: all 0.3s;
}

.similar-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.similar-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.similar-name {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.similar-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.similar-link {
    font-size: 0.75rem;
    font-weight: 900;
    color: #2563eb;
}

/* Ad Styles */
.ad-standard-container { margin: 1.5rem 0; width: 100%; overflow: hidden; }
.ad-card { display: block; background-color: white; border-radius: 2rem; border: 1px solid #f1f5f9; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); transition: all 0.5s; text-decoration: none; overflow: hidden; }
.ad-card:hover { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); transform: translateY(-0.25rem); }
.ad-flex-row { position: relative; display: flex; flex-direction: column; min-height: 180px; }
.ad-img-box { width: 100%; background-color: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #f8fafc; position: relative; }
.ad-img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.7s; }
.ad-badge { background-color: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); color: white; font-size: 9px; font-weight: 900; padding: 0.25rem 0.5rem; border-radius: 0.5rem; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); text-transform: uppercase; letter-spacing: -0.05em; }
.ad-content-box { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ad-title { font-size: 1.125rem; font-weight: 900; color: #0f172a; transition: color 0.2s; line-height: 1.25; margin: 0 0 0.5rem 0; }
.ad-desc { color: #64748b; font-size: 0.75rem; font-weight: 700; line-height: 1.625; margin: 0 0 1rem 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ad-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.ad-cta { font-size: 10px; font-weight: 900; color: #2563eb; text-transform: uppercase; letter-spacing: 0.1em; transition: transform 0.2s; }

@media (min-width: 640px) {
    .ad-flex-row { flex-direction: row !important; }
    .ad-img-box { width: 50% !important; border-bottom: 0 !important; border-inline-end: 1px solid #f8fafc !important; }
}

.ad-dot-container { display: flex; gap: 0.25rem; }
.ad-dot { width: 0.25rem; height: 0.25rem; border-radius: 9999px; }
.ad-dot-primary { background-color: #60a5fa; }
.ad-dot-secondary { background-color: #e2e8f0; }

.ad-overlay-card { position: relative; background-color: #f1f5f9; aspect-ratio: 16/9; }
.ad-overlay-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 50%, transparent 100%); }
.ad-overlay-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background-color: rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ad-overlay-info { flex: 1; min-width: 0; }
.ad-overlay-title { font-size: 0.875rem; font-weight: 900; color: white; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-overlay-desc { font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, 0.8); margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ad-overlay-cta { flex-shrink: 0; background-color: #2563eb; color: white; font-size: 10px; font-weight: 900; padding: 0.5rem 1rem; border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); text-transform: uppercase; letter-spacing: 0.1em; transition: background-color 0.2s; }
.ad-overlay-cta:hover { background-color: #1d4ed8; }

/* Utils */
.pb-20 { padding-bottom: 5rem; }
.pt-12 { padding-top: 3rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-900 { color: #0f172a; }
.text-blue-600 { color: #2563eb; }
.bg-white { background-color: #ffffff; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-amber-50 { background-color: #fffbeb; }
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-slate-100 { border-color: #f1f5f9; }
.border-blue-100 { border-color: #dbeafe; }
.max-w-2xl { max-width: 42rem; margin-inline: auto; }
.max-w-3xl { max-width: 48rem; margin-inline: auto; }
.max-w-4xl { max-width: 56rem; margin-inline: auto; }
.max-w-5xl { max-width: 64rem; margin-inline: auto; }
.max-w-7xl { max-width: 80rem; margin-inline: auto; }
.mx-auto { margin-inline: auto; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.md-grid-cols-2 { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); }
.md-grid-cols-3 { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); }
.lg-grid-cols-3 { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md-flex-row { flex-direction: row; }
    .md-py-32 { padding-top: 8rem; padding-bottom: 8rem; }
}

@media (min-width: 1024px) {
    .lg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.px-6 { padding-inline: 1.5rem; }
.px-8 { padding-inline: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.overflow-hidden { overflow: hidden; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.no-underline { text-decoration: none; }
.text-inherit { color: inherit; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-500 { transition-duration: 500ms; }

.animate-fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.badge-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.hero-gradient {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.02), transparent 40%);
}

.hero-accent {
    position: absolute;
    top: -10rem;
    right: -10rem;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.search-container {
    display: flex;
    background-color: white;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #f1f5f9;
    padding: 0.75rem;
    transition: all 0.3s;
}

.search-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    background-color: transparent;
}

.search-btn {
    background-color: #2563eb;
    color: white;
    font-weight: 900;
    padding: 1rem 3rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

/* Document Pages (Hero & Wizard) - Critical missing styles */
.service-hero {
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.5) 0%, rgba(255, 255, 255, 1) 100%);
}

.service-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .service-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

.wizard-container {
    flex: 1;
    width: 100%;
}

@media (min-width: 1024px) {
    .wizard-container {
        width: 41.666667%;
    }
}

.landing-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: right;
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .landing-title {
        font-size: 4rem;
    }
}

.landing-title span {
    color: #2563eb;
}

.landing-desc {
    font-size: 1.125rem;
    color: #64748b;
    line-height: 1.625;
    font-weight: 500;
    margin: 0;
    max-width: 32rem;
}

.btn-massive-wizard {
    width: 100%;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .btn-massive-wizard {
        width: fit-content;
        padding-inline: 4rem;
    }
}

.questions-view {
    background-color: white;
    padding: 2.5rem;
    border-radius: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #f1f5f9;
}

.questions-view.hidden {
    display: none !important;
}

.step-header {
    margin-bottom: 2rem;
}

.step-counter {
    display: block;
    font-size: 0.875rem;
    font-weight: 900;
    color: #2563eb;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-container {
    height: 0.5rem;
    background-color: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    transition: width 0.3s ease;
}

.btn-massive {
    width: 100%;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    font-size: 1.25rem;
    font-weight: 900;
    padding: 1.125rem;
    border-radius: 1.25rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2);
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-massive:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 25px 30px -5px rgba(37, 99, 235, 0.3);
}

.preview-column {
    flex: 1;
    width: 100%;
}

@media (min-width: 1024px) {
    .preview-column {
        position: sticky;
        top: 6rem;
    }
}

.preview-box {
    background-color: #f1f5f9;
    padding: 1.5rem;
    border-radius: 2.5rem;
    border: 1px solid #e2e8f0;
}

/* Ad Badge Positoners */
.ad-badge-container {
    position: absolute;
    top: 0.75rem;
    z-index: 10;
}
.ad-badge-container-rtl {
    right: 0.75rem;
}
.ad-badge-container-ltr {
    left: 0.75rem;
}

/* Homepage Custom CSS */
.home-main-wrapper {
    width: 100%;
}
.home-hero-section {
    padding: 3rem 0;
}
@media (min-width: 768px) {
    .home-hero-section {
        padding: 8rem 0;
    }
}
.home-hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}
.badge-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}
.badge-label span {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.home-hero-title {
    margin: 0 0 1.5rem 0;
}
.home-hero-subtitle {
    margin: 0;
}
.search-box-custom {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 9999px;
    display: flex;
    overflow: hidden;
    height: 4rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.search-box-custom:hover {
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.15);
    border-color: #cbd5e1;
}
.search-btn-custom {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    font-weight: 800;
    padding: 0 2.5rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background 0.3s;
}
.search-btn-custom:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
}
.feature-card:hover .feature-icon-box {
    background-color: currentColor;
    color: white;
}
.feature-card {
    cursor: default;
}
.feature-title {
    margin-top: 0;
}
.feature-desc {
    margin-bottom: 0;
}
