:root {
    --blue: #0a3cff;
    --cyan: #3fd0ff;
    --white: #ffffff;
    --bg: #ffffff;
    --text: #0a2540;
    --card-bg: #fff;
    --section-bg: #f5f5f5;
}

/* ===== Dark Mode ===== */
body.dark {
    --bg: #0b1220;
    --text: #e5f2ff;
    --card-bg: #121828;
    --section-bg: #1a1a2e;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    transition: 0.3s;
    padding-top: 85px;
}

/* ================================= */
/* ===== HEADER (Professional) ===== */
/* ================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    color: #fff;
    z-index: 1000;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.header-container {
    max-width: 1200px;
    margin: auto;
    padding: 25px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    font-weight: bold;
    font-size: 22px;
    white-space: nowrap;
}

/* Nav */
.nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav a,
.nav button {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.3s;
}

.nav a:hover,
.nav button:hover {
    background: rgba(255,255,255,0.2);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* ============================= */
/* ===== MOBILE MENU FIX ======= */
/* ============================= */

@media(max-width:768px){

    .nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        right: 20px;
        width: 220px;
        background: linear-gradient(180deg, var(--blue), var(--cyan));
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
        text-align: right;
    }

    .nav ul.show {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .menu-toggle {
        display: block;
        color: #fff;
    }
}

/* Animation */
@keyframes fadeIn {
    from {opacity:0; transform:translateY(-10px);}
    to {opacity:1; transform:translateY(0);}
}

/* ============================= */
/* ===== HERO PROFESSIONAL ===== */
/* ============================= */

.hero {
    position: relative;
    min-height: 100vh;
    background: url('../<?= $homeImg ?>') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
}

/* Overlay احترافي */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(10,37,64,.85), rgba(10,60,255,.65));
    z-index: 1;
}

/* Dark Mode Overlay أقوى */
body.dark .hero-overlay {
    background: linear-gradient(120deg, rgba(0,0,0,.85), rgba(10,60,255,.5));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: #fff;
    animation: fadeUp 1.2s ease forwards;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero p {
    font-size: 18px;
    margin-bottom: 35px;
    opacity: 0.9;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
}

.btn-outline {
    border: 2px solid #fff;
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.btn-outline:hover {
    background: #fff;
    color: var(--blue);
}

/* Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media(max-width:768px){
    .hero h1{
        font-size:28px;
    }
    .hero p{
        font-size:15px;
    }
}
/* ============================= */
/* ===== ABOUT VIDEO SECTION ==== */
/* ============================= */

.about-video {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  padding: 120px 0; /* مسافة فوق وتحت */
  color: #fff;
}

/* ===== VIDEO ===== */
.about-video .video-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.about-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay احترافي */
.about-video .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(10,37,64,0.85),
    rgba(10,60,255,0.55)
  );
}

/* ============================= */
/* ===== ABOUT CARD (DESKTOP) == */
/* ============================= */

.about-content {
  position: relative;
  z-index: 2;

  max-width: 750px;
  padding: 50px;
  text-align: center;

  margin: 60px 0; /* مسافة خارجية */

  background: rgba(255, 255, 255, 0.75); /* Light mode افتراضي */
  color: #0a2540;

  backdrop-filter: blur(18px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 25px;

  box-shadow: 0 25px 60px rgba(0,0,0,0.3);

  transition: 0.4s ease;
}

/* Hover */
.about-content:hover {
  transform: scale(1.02);
}

/* ===== TEXT ===== */
.about-content h2 {
  font-size: 52px;
  margin-bottom: 20px;
  color: inherit;
}

.about-content p {
  font-size: 18px;
  line-height: 1.8;
  color: inherit;
}

/* ============================= */
/* ===== DARK MODE ============= */
/* ============================= */

body.dark .about-content {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}

body.dark .about-content p {
  color: rgba(255,255,255,0.85);
}

/* ============================= */
/* ===== ANIMATION ============= */
/* ============================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* ===== MOBILE VERSION ======== */
/* ============================= */

@media (max-width: 768px) {

  .about-video {
    height: auto;
    padding: 0;
    flex-direction: column;
  }

  .about-video .video-container {
    position: relative;
    height: 240px;
  }

  .about-content {
    margin: 15px;
    padding: 22px;

    border-radius: 15px;

    background: var(--card-bg);
    color: var(--text);

    backdrop-filter: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }

  .about-content h2 {
    font-size: 26px;
  }

  .about-content p {
    font-size: 15px;
  }
}

/* ============================= */
/* ===== SERVICES ===== */
/* ============================= */

.services {
    padding: 80px 20px;
    background: var(--section-bg);
}

.services-container {
    max-width: 1600px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--card-bg);
    padding:25px;
    border-radius:15px;
    box-shadow:0 10px 25px rgba(0,0,0,.1);
    text-align:center;
    transition:0.3s;
}

