﻿/* Services Page Styles - Matches React Exactly */

/* ============================================
   PAGE HERO (with background image)
   ============================================ */
.services-page .page-hero {
    position: relative;
    padding: 160px 0 80px;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.services-page .page-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-600);
}

/* For archive page without image - gradient only */
.services-page:not(.service-detail-page) .page-hero__bg {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 100%);
}

.service-page .page-hero__overlay,
.services-page .page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 20, 35, 0.9) 0%, rgba(15, 70, 130, 0.85) 100%);
}

.services-page .page-hero__content,
.service-page .page-hero__content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 700px;
}

.services-page .page-hero__content h1,
.service-page .page-hero__content h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.services-page .page-hero__content p,
.service-page .page-hero__content p {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.8;
}

.service-page .page-hero__breadcrumb {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.9rem;
    color: white;
    margin-bottom: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

/* ============================================
   SERVICES GRID (Category View)
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.service-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.service-card__image {
    width: 200px;
    height: 200px;
    margin: 1.5rem auto 0;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-50);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card__image img {
    transform: scale(1.1);
}

.service-card__body {
    padding: 1.5rem;
    text-align: center;
    /* Center text as well for better alignment */
}

.service-card__body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.service-card__body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-500);
    font-weight: 600;
    transition: gap 0.3s;
}

.service-card:hover .service-card__link {
    gap: 0.75rem;
}

.service-card__link .icon {
    width: 18px;
    height: 18px;
}

/* ============================================
   SERVICE FEATURED IMAGE (Full Clear Display)
   ============================================ */
.service-featured-image {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.service-featured-image__img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.service-featured-image:hover .service-featured-image__img {
    transform: scale(1.02);
}

/* ============================================
   SERVICE LAYOUT (Two Column)
   ============================================ */
.service-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.service-main>div {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

/* Override for featured image - no padding needed */
.service-main>.service-featured-image {
    padding: 0;
}

.service-main>.service-featured-image h2 {
    display: none;
}

.service-main h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--neutral-100);
}

.content-text p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1rem;
}

.content-text p:last-child {
    margin-bottom: 0;
}

/* Features List */
.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.features-list .icon {
    width: 22px;
    height: 22px;
    color: var(--success-500);
    flex-shrink: 0;
}

/* Why Choose Us */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.why-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.why-item .icon {
    width: 40px;
    height: 40px;
    color: var(--primary-500);
    margin-bottom: 1rem;
}

.why-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.why-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   SERVICE SIDEBAR
   ============================================ */
.service-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.sidebar-card--cta {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
}

.sidebar-card--cta h3 {
    color: white;
}

.sidebar-card--cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.btn--block {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.btn--block:last-child {
    margin-bottom: 0;
}

.btn--outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn--outline-white:hover {
    background: white;
    color: var(--primary-600);
}

.related-services {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-services li {
    border-bottom: 1px solid var(--neutral-100);
}

.related-services li:last-child {
    border-bottom: none;
}

.related-services a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.related-services a:hover {
    color: var(--primary-500);
    padding-right: 0.5rem;
}

.related-services .icon {
    width: 18px;
    height: 18px;
}

/* ============================================
   MAIN SERVICES GRID (Archive Page)
   ============================================ */
.main-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.main-service-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
}

.main-service-card:hover {
    box-shadow: 0 30px 60px rgba(15, 94, 168, 0.2);
    transform: translateY(-8px);
}

.main-service-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.main-service-card__image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-100) 100%);
}

.main-service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.main-service-card:hover .main-service-card__image img {
    transform: scale(1.08);
}

.main-service-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 94, 168, 0) 0%, rgba(15, 94, 168, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.main-service-card:hover .main-service-card__overlay {
    opacity: 1;
}

.main-service-card__body {
    padding: 1.75rem 2rem 2rem;
    text-align: center;
}

.main-service-card__body h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.main-service-card:hover .main-service-card__body h2 {
    color: var(--primary-500);
}

.main-service-card__excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.main-service-card__body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.main-service-card__sub-count {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-600);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.main-service-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-500);
    font-weight: 700;
    font-size: 1rem;
    transition: gap 0.3s ease;
}

.main-service-card:hover .main-service-card__cta {
    gap: 0.75rem;
}

