/* Global */
:root {
  --bg: #013239;
  --bg-soft: #014144;
  --text: #032714db;
  --muted: #707070;
  --gold: #d4af37;
  --gold-20: rgba(212, 175, 55, 0.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  /* Background image with consistent overlay (avoid blend-mode differences on iOS) */
  background-color: #efefef;
  /* Layer a semi-transparent tint above the texture image for consistent look */
  background-image: url('../assets/background.jpg');
  background-repeat: repeat;
  background-blend-mode: hard-light;
  color: var(--text);
  line-height: 1.7;
}

/* iOS Safari: fallback to layered overlay since background-blend-mode is unreliable on body */
html.is-ios body {
  background-image: linear-gradient(rgba(239, 239, 239, 0.6), rgba(239, 239, 239, 0.6)), url('../assets/background.jpg');
  background-repeat: repeat, repeat;
  background-position: top left, top left;
  background-size: auto, auto;
  background-attachment: scroll, scroll;
  background-blend-mode: normal !important;
}

/* Brand-text fade-in-up utility (replay-able) */
.fade-in-up { opacity: 0; transform: translateY(12px); }
.fade-in-up.is-in { animation: fadeInUp .6s ease-out forwards; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fallback if AOS JS fails to load: ensure elements are visible */
.no-aos [data-aos] { opacity: 1 !important; transform: none !important; }

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bg-soft);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
  position: relative;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 48px; height: 48px; border: 1px solid var(--gold-20); border-radius: 8px; }
.brand-text h1 { font-size: 18px; margin: 0; font-weight: 800; color: var(--gold); }
.brand-text span { font-size: 12px; color: #c2c2c2; }

.main-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.main-nav a { padding: 8px 10px; border-radius: 8px; color: #fff; opacity: 0.9; transition: color .2s, background-color .2s; }
.main-nav a:hover { color: var(--gold); background: rgba(212, 175, 55, 0.08); }

/* Mobile toggle */
.mobile-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--gold-20); background: rgba(21,21,21,.8); color: var(--text); display: none; place-items: center; cursor: pointer; }
.mobile-toggle i { font-size: 18px; }