.service-card:hover{
    transform:translateY(-6px);
}
/* ===== SERVICES TYPOGRAPHY ===== */

.service-card h3{
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.5;
}

.service-card p{
    font-size: 13px;
    line-height: 1.9;
    color: #666;
}
/* حجم الأيقونة */
.service-card i{
    font-size: 52px;
    margin-bottom: 18px;
    color: var(--blue);
}
/* Dark mode */
body.dark .service-card p{
    color: #ccc;
}
/* Tablet */
@media(max-width:1200px){
  .services-container{
    grid-template-columns: repeat(3,1fr);
  }
}

/* Mobile */
@media(max-width:768px){
  .services-container{
    grid-template-columns: repeat(2,1fr);
  }
}

/* Small Mobile */
@media(max-width:480px){
  .services-container{
    grid-template-columns: 1fr;
  }
}
/* ============================= */
/* ===== GALLERY ===== */
/* ============================= */

.gallery {
    padding:80px 20px;
    background: var(--section-bg);
}

.gallery-container {
    max-width:1100px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:20px;
}

.gallery-container img {
    width:100%;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
}

/* ============================= */
/* ===== CONTACT ===== */
/* ============================= */
/* ===== CONTACT SECTION ===== */
/* ============================= */
/* ===== CONTACT ===== */
/* ============================= */

.contact {
  padding: 100px 20px;
  background: var(--section-bg);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(80px);
  transition: all 1s ease;
}

.contact.show {
  opacity: 1;
  transform: translateY(0);
}

.contact-container {
  max-width: 1200px;
  margin: auto;
}

.contact h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  font-weight: bold;
}

.contact-wrapper {
  display: flex;
  gap: 40px;
  align-items: stretch;
  justify-content: space-between;
}

/* ===== FORM ===== */
.contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: var(--card-bg);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transition: 0.4s ease;
}

.contact-form label {
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: 0.3s;
  font-size: 14px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 10px rgba(10,60,255,0.2);
}

.contact-form button {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s ease;
}

.contact-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ===== MAP ===== */
.contact-map {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 992px) {
  .contact-wrapper {
    flex-direction: column;
  }
}

.contact {
  opacity: 0;
  transform: translateY(80px);
  transition: all 1s ease;
}

.contact.show {
  opacity: 1;
  transform: translateY(0);
}
/* ===== PARTNERS / COOPERATIONS LIKE GALLERY ===== */
.partners-section {
  padding: 100px 20px;
  background: var(--section-bg);
  text-align: center;
}
.partners-section .partners-container {
    text-align: center; /* هذا يجعل كل العناصر النصية داخلها في الوسط */
}

.partners-section h2 {
    font-size: 32px !important;
    font-weight: bold !important;
    margin-bottom: 50px !important;
    max-width: 800px;
    display: inline-block; /* يجعل العنوان لا يملأ العرض كله */
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.partner-card {
  width: 200px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.partner-card img {
  width: 100%;
  display: block;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s, opacity 0.3s, transform 0.3s;
}

.partner-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.partner-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
}
@media (max-width: 768px) {

  .gallery-container.partners-container {
    display: flex !important;
    flex-direction: column;
    align-items: center; /* هذا هو السر */
  }

  .partner-card {
    width: 80%;
    max-width: 260px;
  }

}
/*////////////////////////*/
/* ===== PROJECTS ===== */
/*////////////////////////*/
/* ============================= */
/* ===== PROJECTS (MATCH SITE) === */
/* ============================= */

.projects {
    padding: 80px 20px;
    background: var(--section-bg);
}

/* نفس عنوان باقي الأقسام */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    font-weight: bold;
}

/* ===== المشاريع الرئيسية ===== */
.projects-main {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* نفس كرت portfolio */
.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* صورة مثل portfolio */
.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* المحتوى */
.project-content {
    padding: 15px;
}

.project-content h3 {
    margin-bottom: 10px;
    color: var(--blue);
}

.project-content p {
    color: #555;
}

/* ===== PROJECTS (PRO VERSION) ===== */
.projects {
  padding: 100px 20px;
  background: var(--section-bg);
}

.projects-container {
  max-width: 1100px;
  margin: auto;
}

/* نفس عنوان portfolio */
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
}

