* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

/* Graphik Arabic Regular */
@font-face {
    font-family: 'Graphik Arabic';
    src: url('../fonts/graphik-arabic/GraphikArabic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Lyon Arabic Display Fonts */
@font-face {
    font-family: 'Lyon Arabic Display';
    src: url('../fonts/lyon-arabic-display/lyon-arabic-display-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Lyon Arabic Display';
    src: url('../fonts/lyon-arabic-display/lyon-arabic-display-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lyon Arabic Display';
    src: url('../fonts/lyon-arabic-display/lyon-arabic-display-medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Lyon Arabic Display';
    src: url('../fonts/lyon-arabic-display/lyon-arabic-display-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --font-heading: 'Lyon Arabic Display', 'Times New Roman', serif;
    --font-body: 'Graphik Arabic', system-ui, sans-serif;
}

body {
    font-family: 'Graphik Arabic', sans-serif;
    background-color: #FFF6E3;
    overflow-x: hidden;
}

/* Navbar Styles */
.navbar {
    background-color: #FFF8E7;
    padding: 20px 60px;
    box-shadow: none;
    border-bottom: none;
}

.navbar-brand img {
    height: 60px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu {
    font-family: 'Lyon Arabic Display';
    color: #000;
    font-size: 24px;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}

.menu:hover {
    color: #d4a03f;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #3d5a4d;
    padding: 40px 30px;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    will-change: transform;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar-menu.active {
    transform: translateY(0);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 30px;
    font-family: 'Lyon Arabic Display';
    display: block;
    text-align: right;
    width: 100%;
    padding: 0;
}

.close-btn:hover {
    color: #d4a03f;
}

.sidebar-menu nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.sidebar-menu nav a {
    color: white;
    text-decoration: none;
    font-family: 'Lyon Arabic Display';
    font-size: 20px;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.sidebar-menu nav a:hover {
    color: #d4a03f;
}

.sidebar-menu nav a.active {
    min-height: 0;
    max-height: calc(1.3em * 3);
    overflow: hidden;
    display: block;
}

.service-card-title a {
    color: inherit;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-links a {
    color: white;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #d4a03f;
}

.lang-link {
    color: white;
    text-decoration: none;
    font-family: 'Lyon Arabic Display';
    font-size: 18px;
    display: block;
}

.lang-link:hover {
    color: #d4a03f;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* Hero Section */
.services-hero {
    background: linear-gradient(135deg, #4B5BA8 0%, #2F306B 100%);
    padding: 80px 60px;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.services-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('../images/palm-decoration.svg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: contain;
    opacity: 0.15;
    pointer-events: none;
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-text-content {
    color: white;
}

.hero-title {
    font-family: 'Lyon Arabic Display';
    font-size: 56px;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-family: 'Lyon Arabic Display';
    font-size: 32px;
    font-weight: 400;
    color: white;
    margin-bottom: 40px;
    line-height: 1.3;
}

.hero-description {
    font-family: var(--font-body);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
}

.hero-description p {
    margin-bottom: 20px;
}

.hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-family-img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

/* Services Section */
.services-section {
    background-color: #FFFEF9;
    padding: 100px 60px;
}

.services-section .container {
    max-width: 1600px;
}

.services-header {
    text-align: center;
    margin-bottom: 60px;
}

.services-title {
    font-family: 'Lyon Arabic Display';
    font-size: 56px;
    font-weight: 900;
    color: #21211B;
    margin-bottom: 20px;
}

.services-description {
    font-family: var(--font-body);
    font-size: 20px;
    color: #5C5C5A;
    max-width: 700px;
    margin: 0 auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    gap: clamp(20px, 3vw, 40px);
    max-width: 100%;
    margin: 0 auto;
    direction: rtl;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[dir="ltr"] .services-grid {
    direction: ltr;
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-areas:
            "s1 s2 s3 s4"
            "s5 s6 s7 s8"
            ". s9 s10 .";
    }

    .services-grid > .service-card:nth-child(1) { grid-area: s1; }
    .services-grid > .service-card:nth-child(2) { grid-area: s2; }
    .services-grid > .service-card:nth-child(3) { grid-area: s3; }
    .services-grid > .service-card:nth-child(4) { grid-area: s4; }
    .services-grid > .service-card:nth-child(5) { grid-area: s5; }
    .services-grid > .service-card:nth-child(6) { grid-area: s6; }
    .services-grid > .service-card:nth-child(7) { grid-area: s7; }
    .services-grid > .service-card:nth-child(8) { grid-area: s8; }
    .services-grid > .service-card:nth-child(9) { grid-area: s9; }
    .services-grid > .service-card:nth-child(10) { grid-area: s10; }
}

.service-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 228px;
    height: auto;
    justify-self: stretch;
    padding: 24px 16px;
    background-color: #FFF9EF;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.12);
}

.service-card-body {
    padding: 0;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-content: stretch;
}

.service-card-title {
    font-family: 'Lyon Arabic Display';
    font-size: 20px;
    font-weight: 900;
    color: #111111;
    margin: 0 0 1.65em;
    line-height: 1.3;
    min-height: 0;
    max-height: calc(1.3em * 3);
    overflow: hidden;
    display: block;
}

.service-card-title a {
    color: inherit;
    text-decoration: none;
}

.service-card-title a:hover {
    color: #000000;
    text-decoration-color: #000000;
}

.service-card-description {
    font-family: var(--font-body);
    font-size: 13px;
    color: #4d4d4d;
    line-height: 1.65;
    margin: 0 0 8px;
    min-height: 0;
    align-self: end;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-learn-more {
    font-family: var(--font-body);
    color: #111111;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    gap: 16px;
    transition: color 0.3s ease;
    margin-top: 0;
    position: relative;
}

.service-learn-more::after {
    content: "";
    width: 18px;
    height: 20px;
    flex-shrink: 0;
    display: block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12a2 2 0 0 1 2 2v18l-8-5-8 5V4a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.service-learn-more:hover {
    color: #000000;
}

.service-card-footer {
    padding: 0 32px 28px;
    text-align: center;
}

.service-apply-btn {
    font-family: var(--font-body);
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background-color: transparent;
    color: #111111;
    border: 1px solid #111111;
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.service-apply-btn:hover {
    background-color: #111111;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background-color: #21211B;
    color: white;
    padding: 80px 60px 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.footer-logo-img {
    height: 60px;
}

.footer-separator {
    width: 2px;
    height: 60px;
    background-color: #444;
}

.footer-logo-uae {
    height: 60px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 35px;
    height: 35px;
    display: inline-block;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #3a3a3a;
    transform: translateY(-3px);
}

.footer-heading {
    font-size: 24px;
    font-family: 'Lyon Arabic Display';
    font-weight: 900;
    color: #E59D00;
    margin-bottom: 25px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #ccc;
}

.contact-icon {
    width: 20px;
    height: 20px;
    margin-top: 3px;
}

.contact-info-item a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info-item a:hover {
    color: white;
}

.icon-16 {
    width: 20px;
    height: 20px;
}

/* Responsive Design */

/* Tablets and Small Laptops */
@media (max-width: 1200px) {
    .navbar {
        padding: 20px 40px;
    }

    .services-hero {
        padding: 70px 40px;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 28px;
    }

    .services-section {
        padding: 80px 40px;
    }

    .footer {
        padding: 60px 40px 40px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .navbar {
        padding: 20px 30px;
    }

    .services-hero {
        padding: 60px 30px;
        min-height: auto;
    }

    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 24px;
    }

    .hero-description {
        font-size: 15px;
    }

    .services-section {
        padding: 70px 30px;
    }

    .services-title {
        font-size: 44px;
    }

    .services-description {
        font-size: 18px;
    }

    .footer {
        padding: 50px 30px 30px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .services-hero {
        padding: 50px 20px;
    }

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

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 14px;
    }

    .services-section {
        padding: 60px 20px;
    }

    .services-title {
        font-size: 36px;
    }

    .services-description {
        font-size: 16px;
    }

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

    .footer {
        padding: 40px 20px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-section:first-child {
        grid-column: 1;
    }

    .footer-heading {
        font-size: 20px;
    }
}

/* Mobile Portrait */
@media (max-width: 576px) {
    .navbar {
        padding: 12px 15px;
    }

    .footer-logo-img,
    .footer-logo-uae {
        height: 45px;
    }

    .footer-separator {
        height: 45px;
    }

    .services-hero {
        padding: 40px 15px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-description p {
        margin-bottom: 15px;
    }

    .services-section {
        padding: 50px 15px;
    }

    .services-title {
        font-size: 30px;
        margin-bottom: 15px;
    }

    .services-description {
        font-size: 14px;
    }

    .service-apply-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    .footer {
        padding: 35px 15px 20px;
    }

    .footer-content {
        gap: 30px;
    }

    .footer-logo {
        gap: 15px;
        margin-bottom: 20px;
    }

    .footer-heading {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .contact-info-item {
        font-size: 12px;
        gap: 10px;
    }

    .contact-icon {
        width: 18px;
        height: 18px;
    }
}

/* Extra Small Devices */
@media (max-width: 400px) {
    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .services-title {
        font-size: 26px;
    }

    .hero-description,
    .services-description {
        font-size: 12px;
    }
}