/* Hero Slider */
.hero { position: relative; }
.slider { position: relative; height: clamp(280px, 90vh, 640px); overflow: hidden; border-bottom: 1px solid var(--gold-20); }
.slide {
  position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.05); transition: opacity .8s ease, transform 1.2s ease;
}
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14,14,14,0) 55%, rgba(14,14,14,.68) 100%);
}
.slide.active { opacity: 1; transform: scale(1); }
.slide .overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,14,14,0.55), rgba(14,14,14,0.2)); pointer-events: none; }
.caption { position: absolute; inset-inline-start: 6%; bottom: 12%; max-width: 680px; z-index: 1; }
.caption h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 42px); color: var(--gold); text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.caption p { margin: 0; color: #fff; font-size: clamp(14px, 2.2vw, 18px); opacity: .92; }

.controls { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; pointer-events: none; }
.controls button {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--gold-20);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .15s, background .2s;
    background: #ffffffa6;
    backdrop-filter: blur(12px) saturate(150%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.controls button:hover { transform: scale(1.05); background: #dddddda6; }

/* Sections */
.section { padding: 64px 0; position: relative; }
.section.alt { background: #015460; }
.section-title { font-size: 26px; margin: 0 0 24px; color: var(--gold); position: relative; display: inline-block; }
.section-title::after { content: ""; display: block; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); width: 120px; margin-top: 8px; }
/* Waves decoration for Previous Works */
#previous-works { position: relative; overflow: visible; }
/* #previous-works::before, #previous-works::after {
  content: ""; position: absolute; inset-inline: 0; height: 80px; pointer-events: none;
  background: url('../assets/waves/wave-gold.svg') repeat-x center;
  background-size: 600px 80px; opacity: .35; z-index: 0;
}
#previous-works::after { top: -1px; transform: scaleY(-1); }
#previous-works::before { bottom: -1px; } */
#previous-works > .container { position: relative; z-index: 1; }
/* Offset for sticky header on anchor jumps */
.section { scroll-margin-top: 86px; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.about-card { background: #015460; border: 1px solid var(--gold-20); border-radius: 12px; padding: 20px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); }
.about-card h4 { margin-top: 0; color: var(--gold); }
.about-card p { margin: 6px 0 0; color: #cfcfcf; }

/* Works and Services Cards */
.services {margin-bottom: 120px;}
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--bg-soft); border: 1px solid var(--gold-20); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);} 
.card .thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0b0b; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.card:hover .thumb img { transform: scale(1.08); }
.card .thumb .tag-type {
  position: absolute;
  top: 8px;
  /* Place top-left visually in RTL */
  inset-inline-end: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e7c95f, #d4af37db);
  color: #161616;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .2px;
  box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12);
}
.card .thumb .tag-type::before {
  content: "";
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23161616' d='M3 5h18v14H3zM6 5l3 4M12 5l3 4M18 5l3 4' opacity='.25'/%3E%3Cpath fill='%23161616' d='M6 11h12v6H6z'/%3E%3C/svg%3E") no-repeat center / contain;
  display: inline-block;
}
.card .thumb .tag-type::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(60deg, rgba(255,255,255,.22), transparent 40%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.card .content { padding: 14px; }
.card .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.card .title { margin: 0; font-size: 18px; color: #e1e1e1; }
.card .desc { font-size: 13px; color: var(--muted); margin: 8px 0 10px; }
/* Date chip */
.date-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--gold-20); background: rgba(212,175,55,.08); color: var(--gold); font-size: 12px; font-weight: 700; }
.date-chip .fa-solid { font-size: 13px; }

/* Previous works card polish */
#previous-works .card, #previous-all .card { transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; }
#previous-works .card:hover, #previous-all .card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.35); border-color: rgba(212,175,55,.35); }
#previous-works .card .thumb::after, #previous-all .card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,14,14,0) 60%, rgba(14,14,14,.35)); pointer-events: none; }
#previous-works .card .title, #previous-all .card .title { font-size: 19px; }
#previous-works .card .desc, #previous-all .card .desc { color: #cfcfcf; opacity: .88; }
#previous-works .card .date-chip, #previous-all .card .date-chip { margin-top: 10px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .2px; }
.badge--solid { background: linear-gradient(180deg, #dabf59, var(--gold)); color: #161616; }
.badge--outline { border: 1px solid var(--gold-20); color: var(--gold); background: rgba(212,175,55,.08); }

.btn-gold {
  display: inline-block; padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(180deg, #dabf59, var(--gold));
  color: #161616; font-weight: 700; border: none; cursor: pointer; transition: filter .15s, transform .1s;
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold:active { transform: translateY(1px); }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-btn { padding: 8px 12px; border-radius: 999px; background: rgba(212,175,55,.12); color: var(--gold); border: 1px solid var(--gold-20); cursor: pointer; font-weight: 600; }
.filter-btn.active, .filter-btn:hover { background: linear-gradient(180deg, #dabf59, var(--gold)); color: #161616; }

/* Current Works slider */
.works-slider { position: relative; border: 1px solid var(--gold-20); border-radius: 14px;   overflow: hidden; box-shadow: 3px 3px 8px color(from #031127db srgb r g b / .2); }
.works-track { display: flex; transition: transform .6s cubic-bezier(.22,.61,.36,1); will-change: transform; touch-action: pan-y; direction: ltr; }
.works-slide { flex: 0 0 100%; width: 100%; padding: 16px; }
.works-slide .slide-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: stretch; }
.works-slide .slide-image { border-radius: 12px; overflow: hidden; border: 1px solid var(--gold-20); background: #0b0b0b; }
.works-slide .slide-image img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.works-slide .slide-content { direction: rtl; border: 1px solid var(--gold-20); border-radius: 12px; padding: 16px 16px 40px; display: flex; flex-direction: column; justify-content: center; }
.works-slide .slide-title { margin: 0 0 8px; font-size: clamp(18px, 2.2vw, 24px); color: var(--gold); }
.works-slide .slide-type { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.works-slide .slide-desc { color: var(--text); opacity: .9; margin: 0 0 14px; line-height: 1.8; }
.works-controls { position: absolute; inset-block-end: 10px; inset-inline: 10px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.works-controls .prev, .works-controls .next {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--gold);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px) saturate(150%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.works-controls .dots { display: flex; gap: 8px; pointer-events: none; }
.works-controls .dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(212,175,55,.25); box-shadow: inset 0 0 0 1px var(--gold-20); }
.works-controls .dot.active { background: var(--gold); box-shadow: none; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card { border: 1px solid var(--gold-20); border-radius: 12px; padding: 18px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(2px) saturate(150%); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); }
.service-card .icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: rgba(212,175,55,.12); color: var(--gold); margin-bottom: 10px; font-size: 20px; }
.service-card h4 { margin: 6px 0 8px; color: var(--text); }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* Partners */
.partners .partners-track {position: relative; overflow: visible; border: 1px solid var(--gold); border-radius: 12px; padding: 12px; background: rgba(255, 255, 255, 0.1); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); }
.partners .row { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; align-items: center; justify-items: center; }
.partner-logo { width: 160px; height: 80px; object-fit: contain; border-radius: 10px; padding: 10px; }
.partner-logo:hover { filter: grayscale(0%); opacity: 1; }

/* Contact */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .form-row { display: flex; flex-direction: column; gap: 6px; }
.contact-form .form-row--full { grid-column: 1 / -1; }
.contact-form label { font-size: 14px; color: var(--muted); }
.contact-form input, .contact-form textarea {
    background: #ffffff;
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    outline: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.contact-form textarea { resize: vertical; }
.contact-form button[type="submit"] { grid-column: 1 / -1; justify-self: start; }
.social { display: flex; gap: 12px; margin-top: 16px; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(212,175,55,.12); color: var(--gold); }

/* Footer */
.site-footer { padding: 18px 0 28px; border-top: 1px solid var(--gold-20); text-align: center; color: #fff; background: var(--bg); }

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal.show { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-content { position: relative; background: #111; border: 1px solid var(--gold-20); border-radius: 12px; width: min(960px, 92%); padding: 12px; z-index: 1; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.modal-close { position: absolute; inset-inline-start: 8px; top: 8px; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--gold-20); background: rgba(21,21,21,.8); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.responsive-iframe { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.responsive-iframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Responsive */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .works-slide .slide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .brand-text h1 { font-size: 16px; }
}

/* Force 2-column layout for Previous Works on tablets */
@media (min-width: 768px) and (max-width: 1280px) {
  #previous-works .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile/Tablet nav behavior */
@media (max-width: 1024px) {
  .mobile-toggle { display: grid; }
  .main-nav { position: absolute; top: 100%; inset-inline: 0; background: rgba(14,14,14,0.98); border-bottom: 1px solid var(--gold-20); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px; }
  .main-nav a { display: block; padding: 12px 14px; }
}

/* Hamburger lines */
.mobile-toggle { width: 44px; height: 44px; }
.mobile-toggle .bar { display: block; width: 26px; height: 3px; margin-inline: auto; background: #ffffff; border-radius: 3px; transform-origin: 50% 50%; transition: transform .22s ease, opacity .2s ease, background-color .2s ease; }
.mobile-toggle .bar + .bar { margin-top: 6px; }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Toggle button polish */
.mobile-toggle { place-items: center; }
.mobile-toggle:hover { background: rgba(212,175,55,.12); border-color: rgba(212,175,55,.35); }
.mobile-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(212,175,55,.25); }
.mobile-toggle:hover .bar, .mobile-toggle[aria-expanded="true"] .bar { background: var(--gold); }


.fa-bars:before, .fa-navicon:before {color: #fff; font-size: 24px;}
.fa-xmark:before {content: "\f00d"; color: #fff; font-size: 24px;}