/* ===== MAIN PROJECTS ===== */
.projects-main {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.1);
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* fallback */
.no-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ddd;
  color: #888;
  font-size: 40px;
}

.project-content {
  padding: 15px;
}

.project-content h3 {
  color: var(--blue);
  margin-bottom: 10px;
}

.project-content p {
  color: #555;
  font-size: 14px;
}

/* ===== PROJECT LIST ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-item {
  background: var(--card-bg);
  padding: 18px;
  border-radius: 10px;
  border-left: 4px solid var(--blue);
  transition: 0.3s;
}

.project-item:hover {
  transform: translateX(5px);
}

.project-item h4 {
  margin-bottom: 8px;
  color: var(--blue);
}

.project-item p {
  color: #666;
  font-size: 14px;
}
/* ============================= */
/* ===== FILTER BUTTONS PRO UI ===== */
/* ============================= */

.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 50px;
}

/* ===== BUTTON BASE ===== */
.projects-filter button {
  position: relative;

  /* 🔥 أهم سطرين ناقصين */
  border: none;
  outline: none;

  padding: 10px 22px;
  border-radius: 30px;

  background: rgba(255,255,255,0.08);
  color: var(--text);

  backdrop-filter: blur(10px);

  cursor: pointer;
  font-size: 14px;

  transition: 0.3s;
}
.projects-filter button:focus {
  outline: none;
  box-shadow: none;
}
/* ===== ICON ===== */
.projects-filter button i {
  font-size: 16px;
}

/* ===== HOVER ===== */
.projects-filter button:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--cyan);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* ===== ACTIVE ===== */
.projects-filter button.active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  border: none;
}

/* Glow effect */
.projects-filter button.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  opacity: 0.35;
  filter: blur(12px);
  z-index: -1;
}

/* ===== DARK MODE ===== */
body.dark .projects-filter button {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}

body.dark .projects-filter button:hover {
  border-color: var(--cyan);
}

/* ===== MOBILE ===== */
@media(max-width:768px){

  .projects-filter {
    gap: 8px;
  }

  .projects-filter button {
    padding: 8px 14px;
    font-size: 13px;
  }
}
/* ===== DARK MODE ===== */
body.dark .project-content p,
body.dark .project-item p {
  color: #ccc;
}

body.dark .no-image {
  background: #333;
  color: #aaa;
}

/* ===== RTL ===== */
html[dir="rtl"] .project-item {
  border-left: none;
  border-right: 4px solid var(--blue);
}

html[dir="rtl"] .project-item:hover {
  transform: translateX(-5px);
}
/* ============================= */
/* ===== FOOTER ===== */
/* ============================= */

.site-footer {
    background: var(--section-bg);
    color: var(--text);
}

body.dark .site-footer {
    background: #0b0f1a;
}


.footer-container{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:40px;
}

.footer-bottom{
    border-top:1px solid #222;
    margin-top:40px;
    padding-top:15px;
    text-align:center;
    font-size:14px;
    color:#aaa;
}
/* ============================= */
/* ===== FOOTER LINKS ===== */
/* ============================= */

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
}

/* الخط تحت العنوان */
.footer-col h4::after {
    content: "";
    width: 40px;
    height: 3px;
    background: var(--blue);
    position: absolute;
    bottom: -8px;
    left: 0;
    border-radius: 10px;
}

/* دعم RTL */
html[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

/*start*/
.footer-links a {
  position: relative; /* مهم جداً */
  padding-inline-start: 30px; /* مسافة النص */
}

.footer-links a::before {
  content: "";
  position: absolute;
  inset-inline-start: 10px; /* مكان النقطة */
  top: 50%;
  transform: translateY(-50%);
  
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
}
/*end*/

/* دعم RTL للنقطة */
html[dir="rtl"] .footer-links a::before {
    left: auto;
    right: 0;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(5px);
}

/* حركة عكسية للعربي */
html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.footer-links a:hover::before {
    background: var(--blue);
}
.footer-col ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: 0.3s;
}

.footer-col ul li a:hover {
  color: var(--blue);
}

.footer-col ul li i {
  font-size: 18px;
}
@media (max-width: 768px) {

  .footer-links a {
    padding-inline-start: 32px;
  }

  .footer-links a::before {
    inset-inline-start: 12px;
  }

}