/* ==========================================================================
   Istishari Theme — قالب مؤسسي/استشاري عام
   يدعم كل الوحدات: صفحات، مقالات، خدمات، أعمال، فريق، آراء عملاء، أسئلة شائعة، إحصائيات
   ========================================================================== */

:root {
    --primary: #0f2942;
    --primary-light: #17395c;
    --primary-lighter: #234a72;
    --accent: #c9a15a;
    --accent-dark: #a9822f;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e6e8ec;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 10px 30px rgba(15, 41, 66, 0.08);
    --shadow-sm: 0 4px 14px rgba(15, 41, 66, 0.06);
    --container: 1200px;
    --font: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 84px 0;
}

.section-alt {
    background: var(--surface);
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 50px;
}

.section-eyebrow {
    display: inline-block;
    color: var(--accent-dark);
    background: rgba(201, 161, 90, .12);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: .3px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 12px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .25s ease;
}

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

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

.btn-outline {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, .12);
}

.btn-primary-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary-outline:hover {
    background: var(--primary);
    color: #fff;
}

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

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    max-width: var(--container);
    margin: 0 auto;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--primary);
}

.brand img {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.main-nav a {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    transition: all .2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--bg);
    color: var(--primary);
}

.main-nav .has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    box-shadow: var(--shadow);
    border-radius: var(--radius-sm);
    padding: 8px;
    min-width: 200px;
    display: none;
    border: 1px solid var(--border);
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: var(--bg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.lang-switch:hover {
    background: var(--bg);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    margin: 5px 0;
    transition: .25s;
}

/* ---------------- Hero ---------------- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--primary-lighter) 100%);
    color: #fff;
    padding: 110px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(201, 161, 90, .18), transparent 45%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 50px;
    align-items: center;
    position: relative;
}

.hero-eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 7px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 46px;
    line-height: 1.3;
    font-weight: 800;
    margin: 0 0 18px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    color: rgba(255, 255, 255, .8);
    font-size: 17px;
    max-width: 520px;
    margin: 0 0 32px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-media {
    position: relative;
}

.hero-media img {
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}

/* ---------------- Stats ---------------- */
.stats-strip {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-top: -60px;
    position: relative;
    z-index: 2;
    padding: 40px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item .stat-icon {
    font-size: 26px;
    color: var(--accent-dark);
    margin-bottom: 8px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

/* ---------------- Cards grid ---------------- */
.grid {
    display: grid;
    gap: 26px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all .3s ease;
}

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

/* Service card */
.service-card {
    padding: 34px 28px;
    text-align: center;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 20px;
}

.service-card h3 {
    font-size: 19px;
    margin: 0 0 10px;
    color: var(--primary);
}

.service-card p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0 0 16px;
}

.card-link {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 14px;
}

/* Portfolio / project card */
.project-card .project-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.project-card:hover .project-thumb img {
    transform: scale(1.08);
}

.project-cat {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--accent);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 30px;
}

.project-body {
    padding: 22px;
}

.project-body h3 {
    font-size: 18px;
    margin: 0 0 8px;
    color: var(--primary);
}

.project-body p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 12px;
}

/* Blog card */
.blog-card .blog-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.08);
}

.blog-body {
    padding: 22px;
}

.blog-body h3 {
    font-size: 18px;
    margin: 0 0 10px;
    color: var(--primary);
}

/* Team card */
.team-card {
    text-align: center;
    padding: 30px 22px;
}

.team-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 18px;
    border: 4px solid var(--bg);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: var(--primary);
}

.team-position {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 12px;
}

.team-bio {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.team-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--primary);
}

.team-social a:hover {
    background: var(--accent);
    color: var(--primary);
}

/* Pricing */
.pricing-card {
    padding: 36px 28px;
    text-align: center;
    position: relative;
}

.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.pricing-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 30px;
}

.pricing-card h3 {
    margin: 6px 0 14px;
    color: var(--primary);
    font-size: 19px;
}

.pricing-price {
    font-size: 38px;
    font-weight: 800;
    color: var(--primary);
}

.pricing-price span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
}

.pricing-period {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.pricing-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    text-align: right;
}

.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}

.pricing-features li i {
    color: var(--accent-dark);
    margin-left: 8px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* Testimonials */
.testimonials-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
}

.testimonial-rating {
    color: var(--accent);
    font-size: 15px;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.testimonial-content {
    color: var(--text);
    font-size: 15px;
    margin-bottom: 20px;
}

.testimonial-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 14.5px;
}

.testimonial-position {
    color: var(--text-muted);
    font-size: 12.5px;
}

/* Clients strip */
.clients-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 48px;
    opacity: .75;
}

.clients-strip img {
    height: 38px;
    width: auto;
    filter: grayscale(1);
}

/* FAQ */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 22px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 22px;
    color: var(--accent-dark);
    transition: transform .2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item .faq-answer {
    padding: 0 22px 20px;
    color: var(--text-muted);
    font-size: 14.5px;
}

/* CTA banner */
.cta-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cta-banner h3 {
    font-size: 26px;
    margin: 0 0 8px;
}

.cta-banner p {
    color: rgba(255, 255, 255, .8);
    margin: 0;
}

/* ---------------- Footer ---------------- */
.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, .78);
    padding-top: 70px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand img {
    height: 34px;
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin: 0 0 18px;
}

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

.footer-col ul li a:hover {
    color: var(--accent);
}

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

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--primary);
}

.footer-bottom {
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

/* ---------------- Inner / listing pages ---------------- */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
    color: #fff;
    padding: 70px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    margin: 0 0 10px;
}

.breadcrumbs {
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
}

.breadcrumbs a {
    color: #fff;
}

.content-body {
    font-size: 16px;
    line-height: 2;
    color: var(--text);
}

.content-body img {
    border-radius: var(--radius);
    margin: 20px 0;
}

.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-widget h4 {
    margin: 0 0 16px;
    color: var(--primary);
}

.mini-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
}

.mini-list li:last-child {
    border-bottom: none;
}

.two-col {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 40px;
}

/* Contact page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 26px;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font);
    font-size: 14.5px;
    background: var(--surface);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

/* Search */
.search-box {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    gap: 10px;
}

/* 404 */
.error-page {
    text-align: center;
    padding: 120px 0;
}

.error-page .error-code {
    font-size: 110px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4,
    .testimonials-track {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .two-col,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        inset: 66px 0 0 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 4px;
        transform: translateY(-120%);
        transition: transform .25s ease;
        overflow-y: auto;
        border-top: 1px solid var(--border);
    }

    .main-nav.open {
        transform: translateY(0);
    }

    .dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        padding-right: 14px;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 32px;
    }

    .grid-3,
    .grid-4,
    .testimonials-track {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 56px 0;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }
}

/* Pagination */
.pagination-nav {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pagination-list li a,
.pagination-list li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 50px;
    background: var(--surface);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: all .2s ease;
}

.pagination-list li a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-list li.active span {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.pagination-list li.disabled span {
    opacity: .4;
    cursor: default;
}

.pagination-list li.dots span {
    border: none;
    background: transparent;
}
