/*  ===================================
    Services Grid Sections - Minimalist Flat Design (Option B)
    ملف تجريبي للتصميم العصري المسطح
    =================================== */

/* Font Family */
.service-card-modern,
.section-main-title,
.section-main-subtitle,
.service-card-title,
.service-list,
.alert {
    font-family: 'Tajawal', Arial, Helvetica, sans-serif !important;
}

/* Ensure icons use their own fonts */
.service-card-modern i,
.service-card-modern .fa,
.service-card-modern .fas,
.service-card-modern .far,
.service-card-modern .fab,
.service-card-modern .bi {
    font-family: "Font Awesome 6 Free", "bootstrap-icons" !important;
}

/* Section Headers */
.services-grid-section-1 .text-center,
.services-grid-section-2 .text-center {
    margin-bottom: 4.5rem;
}

.section-main-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--navy-blue);
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.section-main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--gold-gradient), transparent);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(200, 160, 65, 0.3);
}

.section-main-subtitle {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ===================================
   Service Card Image
   =================================== */

.service-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    position: relative;
    background: #f5f5f5;
}

.service-card-image img.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.service-card-modern:hover .service-card-image img.service-img {
    transform: scale(1.05);
}

/* Overlay gradient on image */
.service-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
    pointer-events: none;
}

/* ===================================
   Minimalist Flat Service Cards
   =================================== */

