/*
 * Base Stylesheet for the Khassm portfolio website.
 * The design uses a mobile‑first approach with fluid layouts
 * implemented via Flexbox and CSS Grid.  Colours are inspired by
 * the brochure – shades of green for accents and clean whites for
 * content areas.  Media queries progressively enhance the layout
 * for larger screens.
 */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.5;
}


html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* This pushes the footer down */
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}



/* ========= Self-hosted English font ========= */
@font-face {
    font-family: "Lora";
    src: url("../fonts/english/Lora-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
               U+02C6, U+02DA, U+02DC, U+2000-206F,
               U+2074, U+20AC, U+2122, U+2191, U+2193,
               U+2212, U+2215, U+FEFF, U+FFFD, U+0030-0039;
}

@font-face {
    font-family: "Lora";
    src: url("../fonts/english/Lora-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
               U+02C6, U+02DA, U+02DC, U+2000-206F,
               U+2074, U+20AC, U+2122, U+2191, U+2193,
               U+2212, U+2215, U+FEFF, U+FFFD, U+0030-0039;
}

@font-face {
    font-family: "Lora";
    src: url("../fonts/english/Lora-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
               U+02C6, U+02DA, U+02DC, U+2000-206F,
               U+2074, U+20AC, U+2122, U+2191, U+2193,
               U+2212, U+2215, U+FEFF, U+FFFD, U+0030-0039;
}


/* ========= Self-hosted Arabic font ========= */
@font-face {
    font-family: "GEHili";
    src: url("../fonts/arabic/ArbFONTS-GE-Hili-Light.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-065F, U+066A-06EF, U+06FA-06FF;
}

@font-face {
    font-family: "GEHili";
    src: url("../fonts/arabic/ArbFONTS-GE-Hili-Book.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-065F, U+066A-06EF, U+06FA-06FF;
}



body {
    font-family: "Lora", "GEHili", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #333;
    background-color: #f7f7f7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #0b7e3f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 999;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

header .logo img {
    height: 48px;
}

/* Navigation */
#main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}



#main-navigation a {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#main-navigation a:hover,
#main-navigation a.active {
    background-color: #0b7e3f;
    color: #fff;
}

/* Mobile menu toggle */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #00985a 0%, #00b27a 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    background-color: #0b7e3f;
    color: #ffffff;

    padding: 0.75rem 1.5rem;
    border-radius: 999px; /* pill shape */

    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;

    border: none;
    cursor: pointer;
    text-decoration: none;

    transition:
        background-color 180ms ease,
        transform 120ms ease,
        box-shadow 180ms ease;
}

/* Hover */
.button:hover {
    background-color: #086534;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(11, 126, 63, 0.25);
    text-decoration: none;
}

/* Active (press) */
.button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(11, 126, 63, 0.2);
}

/* Focus (keyboard accessibility) */
.button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(11, 126, 63, 0.35),
        0 6px 18px rgba(11, 126, 63, 0.25);
}


/* Features Section */
.features {
    background-color: #f0f7f2;
    padding: 2rem 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #0b7e3f;
}

.feature p {
    color: #555;
}

/* CTA Section */
.cta {
    background-color: #f0f7f2;
    padding: 2rem 0;
    text-align: center;
}

.cta h2 {
    margin-bottom: 1rem;
    color: #0b7e3f;
}

.cta p {
    margin-bottom: 1.5rem;
    color: #555;
}

/* Page header */
.page-header {
    background-color: #0b7e3f;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.page-header p {
    font-size: 1rem;
    color: #d1ffdd;
}

/* About page content */
.content {
    background-color: #ffffff;
    padding: 2rem 0;
}

.content h2 {
    margin-top: 1rem;
    color: #0b7e3f;
}

.content p, .content ul {
    margin-top: 0.5rem;
    color: #555;
}

.content ul {
    padding-left: 1.5rem;
}

.content ul li {
    margin-bottom: 0.5rem;
}

/* Services page */
.services-list {
    background-color: #ffffff;
    padding: 2rem 0;
    flex: 1; /* takes remaining space under page-header */
    display: flex;
    align-items: center; /* vertical centering */
    
}

.services-list > .container {
    width: 100%;
}


.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
}

.service h3 {
    margin-bottom: 0.5rem;
    color: #0b7e3f;
}

.service p {
    color: #555;
}

/* Gallery */
.gallery-section {
    background-color: #ffffff;
    padding: 2rem 0;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.image-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.2s;
}

.image-item img:hover {
    transform: scale(1.05);
}

/* Upload form */
.upload-section {
    background-color: #f9f9f9;
    padding: 2rem 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

/* Contact form */
.contact-section {
    background-color: #ffffff;
    padding: 2rem 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.success-message {
    color: green;
    margin-bottom: 1rem;
}

.error-message {
    color: red;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #222;
    color: #ccc;
    padding: 2rem 0;
}

footer h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 1rem;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

/* button */
.social-links a {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);

  transition: transform 140ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

/* SVG image */
.social-links a img {
  width: 18px;
  height: 18px;
  display: block;

  /* Make SVG appear white on dark footer */
  filter: brightness(0) invert(1);
  opacity: 0.95;

  transition: opacity 160ms ease, transform 140ms ease;
}

.social-links a:hover {
  background: rgba(11,126,63,0.95);
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.social-links a:hover img {
  opacity: 1;
  transform: scale(1.02);
}

.social-links a:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
}

.social-links a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11,126,63,0.45), 0 10px 22px rgba(0,0,0,0.25);
}


.social-links a[aria-label="WhatsApp"]:hover { background: #25D366; }
.social-links a[aria-label="LinkedIn"]:hover { background: #0A66C2; }
.social-links a[aria-label="Facebook"]:hover { background: #1877F2; }
.social-links a[aria-label="X / Twitter"]:hover { background: #111; }



/* Responsive breakpoints */
@media screen and (min-width: 600px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {

    /* Show burger on mobile */
    #mobile-menu-toggle {
        display: block;
        color: #0b7e3f;
    }
    
    

    /* The dropdown menu */
    #main-navigation ul {
      position: absolute;
      top: calc(100% + 10px);

      /* ✅ true center relative to header .container */
      left: 0;
      right: 0;
      margin: 0 auto;

      width: min(320px, 92vw);  /* a bit wider and more modern */
      display: none;

      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      gap: 0;

      background-color: #fff;
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 12px;
      padding: 10px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.12);
      z-index: 1000;
    }

    /* Open state */
    #main-navigation ul.show {
        display: flex;
    }

    /* Each item takes full width */
    #main-navigation ul li {
        width: 100%;
    }

    /* Links are centered and full width */
    #main-navigation ul li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }


    
}

header .container {
    position: relative; /* anchor for the dropdown */
}



/* RTL support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .grid-3,
[dir="rtl"] .grid-2 {
    /* Keep content order left-to-right inside grids even in RTL */
    direction: ltr;
}

