/* Modern Services Design */

/* Hero Section */
.services-hero-section {
    background: linear-gradient(135deg, var(--emerald-primary) 0%, var(--emerald-dark) 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.services-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.services-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--cream-primary);
}

.services-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--cream-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.services-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Services Grid */
.services-modern-section {
    background: var(--cream-primary);
    position: relative;
}

.services-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-modern-card {
    background: var(--cream-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.service-modern-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--emerald-primary);
}

.service-modern-card__header {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.service-modern-card__image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.service-modern-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-modern-card:hover .service-modern-card__image {
    transform: scale(1.1);
}

.service-modern-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-modern-card:hover .service-modern-card__overlay {
    opacity: 1;
}

.service-modern-card__icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--emerald-primary);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-modern-card:hover .service-modern-card__icon {
    transform: scale(1);
}

.service-modern-card__body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-modern-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--emerald-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.service-modern-card:hover .service-modern-card__title {
    color: var(--emerald-primary);
}

.service-modern-card__description {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-modern-card__subservices-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--emerald-primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.service-modern-card__subservices-count i {
    font-size: 1.1rem;
}

.service-modern-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--emerald-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 15px;
}

.service-modern-card__link:hover {
    color: var(--gold-primary);
    gap: 0.75rem;
}

.service-modern-card__link i {
    transition: transform 0.3s ease;
}

.service-modern-card__link:hover i {
    transform: translateX(5px);
}

[dir="rtl"] .service-modern-card__link:hover i {
    transform: translateX(-5px);
}

/* Breadcrumb */
.service-breadcrumb-section {
    background: var(--cream-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--emerald-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--gold-primary);
}

.breadcrumb-item.active {
    color: rgba(0, 0, 0, 0.6);
}

/* Service Detail Hero Image */
.service-detail-hero-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--emerald-dark);
    opacity: 0.7;
}

.service-detail-hero-image .hero-image-wrapper {
    width: 100%;
    height: 80vh;
    min-height: 500px;
    max-height: 800px;
    position: relative;
    overflow: hidden;
}

.service-detail-hero-image .hero-image-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-detail-hero-image .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.service-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
}

.service-hero-content {
    width: 100%;
    position: relative;
    z-index: 2;
}

.service-hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    color: var(--cream-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Service Detail Hero */
.service-detail-hero {
    padding: 4rem 0;
    background: var(--cream-primary);
}

.service-detail-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.service-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.service-detail-content {
    padding: 2rem 0;
    text-align: center;
}

.service-detail-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--emerald-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.service-detail-description {
    font-size: 1.15rem;
    line-height: 2;
    color: rgba(0, 0, 0, 0.75);
    text-align: justify;
    max-width: 900px;
    margin: 0 auto;
}

.service-detail-description p {
    margin-bottom: 1.5rem;
}

.service-detail-description p:last-child {
    margin-bottom: 0;
}

/* Sub-Services Section */
.sub-services-section {
    background: var(--cream-light);
}

.section-header-modern {
    text-align: center;
}

.section-title-modern {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--emerald-dark);
    margin-bottom: 0.75rem;
}

.section-subtitle-modern {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.6);
    max-width: 600px;
    margin: 0 auto;
}

.sub-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.sub-service-modern-card {
    background: var(--cream-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.sub-service-modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.sub-service-modern-card__image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.sub-service-modern-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sub-service-modern-card:hover .sub-service-modern-card__image {
    transform: scale(1.1);
}

.sub-service-modern-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sub-service-modern-card:hover .sub-service-modern-card__overlay {
    opacity: 1;
}

.sub-service-modern-card__view-btn {
    width: 60px;
    height: 60px;
    background: var(--cream-primary);
    border: none;
    border-radius: 50%;
    color: var(--emerald-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sub-service-modern-card__view-btn:hover {
    background: var(--emerald-primary);
    color: var(--cream-primary);
    transform: scale(1.1);
}

.sub-service-modern-card__body {
    padding: 1.75rem;
}

.sub-service-modern-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--emerald-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.sub-service-modern-card__description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 1.25rem;
}

.sub-service-modern-card__more-btn {
    background: transparent;
    border: 2px solid var(--emerald-primary);
    color: var(--emerald-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.sub-service-modern-card__more-btn:hover {
    background: var(--emerald-primary);
    color: var(--cream-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
}

.modal-header {
    background: var(--emerald-primary);
    color: var(--cream-primary);
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.btn-close {
    filter: invert(1);
    opacity: 0.9;
}

.modal-body {
    padding: 2rem;
}

.sub-service-modal-image {
    border-radius: 12px;
    overflow: hidden;
}

.sub-service-modal-image img {
    width: 100%;
    height: auto;
}

.sub-service-modal-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(0, 0, 0, 0.75);
    text-align: justify;
}

/* Related Services - Improved Design */
.related-services-section {
    background: linear-gradient(to bottom, var(--cream-light) 0%, var(--cream-primary) 100%);
    position: relative;
}

.related-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.related-service-card {
    background: var(--cream-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.related-service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--emerald-primary);
    text-decoration: none;
}

.related-service-card__image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.related-service-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.related-service-card:hover .related-service-card__image {
    transform: scale(1.1);
}

.related-service-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.related-service-card:hover .related-service-card__overlay {
    opacity: 1;
}

.related-service-card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: var(--cream-primary);
}

.related-service-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald-dark);
    margin-bottom: 1.25rem;
    line-height: 1.3;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.related-service-card:hover .related-service-card__title {
    color: var(--emerald-primary);
}

.related-service-card__link {
    color: var(--emerald-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.related-service-card:hover .related-service-card__link {
    color: var(--gold-primary);
    gap: 0.75rem;
}

.related-service-card__link i {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

.related-service-card:hover .related-service-card__link i {
    transform: translateX(5px);
}

[dir="rtl"] .related-service-card:hover .related-service-card__link i {
    transform: translateX(-5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-modern-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .services-hero-section {
        padding: 4rem 0 3rem;
    }

    .services-hero-title {
        font-size: 2rem;
    }

    .services-hero-subtitle {
        font-size: 1rem;
    }

    .services-modern-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-modern-card__header {
        height: 240px;
    }

    .sub-services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .related-services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .related-service-card__image-wrapper {
        height: 240px;
    }

    .related-service-card__content {
        padding: 1.5rem;
    }

    .related-service-card__title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .service-detail-hero-image .hero-image-wrapper {
        height: 50vh;
        min-height: 400px;
        max-height: 600px;
    }

    .service-hero-overlay {
        padding-bottom: 2rem;
    }

    .service-hero-title {
        font-size: 2rem;
    }

    .service-detail-content {
        padding: 1.5rem 0;
        margin-top: 1rem;
    }

    .service-detail-description {
        font-size: 1rem;
        line-height: 1.8;
        text-align: left;
    }
}

[dir="rtl"] .service-modern-card__icon {
    right: auto;
    left: 1.5rem;
}

[dir="rtl"] .service-breadcrumb-section {
    text-align: right;
}
