/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

/* Variables */
:root {
    --header-height: 3.5rem;

    /* Colors */
    --hue: 210;
    --sat: 90%;
    --lig: 30%;

    --first-color: hsl(var(--hue), var(--sat), var(--lig));
    --first-color-alt: hsl(var(--hue), var(--sat), 25%);
    /* Darker for hover */
    --first-color-light: hsl(var(--hue), var(--sat), 80%);
    --first-color-lighten: hsl(var(--hue), var(--sat), 92%);
    --title-color: hsl(var(--hue), 15%, 15%);
    --text-color: hsl(var(--hue), 10%, 35%);
    --text-color-light: hsl(var(--hue), 8%, 60%);
    --body-color: hsl(var(--hue), 30%, 99%);
    --container-color: #fff;
    --border-color: rgba(0, 0, 0, 0.1);

    /* Accent */
    --accent-color: hsl(35, 90%, 55%);
    /* Gold/Orange */

    /* Typography */
    --body-font: 'Outfit', sans-serif;
    /* Default EN */
    --big-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /* Font weight */
    --font-regular: 400;
    --font-medium: 600;
    --font-semi-bold: 700;

    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* RTL Specifics (Arabic is Default in HTML but we handle dir) */
[dir="rtl"] {
    --body-font: 'Cairo', sans-serif;
}

/* Dark Theme */
[data-theme="dark"] {
    --first-color-light: hsl(var(--hue), 15%, 75%);
    --title-color: hsl(var(--hue), 10%, 95%);
    --text-color: hsl(var(--hue), 10%, 80%);
    --body-color: hsl(var(--hue), 20%, 12%);
    --container-color: hsl(var(--hue), 20%, 16%);
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Base */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color .4s, color .4s;
    /* Smooth theme transition */
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

/* Reusable CSS Classes */
.container {
    max-width: 968px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.section {
    padding: 4.5rem 0 2rem;
}

.section__title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section__title::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    bottom: 0;
    left: 50%;
    /* Center the line */
    transform: translateX(-50%);
    border-radius: 2px;
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--accent-color);
    font-weight: var(--font-medium);
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.button {
    display: inline-block;
    background-color: var(--first-color);
    color: #fff;
    padding: 1rem 1.75rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    transition: .3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
}

.button--ghost {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.button--ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.button--white {
    background-color: #fff;
    color: var(--first-color);
}

.button--white:hover {
    background-color: #f0f0f0;
}


/* Header */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--body-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: .4s;
}

.header__container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    column-gap: .5rem;
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    transition: .3s;
}

.logo__icon {
    font-size: 1.5rem;
    color: var(--first-color);
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo__title {
    font-size: 1.1rem;
    color: var(--title-color);
}

.logo__subtitle {
    font-size: 0.65rem;
    color: var(--text-color-light);
    letter-spacing: 0.5px;
}

.header__actions {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.theme-toggle,
.lang-toggle,
.nav__toggle {
    font-size: 1.25rem;
    color: var(--title-color);
    cursor: pointer;
    transition: .3s;
}

.theme-toggle:hover,
.lang-toggle:hover,
.nav__toggle:hover {
    color: var(--first-color);
}

.lang-toggle {
    font-size: 1rem;
    font-weight: var(--font-medium);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

/* Nav */
@media screen and (max-width: 767px) {
    .nav {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background-color: var(--container-color);
        padding: 2rem 1.5rem 4rem;
        box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
        border-radius: 1.5rem 1.5rem 0 0;
        transition: .3s;
        z-index: var(--z-fixed);
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    row-gap: 2rem;
    padding-top: 1rem;
}

.nav__link {
    font-size: var(--normal-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
    transition: .3s;
}

.nav__link:hover {
    color: var(--first-color);
}

.active-link {
    color: var(--first-color);
    /* position: relative; */
    /* Simplify for now */
}

.nav__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    /* In RTL this will be left, handled by dir? No, fixed pos needs logical props or specific override */
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
}

[dir="rtl"] .nav__close {
    right: auto;
    left: 1.5rem;
}

.nav__toggle {
    display: none;
    /* See media queries */
    font-size: 1.25rem;
    color: var(--title-color);
}

@media screen and (max-width: 767px) {
    .nav__toggle {
        display: block;
    }
}

.show-menu {
    bottom: 0;
}

/* Home */
.home {
    position: relative;
    padding: 0;
    height: 100vh;
    /* Full screen hero */
    display: flex;
    align-items: center;
    overflow: hidden;
}

.home__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.home__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(hsla(var(--hue), 60%, 15%, 0.8),
            hsla(var(--hue), 60%, 15%, 0.4));
    z-index: -1;
}

.home__container {
    position: relative;
    z-index: 1;
}

.home__content {
    max-width: 600px;
}

.home__title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.home__description {
    color: #e0e0e0;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.home__btns {
    display: flex;
    gap: 1rem;
}

/* About */
.about__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

.about__data {
    text-align: start;
    /* Fix for rtl/ltr */
}

.about__description {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.about__info {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.about__info-card {
    background-color: var(--container-color);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
}

.about__icon {
    font-size: 1.5rem;
    color: var(--first-color);
    margin-bottom: 0.5rem;
}

.about__info-title {
    font-size: var(--small-font-size);
    font-weight: var(--font-bold);
}

.about__info-subtitle {
    font-size: var(--smaller-font-size);
    display: block;
    margin-top: 5px;
}

.about__img-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.about__img-bg {
    width: 300px;
    height: 350px;
    background-color: var(--first-color);
    border-radius: 1.5rem;
    position: absolute;
    opacity: 0.15;
}

.about__img-content {
    width: 280px;
    height: 330px;
    border-radius: 1.25rem;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.about__img-icon {
    font-size: 5rem;
    color: var(--first-color-light);
    opacity: 0.5;
}


/* Services */
.services__container {
    padding-top: 1rem;
}

.services__content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.services__card {
    background-color: var(--container-color);
    padding: 2.5rem 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: .3s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.services__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.services__icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: var(--first-color-lighten);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    color: var(--first-color);
    font-size: 1.75rem;
    transition: .3s;
}

.services__card:hover .services__icon {
    background-color: var(--first-color);
    color: #fff;
    transform: rotate(15deg);
}

.services__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.services__description {
    font-size: var(--small-font-size);
    margin-bottom: 2rem;
    color: var(--text-color-light);
}

.services__button {
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.5rem;
    cursor: pointer;
    font-weight: var(--font-medium);
    transition: .3s;
}

.services__button:hover {
    column-gap: 0.8rem;
}

[dir="rtl"] .services__button-icon {
    transform: rotate(180deg);
}


/* CTA */
.cta {
    padding: 0;
}

.cta__bg {
    background: url('../assets/images/hero.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    padding: 5rem 0;
}

.cta__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--first-color);
    opacity: 0.8;
}

.cta__container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta__title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.cta__description {
    color: #e0e0e0;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Contact */
.contact__container {
    row-gap: 3rem;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.contact__info {
    display: grid;
    gap: 2rem;
}

.contact__card {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: repeat(2, auto);
    column-gap: 1rem;
    align-items: center;
}

.contact__icon {
    font-size: 1.5rem;
    color: var(--first-color);
    grid-row: 1 / 3;
}

.contact__card-title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
}

.contact__card-data {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.contact__form-div {
    margin-bottom: 2rem;
    position: relative;
    height: 4rem;
}

.contact__form-area {
    height: 8rem;
}

.contact__form-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--border-color);
    background: none;
    color: var(--text-color);
    outline: none;
    padding: 1.5rem;
    border-radius: 0.75rem;
    z-index: 1;
    transition: .3s;
    font-family: var(--body-font);
    /* Important for textarea */
}

.contact__form-tag {
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    /* Will flip in dir=rtl? Needs override */
    font-size: var(--smaller-font-size);
    padding: 0.25rem;
    background-color: var(--body-color);
    /* To hide border line behind label */
    z-index: 10;
    color: var(--text-color);
    transition: .3s;
}

[dir="rtl"] .contact__form-tag {
    left: auto;
    right: 1.25rem;
}

.contact__form-input:focus {
    border-color: var(--first-color);
}


/* Footer */
.footer {
    background-color: var(--first-color);
    color: #fff;
    padding-top: 1rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer__link {
    color: #d9d9d9;
    font-size: var(--small-font-size);
    display: block;
    margin-bottom: 0.75rem;
    transition: .3s;
}

.footer__link:hover {
    color: #fff;
    transform: translateX(5px);
}

[dir="rtl"] .footer__link:hover {
    transform: translateX(-5px);
}

.footer__description {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: #d9d9d9;
    font-size: var(--small-font-size);
    line-height: 1.5;
}

.footer__social {
    display: flex;
    column-gap: 1.25rem;
}

.footer__social-link {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 0.4rem;
    /* Rounded square */
    color: #fff;
    font-size: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .3s;
}

.footer__social-link:hover {
    background-color: var(--accent-color);
}

.footer__copy {
    display: block;
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--smaller-font-size);
    color: #d9d9d9;
}

/* Scroll Up */
.scrollup {
    position: fixed;
    right: 1.5rem;
    /* left in rtl */
    bottom: -20%;
    background-color: var(--first-color);
    padding: 0.5rem;
    border-radius: 0.25rem;
    z-index: var(--z-tooltip);
    transition: .4s;
    display: flex;
}

[dir="rtl"] .scrollup {
    right: auto;
    left: 1.5rem;
}

.scrollup:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-0.25rem);
}

.scrollup__icon {
    font-size: 1.25rem;
    color: #fff;
}

.show-scroll {
    bottom: 3rem;
}

/* Responsive Breakpoints */
@media screen and (max-width: 992px) {
    .container {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .about__container,
    .contact__wrapper {
        grid-template-columns: 1fr;
    }

    .services__content {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__img-wrapper {
        height: 300px;
        /* Smaller image area */
    }
}

@media screen and (max-width: 767px) {
    .services__content {
        grid-template-columns: 1fr;
    }

    .footer__container {
        grid-template-columns: 1fr;
    }

    .home__title {
        font-size: 2rem;
    }
}

@media screen and (min-width: 968px) {
    .nav__list {
        flex-direction: row;
        column-gap: 3rem;
        padding-top: 0;
    }

    .nav {
        background: none;
        box-shadow: none;
        width: initial;
        height: initial;
        padding: 0;
        border-radius: 0;
    }

    .nav__icon,
    .nav__close,
    .nav__toggle {
        display: none;
    }

    .container {
        margin-left: auto;
        margin-right: auto;
    }
}