[dir="rtl"] footer {
    text-align: right;
}

/* =========================
   Our Clients section (Centered + White + Fade edges)
   ========================= */

.clients {
    padding: 2rem 0;
    background: #fff;           /* whole section white */
    text-align: center;         /* center like CTA */
}

.clients-head h2 {
    font-weight: 700; 
    margin-bottom: 1rem;
    color: #0b7e3f;             /* match CTA heading tone */
}

.clients-head p {
    font-weight: 400; 
    margin: 0 auto 1.5rem;
    color: #555;
    max-width: 850px;           /* keeps paragraph neat like CTA */
}

/* Marquee wrapper: NO background, no border */
.clients-marquee {
    position: relative;
    overflow: hidden;
    background: transparent;    /* no background behind scroll */
}

/* Fading edges (LTR default) */
.clients-marquee::before,
.clients-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 64px;                /* fade width */
    pointer-events: none;
    z-index: 2;
}

/* Left fade */
.clients-marquee::before {
    left: 0;
    background: linear-gradient(to right, #fff, rgba(255,255,255,0));
}

/* Right fade */
.clients-marquee::after {
    right: 0;
    background: linear-gradient(to left, #fff, rgba(255,255,255,0));
}

/* Track that moves */
.clients-track {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 0;
    width: max-content;
    margin: 0 auto;             /* keeps track centered visually */
    animation: clients-scroll-ltr 22s linear infinite;
}

/* Larger logo cards but still clean */
.client-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 170px;               /* larger */
    height: 92px;               /* larger */
    background: transparent;     /* no tile background */
    border: none;               /* no box border */
    text-decoration: none;
    transition: transform 150ms ease, opacity 150ms ease;
    opacity: 0.92;
}

.client-card:hover {
    transform: translateY(-2px);
    opacity: 1;
}

/* Bigger logos */
.client-card img {
    max-width: 150px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none;
}

/* LTR animation */
@keyframes clients-scroll-ltr {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* RTL: reverse the scroll direction */
html[dir="rtl"] .clients-track {
    animation-name: clients-scroll-rtl;
}

@keyframes clients-scroll-rtl {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

/* Pause on hover */
.clients-marquee:hover .clients-track {
    animation-play-state: paused;
}

/* On very small screens, reduce size slightly */
@media (max-width: 420px) {
    .client-card {
        width: 150px;
        height: 82px;
    }
    .client-card img {
        max-width: 130px;
        max-height: 62px;
    }
}



/* --- Header actions (burger + language) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

