/*
Theme Name: Afaq Al-Bayan Theme
Theme URI: htts://insaaf.sa
Description: قاصب مخصص لشركة آفاق البيان للمحاماة، مبني على Kadence.
Author: Antigravity Agent
Author URI: htts://insaaf.sa
Template: kadence
Version: 1.0.0
*/

/* =========================================
   1. Global Variables & Typography
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --primary: #0A3D32;
    /* Deep Green */
    --primary-dark: #05261f;
    --gold: #C5A059;
    /* Gold */
    --gold-hover: #b08d45;
    --gold-gradient: linear-gradient(135deg, #C5A059 0%, #d4b574 100%);
    --bg-light: #F9F9F9;
    --text-grey: #555;
    --radius: 8px;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
input,
textarea,
button {
    font-family: 'Tajawal', sans-serif !important;
}

/* =========================================
   2. Custom Buttons (Design System)
   ========================================= */
.btn-gold {
    background: var(--gold-gradient) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    padding: 12px 30px !important;
    border-radius: var(--radius) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.3);
}

.btn-primary-outline {
    background: transparent !important;
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    padding: 10px 25px !important;
    border-radius: var(--radius) !important;
}

.btn-primary-outline:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

/* =========================================
   3. Glassmorphism Header Override
   ========================================= */
.site-header-row-container-inner {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(10, 61, 50, 0.05);
}

/* =========================================
   4. Plugin Overrides: WP Amelia
   ========================================= */
/* ألوان التقويم والحجز */
#amelia-app-booking-view .am-primary-button,
.am-btn-primary {
    background: var(--gold-gradient) !important;
    color: var(--primary) !important;
    border: none !important;
}

/* العناوين داخل الحجز */
.am-fs__step-content h3,
.amelia-app-booking h2 {
    color: var(--primary) !important;
    font-family: 'Tajawal', sans-serif !important;
}

/* الأيام المحددة في التقويم */
.el-calendar-table td.is-selected .el-calendar-day {
    background: var(--gold) !important;
    color: #fff !important;
}

/* =========================================
   5. Plugin Overrides: Fluent Forms
   ========================================= */
.fluentform .ff-el-form-control {
    border-radius: var(--radius) !important;
    padding: 12px 15px !important;
    border: 1px solid #e0e0e0 !important;
    background: #fafafa;
}

.fluentform .ff-el-form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(10, 61, 50, 0.1) !important;
}

.fluentform .ff-btn-submit {
    background: var(--primary) !important;
    color: #fff !important;
    width: 100%;
    font-weight: bold;
    border-radius: var(--radius) !important;
}

/* =========================================
   6. Plugin Overrides: Fluent Support
   ========================================= */
/* إخفاء شعار فلوينت من البوابة */
.fluent_support_portal_logo,
.fs_powered_by {
    display: none !important;
}

/* تخصيص سايدبار العميل */
.fs_customer_portal_sidebar {
    background-color: var(--primary) !important;
}

.fs_portal_menu_item.active {
    background-color: var(--gold) !important;
    color: var(--primary) !important;
}

/* =========================================
   7. Migrated Layout Styles (from index.html)
   ========================================= */

/* Core Resets & Defaults */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Tajawal', sans-serif;
    color: #1F1F1F;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 90px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Typography */
.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-grey);
    max-width: 700px;
    margin: 0 auto 50px;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
}

.btn-gold {
    /* Existing btn-gold class handles this, keeping purely for structure if needed overrides */
    position: relative;
    overflow: hidden;
    color: var(--primary);
    background: var(--gold-gradient);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

/* Header & Nav */
header {
    background-color: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(10, 61, 50, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    /* Reset WP default */
}

.main-nav a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--primary);
    position: relative;
}

.main-nav a:not(.btn-gold):hover {
    color: var(--gold);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    background: #0A3D32;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1507679799987-c73779587ccf?q=80&w=2071&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    animation: zoomIn 20s infinite alternate;
}

@keyframes zoomIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 61, 50, 0.95), rgba(10, 61, 50, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-badge {
    background: rgba(197, 160, 89, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 25px;
    display: inline-block;
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    color: #fff;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px 30px;
    border: 1px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--gold);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: #fffcf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 25px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    transition: 0.3s;
}

.service-card:hover .service-icon {
    background: var(--gold);
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-grey);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.service-link i {
    transition: 0.3s;
}

.service-card:hover .service-link i {
    transform: translateX(-5px);
}

/* Workflow (Methodology) */
.steps-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 60px;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to left, #eee, var(--gold), #eee);
    z-index: 0;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 10px;
}

.step-num {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 auto 20px;
    background: #fff;
    box-shadow: 0 0 0 10px #fff;
}

