@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #f0f0f0;
    --accent-color: #ff4b5c;
    --text-color: #333;
    --background-color: #ffffff;
}

[data-theme="dark"] {
    --primary-color: #f0f0f0;
    --secondary-color: #0a0a0a;
    --text-color: #f0f0f0;
    --background-color: #0a0a0a;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

header {
    padding: 1rem 5%;
    background-color: transparent;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s;
}

header.scrolled {
    background-color: var(--background-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.site-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: filter 0.3s;
}

.logo-text {
    font-size: 1.8rem;
    letter-spacing: 3px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
}

[data-theme="dark"] .site-logo {
    /* Slightly brighten the metallic logo in dark mode for better contrast */
    filter: brightness(1.2) contrast(1.1);
}

.language-switcher button {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}

.language-switcher button.active,
.language-switcher button:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.controls {
    display: flex;
    align-items: center;
}

.theme-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem;
    margin-left: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    font-size: 1.2rem;
    line-height: 1;
}

.theme-btn:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

body, html {
    /* Only hide overflow on index page which has scroll-container 
       Inner pages will override this below */
    height: 100%;
    overflow: hidden;
}

body.inner-page, html:has(body.inner-page) {
    height: auto;
    overflow: visible;
    overflow-x: hidden;
}


.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.scroll-container > section {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1));
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    animation: fadeInUp 1s ease-out 0.5s;
    animation-fill-mode: backwards;
}

.services-container {
    position: relative;
    overflow: hidden;
}

.services-wrapper {
    display: flex;
    width: 500%; /* 5 services */
    transition: transform 0.5s ease-in-out;
}

.service-item {
    flex: 1;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.service-item a {
    text-decoration: none;
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;
}

.service-item h2 {
    font-size: 5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 1;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 3;
    font-size: 2rem;
}

.prev-arrow {
    left: 2rem;
}

.next-arrow {
    right: 2rem;
}

.site-footer {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 4rem 5%;
    scroll-snap-align: start; /* CHANGE: This line was added */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-logo .site-logo {
    height: 90px;
}

.footer-about h3, .footer-contact h3, .footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-about p, .footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-social a {
    margin-right: 1rem;
}

.footer-social img {
    width: 24px;
    height: 24px;
    filter: invert(0);
}

[data-theme="dark"] .footer-social img {
    filter: invert(1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001; /* Keep above the menu */
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg);
        top: -1px;
        left: 2px;
        position: relative;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        width: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: 1px;
        left: 2px;
        position: relative;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .service-item h2 {
        font-size: 3rem;
    }

    .nav-arrow {
        padding: 0.5rem;
        font-size: 1.5rem;
    }

    .prev-arrow {
        left: 1rem;
    }

    .next-arrow {
        right: 1rem;
    }

    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap; /* Allows controls to wrap to a new line */
    }

    .controls {
        width: 100%;
        margin-top: 1rem;
        flex-direction: column;
        display: none; /* hidden by default */
        padding: 1.5rem;
        background-color: var(--background-color);
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }

    .controls.active {
        display: flex;
        animation: fadeInDown 0.3s ease-out;
    }

    [data-theme="dark"] .controls {
        box-shadow: 0 4px 15px rgba(255,255,255,0.05);
    }

    .language-switcher {
        margin-top: 0;
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .language-switcher button {
        width: 100%;
        margin: 0;
    }
    
    .theme-btn {
        margin-left: 0;
        width: 100%;
    }
}

[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

[lang="ar"] .language-switcher button {
    margin-left: 0;
    margin-right: 0.5rem;
}

[lang="ar"] nav {
    flex-direction: row;
}

[lang="ar"] .controls {
    flex-direction: row;
}

@media (max-width: 768px) {
    [lang="ar"] .controls {
        flex-direction: column;
    }
}

/* --- Inner Pages Styles --- */

.inner-hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 0;
}

.inner-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

.inner-hero p {
    font-size: 1.2rem;
    color: #fff;
    max-width: 700px;
    animation: fadeInUp 1s ease-out 0.5s;
    animation-fill-mode: backwards;
}

.page-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--background-color);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

[data-theme="dark"] .feature-card {
    border-color: #333;
    box-shadow: 0 4px 6px rgba(255,255,255,0.02);
}

[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.08);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-color);
    opacity: 0.9;
}

.cta-section {
    text-align: center;
    padding: 4rem 5%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 15px;
    margin: 4rem 5%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 30px;
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: scale(1.05);
}