.service-card-modern {
    background: #ffffff;
    /* Pure white */
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    /* Very subtle shadow */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    /* No border */
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Vertical Colored Sidebar */
.service-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Gold Theme Sidebar */
.services-grid-section-1 .service-card-modern::before {
    background: linear-gradient(180deg, var(--gold-start), var(--gold-dark));
}

.services-grid-section-1 .service-card-modern:hover {
    box-shadow: 0 8px 24px rgba(232, 196, 106, 0.12);
    background: #fffef9;
    /* Very subtle background change */
    transform: translateY(-4px);
}

.services-grid-section-1 .service-card-modern:hover::before {
    width: 12px;
    /* Sidebar becomes wider */
}

/* Navy Theme Sidebar */
.services-grid-section-2 .service-card-modern::before {
    background: linear-gradient(180deg, var(--navy-blue), #4a5bb5);
}

.services-grid-section-2 .service-card-modern:hover {
    box-shadow: 0 8px 24px rgba(26, 37, 112, 0.1);
    background: #fafbff;
    /* Very subtle background change */
    transform: translateY(-4px);
}

.services-grid-section-2 .service-card-modern:hover::before {
    width: 12px;
    /* Sidebar becomes wider */
}

/* ===================================
   Card Header - Minimalist Style with Image Support
   =================================== */

.service-card-header {
    padding: 2rem 2rem 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: right;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid #f5f5f5;
    gap: 1.5rem;
}

[dir="ltr"] .service-card-header {
    text-align: left;
    flex-direction: row-reverse;
}

/* Minimalist Icon Container */
.service-icon-modern {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1;
}

/* Icon Backgrounds - Flat Colors */
.services-grid-section-1 .service-icon-modern {
    background: #fff9e6;
    border: 2px solid #f5e6c3;
}

.services-grid-section-2 .service-icon-modern {
    background: #f0f2ff;
    border: 2px solid #d9dcf5;
}

.service-icon-modern i {
    font-size: 32px;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

/* Icon Colors - Solid */
.services-grid-section-1 .service-icon-modern i {
    color: var(--gold-start);
}

.services-grid-section-2 .service-icon-modern i {
    color: var(--navy-blue);
}

/* Hover Effects for Icon */
.service-card-modern:hover .service-icon-modern {
    transform: scale(1.08);
}

.service-card-modern:hover .service-icon-modern i {
    font-size: 36px;
}

.services-grid-section-1 .service-card-modern:hover .service-icon-modern {
    background: #fff5d6;
    border-color: var(--gold-start);
    box-shadow: 0 4px 16px rgba(232, 196, 106, 0.2);
}

.services-grid-section-2 .service-card-modern:hover .service-icon-modern {
    background: #e6e9ff;
    border-color: var(--navy-blue);
    box-shadow: 0 4px 16px rgba(26, 37, 112, 0.15);
}

/* Header Text */
.service-header-text {
    flex: 1;
    text-align: right;
}

[dir="ltr"] .service-header-text {
    text-align: left;
}

.service-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy-blue);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.service-card-subtitle {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0;
    font-weight: 500;
    line-height: 1.5;
}

/* ===================================
   Card Body - Clean Layout
   =================================== */

.service-card-body {
    padding: 2rem 2rem 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: right;
}

[dir="ltr"] .service-card-body {
    text-align: left;
}

/* Feature Box - Minimal Style */
.service-feature-box {
    margin-bottom: 0;
    padding: 1.2rem 0;
    border-top: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.service-feature-box:first-child {
    border-top: none;
    padding-top: 0;
}

.service-feature-box:hover {
    padding-right: 0.5rem;
}

.service-card-modern:hover .service-feature-box {
    background: rgba(250, 250, 250, 0.5);
    transform: translateX(-3px);
}

[dir="ltr"] .service-card-modern:hover .service-feature-box {
    transform: translateX(3px);
}

.service-feature-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

[dir="rtl"] .service-feature-box h4 {
    flex-direction: row;
}

.service-feature-box h4 i {
    font-size: 1.1rem;
}

/* Icon Colors in Body */
.services-grid-section-1 .service-feature-box h4 i {
    color: var(--gold-start);
}

.services-grid-section-2 .service-feature-box h4 i {
    color: var(--navy-blue);
}

/* Clean List with Checkmarks */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.service-list li {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    padding-right: 2rem;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

[dir="rtl"] .service-list li {
    padding-right: 2rem;
    padding-left: 0;
}

[dir="ltr"] .service-list li {
    padding-left: 2rem;
    padding-right: 0;
}

/* Checkmark Icon - Minimal */
.service-list li::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 2px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

[dir="rtl"] .service-list li::before {
    right: 0;
    left: auto;
}

[dir="ltr"] .service-list li::before {
    left: 0;
    right: auto;
}

/* Checkmark Colors */
.services-grid-section-1 .service-list li::before {
    color: var(--gold-start);
}

.services-grid-section-2 .service-list li::before {
    color: var(--navy-blue);
}

/* Hover Effects for List */
.service-card-modern:hover .service-list li {
    color: #222;
    transform: translateX(-3px);
}

[dir="ltr"] .service-card-modern:hover .service-list li {
    transform: translateX(3px);
}

.service-card-modern:hover .service-list li::before {
    transform: scale(1.3);
    font-size: 1rem;
}

/* Feature Box Title Hover */
.service-card-modern:hover .service-feature-box h4 {
    color: #1a2570;
}

.service-card-modern:hover .service-feature-box h4 i {
    transform: scale(1.2);
}

/* ===================================
   Alert Boxes - Minimal Style
   =================================== */

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
}

[dir="rtl"] .alert {
    flex-direction: row-reverse;
}

.alert-warning {
    background: #fff9e6;
    color: #997b00;
    border-left: 4px solid var(--gold-start);
}

[dir="rtl"] .alert-warning {
    border-left: none;
    border-right: 4px solid var(--gold-start);
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

[dir="rtl"] .alert-success {
    border-left: none;
    border-right: 4px solid #4caf50;
}

/* ===================================
   Consultation Methods - Minimal Badges
   =================================== */

.consultation-methods-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
    justify-content: center;
}

.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.method-badge:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: var(--navy-blue);
}

.services-grid-section-1 .method-badge:hover {
    border-color: var(--gold-start);
}

.services-grid-section-2 .method-badge:hover {
    border-color: var(--navy-blue);
}

.method-badge i {
    font-size: 1rem;
}

/* ===================================
   Animations - Subtle
   =================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card-modern {
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
}

.row.g-4 .col-lg-6:nth-child(1) .service-card-modern {
    animation-delay: 0.1s;
}

.row.g-4 .col-lg-6:nth-child(2) .service-card-modern {
    animation-delay: 0.15s;
}

.row.g-4 .col-lg-6:nth-child(3) .service-card-modern {
    animation-delay: 0.2s;
}

.row.g-4 .col-lg-6:nth-child(4) .service-card-modern {
    animation-delay: 0.25s;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 991px) {

    .services-grid-section-1,
    .services-grid-section-2 {
        padding: 3.5rem 0;
    }

    .section-main-title {
        font-size: 2.2rem;
    }

    .section-main-subtitle {
        font-size: 1rem;
    }

    .service-card-image {
        height: 240px;
    }

    .service-icon-modern {
        width: 65px;
        height: 65px;
        min-width: 65px;
    }

    .service-icon-modern i {
        font-size: 28px;
    }

    .service-card-title {
        font-size: 1.3rem;
    }

    .service-card-subtitle {
        font-size: 0.88rem;
    }
}

@media (max-width: 767px) {

    .services-grid-section-1,
    .services-grid-section-2 {
        padding: 2.8rem 0;
    }

    .section-main-title {
        font-size: 1.85rem;
    }

    .service-card-image {
        height: 200px;
    }

    .service-card-header {
        padding: 1.5rem 1.5rem 1.2rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    [dir="ltr"] .service-card-header {
        flex-direction: column;
        text-align: center;
    }

    .service-header-text {
        text-align: center;
    }

    [dir="ltr"] .service-header-text {
        text-align: center;
    }

    .service-icon-modern {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }

    .service-icon-modern i {
        font-size: 26px;
    }

    .service-card-title {
        font-size: 1.2rem;
    }

    .service-card-subtitle {
        font-size: 0.85rem;
    }

    .service-feature-box h4 {
        font-size: 1.05rem;
    }

    .service-list li {
        font-size: 0.9rem;
    }
}

@media (max-width: 575px) {

    .services-grid-section-1,
    .services-grid-section-2 {
        padding: 2rem 0;
    }

    .section-main-title {
        font-size: 1.55rem;
    }

    .service-card-image {
        height: 180px;
    }

    .service-card-header {
        padding: 1.2rem 1.2rem 1rem;
    }

    .service-card-body {
        padding: 1.5rem 1.5rem 2rem;
    }

    .service-icon-modern {
        width: 55px;
        height: 55px;
        min-width: 55px;
    }

    .service-icon-modern i {
        font-size: 24px;
    }

    .service-card-title {
        font-size: 1.1rem;
    }

    .service-card-subtitle {
        font-size: 0.82rem;
    }

    .service-feature-box h4 {
        font-size: 1rem;
    }

    .service-list li {
        font-size: 0.88rem;
    }
}

/* ===================================
   Accessibility & Print
   =================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {

    .services-grid-section-1,
    .services-grid-section-2 {
        padding: 0;
        background: white;
    }

    .service-card-modern {
        background: white !important;
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .service-card-modern::before {
        display: none;
    }
}