.step-item:hover .step-num {
    background: var(--gold);
    color: #fff;
}

/* Packages */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.package-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #eee;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.package-card.featured {
    border: 2px solid var(--gold);
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.15);
    transform: scale(1.05);
    z-index: 2;
    position: relative;
}

.featured-tag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gold);
    color: #fff;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.pkg-name {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.pkg-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 30px;
}

.pkg-price span {
    font-size: 1rem;
    color: #999;
    font-weight: 400;
}

.pkg-features {
    margin-bottom: 30px;
    text-align: right;
}

.pkg-features li {
    margin-bottom: 12px;
    color: var(--text-grey);
    font-size: 0.95rem;
}

.pkg-features i {
    color: var(--gold);
    margin-left: 10px;
}

/* Booking Placeholder */
.booking-section {
    background: var(--primary-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.booking-wrapper {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.amelia-header {
    background: #f4f4f4;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.amelia-body {
    padding: 50px;
    text-align: center;
    color: #333;
}

.mock-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
    max-width: 400px;
    margin: 20px auto;
}

.mock-day {
    background: #eee;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.mock-day.active {
    background: var(--gold);
    color: var(--primary);
    font-weight: bold;
}

/* Footer */
footer {
    background: #021a15;
    color: #fff;
    padding: 80px 0 30px;
    border-top: 4px solid var(--gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    margin-bottom: 12px;
    color: #ccc;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--gold);
    padding-right: 5px;
}

/* Responsive */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .steps-container {
        flex-direction: column;
        gap: 40px;
        margin-top: 40px;
    }

    .steps-container::before {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        /* In real implementation, this would be a toggleable menu */
    }


    /* =========================================
   8. Migrated About Us Styles (from about_us_v2.html)
   ========================================= */

    /* Preloader */
    #preloader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        transition: opacity 0.4s ease-out;
    }

    .loader-logo {
        font-size: 3rem;
        color: var(--primary);
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 10px;
        animation: pulse-gold 2s infinite;
    }

    .loader-bar {
        width: 150px;
        height: 3px;
        background: #eee;
        margin-top: 20px;
        border-radius: 10px;
        overflow: hidden;
    }

    .loader-progress {
        width: 0%;
        height: 100%;
        background: var(--gold);
        animation: load 1s ease-in-out forwards;
    }

    @keyframes load {
        0% {
            width: 0;
        }

        100% {
            width: 100%;
        }
    }

    @keyframes pulse-gold {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.8;
        }
    }

    /* Scroll Reveal */
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: var(--transition);
    }

    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }

    .delay-100 {
        transition-delay: 0.1s;
    }

    .delay-200 {
        transition-delay: 0.2s;
    }

    .delay-300 {
        transition-delay: 0.3s;
    }

    /* Nav Button Specifics */
    .btn-gold-nav {
        background: var(--gold-gradient);
        color: var(--primary) !important;
        padding: 10px 25px;
        border-radius: 4px;
        font-weight: 800;
        position: relative;
        overflow: hidden;
        font-size: 0.95rem;
        box-shadow: 0 4px 15px rgba(197, 160, 89, 0.25);
    }

    .btn-gold-nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
        transform: skewX(-25deg);
        transition: none;
    }

    .btn-gold-nav:hover::before {
        animation: sheen 0.6s;
    }

    .btn-gold-nav:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
    }

    @keyframes sheen {
        100% {
            left: 150%;
        }
    }

    /* About Hero */
    .hero-section {
        position: relative;
        width: 100%;
        padding: 140px 0;
        background-image: url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?q=80&w=1470&auto=format&fit=crop');
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-title {
        color: #FFFFFF;
        font-size: 3rem;
        font-weight: 800;
        margin-bottom: 20px;
        line-height: 1.3;
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .hero-desc {
        color: #f0f0f0;
        font-size: 1.25rem;
        max-width: 700px;
        margin: 0 auto;
        line-height: 1.8;
        opacity: 0.9;
    }

    .section-tag {
        display: inline-block;
        color: var(--gold);
        border: 1px solid var(--gold);
        padding: 5px 15px;
        border-radius: 50px;
        margin-bottom: 20px;
        background: rgba(10, 61, 50, 0.6);
        font-weight: 700;
        font-size: 0.9rem;
        backdrop-filter: blur(5px);
    }

    /* Vision Cards */
    .grid-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 50px;
        align-items: center;
    }

    @media (min-width: 992px) {
        .grid-layout {
            grid-template-columns: 1fr 1fr;
            gap: 70px;
        }
    }

    .vision-card {
        background: #fff;
        padding: 35px;
        border-radius: 12px;
        margin-top: 25px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
        text-align: center;
        border: 1px solid #f0f0f0;
        transition: var(--transition);
    }

    .vision-card:hover {
        transform: translateY(-7px);
        box-shadow: 0 15px 40px rgba(10, 61, 50, 0.1);
        border-color: var(--gold);
    }

    .vision-card i {
        font-size: 2.2rem;
        color: var(--gold);
        margin-bottom: 15px;
        display: block;
    }

    .vision-card h4 {
        color: var(--primary);
        margin-bottom: 10px;
        font-weight: 700;
        font-size: 1.2rem;
    }

    /* Methodology Steps */
    .methodology {
        text-align: center;
        background: #fff;
    }

    .steps-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
        margin-top: 60px;
    }

    .step-card {
        background: #fff;
        padding: 40px 20px;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
        border: 1px solid #f8f8f8;
        border-right: 5px solid transparent;
        position: relative;
        overflow: hidden;
        transition: var(--transition);
    }

    .step-card:nth-child(odd) {
        border-right-color: var(--primary);
    }

    .step-card:nth-child(even) {
        border-right-color: var(--gold);
    }

    .step-card:hover {
        transform: translateY(-10px);
    }

    .step-number {
        position: absolute;
        top: -5px;
        left: 15px;
        font-size: 5rem;
        font-weight: 900;
        color: var(--gold);
        opacity: 0.1;
        line-height: 1;
        transition: 0.3s;
    }

    .step-card:hover .step-number {
        opacity: 0.2;
        transform: scale(1.1);
    }

    .step-icon {
        width: 70px;
        height: 70px;
        background: #fdfdfd;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        color: var(--primary);
        margin: 0 auto 20px;
        position: relative;
        z-index: 1;
        border: 1px solid #eee;
        transition: 0.3s;
    }

    .step-card:hover .step-icon {
        background: var(--primary);
        color: var(--gold);
    }

    /* Values Section */
    .values-sec {
        background-color: var(--primary);
        color: #fff;
        text-align: center;
        position: relative;
    }

    .values-sec::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: radial-gradient(rgba(197, 160, 89, 0.15) 1px, transparent 1px);
        background-size: 30px 30px;
        opacity: 0.3;
    }

    .values-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 25px;
        margin-top: 50px;
        position: relative;
        z-index: 2;
    }

    .value-card {
        background: rgba(255, 255, 255, 0.04);
        padding: 35px 20px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: 0.4s;
        backdrop-filter: blur(5px);
    }

    .value-card:hover {
        background: #fff;
        transform: translateY(-7px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .value-card:hover h4,
    .value-card:hover i {
        color: var(--primary);
    }

    .value-card:hover p {
        color: #555 !important;
    }

    .value-card i {
        font-size: 2.2rem;
        color: var(--gold);
        margin-bottom: 20px;
        display: block;
        transition: 0.3s;
    }

    .value-card p {
        color: #ccc;
        font-size: 0.9rem;
    }

    /* Audience & CTA */
    .audience-sec {
        text-align: center;
        background: #fff;
    }

    .audience-flex {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
        margin-top: 50px;
    }

    .audience-item {
        flex: 1 1 300px;
        padding: 40px 30px;
        background: #fafafa;
        border-radius: 16px;
        border: 1px solid #f0f0f0;
        transition: var(--transition);
    }

    .audience-item:hover {
        background: #fff;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
        transform: translateY(-5px);
        border-color: var(--gold);
    }

    .audience-item i {
        font-size: 3rem;
        color: var(--primary);
        margin-bottom: 20px;
    }

    .cta-sec {
        text-align: center;
        background: #f8f8f8;
        border-top: 1px solid #eee;
        position: relative;
    }

    .cta-buttons {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        margin-top: 40px;
    }

    .btn-cta {
        padding: 14px 40px;
        border-radius: 6px;
        font-weight: 800;
        font-size: 1rem;
        transition: 0.3s;
        display: inline-block;
        min-width: 180px;
    }

    .btn-cta-primary {
        background: linear-gradient(135deg, #0A3D32 0%, #0d4d40 100%);
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(10, 61, 50, 0.2);
        border: 1px solid transparent;
    }

    .btn-cta-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(10, 61, 50, 0.3);
        border-color: var(--gold);
    }

    .btn-cta-outline {
        background: transparent;
        color: var(--primary) !important;
        border: 2px solid var(--primary);
    }

    .btn-cta-outline:hover {
        background: var(--primary);
        color: #fff !important;
    }

    /* About Footer Specifics */
    .copyrights {
        background: #021a15;
        padding: 25px 0;
        text-align: center;
        color: #888;
        font-size: 0.85rem;
    }