.main-service-card__icon {
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.main-service-card:hover .main-service-card__icon {
    transform: scale(1);
}

.main-service-card__icon svg {
    width: 42px;
    height: 42px;
    color: var(--primary-500);
}

/* ============================================
   ALL SERVICES CATEGORIES (Overview Section)
   ============================================ */
.all-services-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-category-block {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.service-category-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-100);
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.service-category-block__header:hover {
    color: var(--primary-500);
}

.service-category-block__header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.service-category-block__header .icon {
    width: 20px;
    height: 20px;
    color: var(--primary-500);
}

.service-category-block__items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-category-block__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-category-block__item .icon {
    width: 18px;
    height: 18px;
    color: var(--success-500);
    flex-shrink: 0;
}

.service-category-block__more {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary-500);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

/* ============================================
   CTA SECTION
   ============================================ */
.services-page .cta-section {
    position: relative;
    padding: 5rem 0;
    text-align: center;
}

.services-page .cta__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    z-index: -1;
}

.services-page .cta-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.services-page .cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .service-layout {
        grid-template-columns: 1fr;
    }

    .service-sidebar {
        position: static;
    }

    .main-services-grid {
        grid-template-columns: 1fr;
    }

    .main-service-card__image {
        height: 320px;
    }

    .all-services-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-page .page-hero__content h1 {
        font-size: 2rem;
    }

    .service-page .page-hero {
        padding: 120px 0 60px;
        min-height: 300px;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .main-service-card__body {
        padding: 1.5rem;
    }

    .main-service-card__body h2 {
        font-size: 1.25rem;
    }

    .services-page .cta-content h2 {
        font-size: 1.75rem;
    }

    .services-page .cta-content p {
        font-size: 1rem;
    }
}

/* ============================================
   PROBLEM & SOLUTIONS SECTIONS
   ============================================ */
.problem-solution-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.section-title.title-highlight {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-title.title-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    /* RTL */
    width: 60px;
    height: 3px;
    background: var(--primary-500);
    border-radius: 10px;
}

.problem-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-right: 4px solid var(--error-500);
    /* Red accent for problem */
}

.solutions-section .problem-text {
    border-right-color: var(--success-500);
    /* Green accent for solution if text used */
}

/* ============================================
   GALLERIES
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item-lightbox {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.gallery-item-lightbox:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item-inner {
    width: 100%;
    height: 100%;
}

.gallery-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item-lightbox:hover .gallery-item-inner img {
    transform: scale(1.1);
}

/* ============================================
   RELATED PRODUCTS SECTION
   ============================================ */
.related-products-section {
    margin-top: 4rem;
}

.custom-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

/* ==============================================
   Lightbox (Added for Service Page)
   ============================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-close i {
    width: 32px;
    height: 32px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    /* LTR default */
    left: -70px;
}

.lightbox-nav.next {
    /* LTR default */
    right: -70px;
}

/* RTL Adjustments for Nav */
[dir="rtl"] .lightbox-nav.prev {
    right: -70px;
    left: auto;
}

[dir="rtl"] .lightbox-nav.next {
    left: -70px;
    right: auto;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-nav.prev,
    [dir="rtl"] .lightbox-nav.prev {
        left: 10px;
        right: auto;
        background: rgba(0, 0, 0, 0.5);
    }

    .lightbox-nav.next,
    [dir="rtl"] .lightbox-nav.next {
        right: 10px;
        left: auto;
        background: rgba(0, 0, 0, 0.5);
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        z-index: 10;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
    }
}

/* Service Page Text Enhancements */
.service-text-lg {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 100%;
}

.service-text-lg p {
    margin-bottom: 1.5rem;
}

/* Gallery Captions */
.gallery-item-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.gallery-item-caption {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--primary-600);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #eee;
}

.gallery-item-inner {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item-wrapper:hover .gallery-item-inner {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-products-section .product-card__image-link {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.related-products-section .product-card__image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-products-section .product-card:hover .product-card__image-link img {
    transform: scale(1.1);
}

.related-products-section .product-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-products-section .product-card__title a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.related-products-section .product-card__title a:hover {
    color: var(--primary-500);
}

.related-products-section .product-card__price {
    color: var(--primary-600);
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: auto;
    padding-top: 1rem;
}