/* Variables and base */
:root {
  --bg: #fff;
  --surface: #f6f8fc;
  --surface-2: rgba(0, 0, 0, .04);
  --muted: #6b7280;
  --text: #0e1217;
  --primary: #0B2545;
  --primary-2: #0F3D68;
  --accent: #ff7a00;
  --success: #2ecc71;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --border: #d7dce6;
  --header-bg: rgba(255, 255, 255, .85);
  --container: 1200px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

[data-theme="dark"] {
  --bg: linear-gradient(135deg, #0f1221 0%, #121433 60%, #101528 100%);
  --surface: #121433;
  --surface-2: rgba(255, 255, 255, .06);
  --muted: #7e88a3;
  --text: #e8ecf8;
  --primary: #6c5ce7;
  --primary-2: #a66cff;
  --accent: #00d4ff;
  --border: #2c3052;
  --header-bg: rgba(20, 23, 54, .7);
  --shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

section[id]{scroll-margin-top: 88px}

body{min-height:100vh;display:flex;flex-direction:column}
main{flex:1 0 auto}
.footer{flex-shrink:0}

body {
  margin: 0;
  font-family: 'Rubik', 'Cairo', system-ui, -apple-system, Segoe UI, Roboto;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text)
}

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

a {
  text-decoration: none;
  color: inherit
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: auto;
  padding: 0 20px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: .25s;
  cursor: pointer;
  font-weight: 700
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: var(--shadow)
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px)
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface-2)
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .08)
}

.section-lead {
  color: var(--muted)
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border)
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 900;
  letter-spacing: .5px
}

.brand img {
  width: 36px;
  height: 36px
}

.menu {
  display: flex;
  align-items: center;
  gap: 1rem
}

.menu a {
  padding: .6rem .9rem;
  border-radius: 999px;
  color: var(--text)
}

.menu .btn {
  margin-inline-start: .4rem
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  gap: 4px;
  padding: .5rem;
  cursor: pointer
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text)
}

/* Hero */
.hero {
  padding: 64px 0 40px
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center
}

.hero h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 8px;
  font-weight: 900
}

.hero p {
  color: var(--muted);
  margin: 0 0 20px
}

.hero-art {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35))
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

/* Hero Slider overrides */
.hero.hero-slider {
  padding: 0;
  position: relative;
  overflow: hidden
}

.hero.hero-slider .container-fluid {
  padding: 0
}

.hero.hero-slider .container {
  padding: 0 24px
}

.hero-slider .slide {
  background: transparent;
  border: none;
  padding: 0
}

.hero-slider .slide {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  background-size: cover;
  background-position: center;
  min-height: 560px;
  padding: 96px 0;
  position: relative;
  border-radius: 0
}

.hero-slider .slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .25));
  pointer-events: none
}

.hero-slider .hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 24px
}

.hero-slider .hero-text {
  max-width: 620px;
  margin: auto
}

.hero-slider .slide.active {
  display: flex;
  align-items: center;
  justify-content: center
}

.hero-slider .slider-controls {
  inset-inline: 48px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3
}

/* Enlarge hero slider action buttons */
.hero-slider .hero-actions .btn {
  padding: 1.1rem 1.8rem;
  font-size: 1rem;
}

/* Larger prev/next buttons centered vertically at sides */
.hero-slider .slider-controls button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.hero-slider .slider-dots{position:absolute;left:50%;transform:translateX(-50%);bottom:24px;display:flex;gap:8px;align-items:center;z-index:3}
.hero-slider .slider-dots button{width:10px;height:10px;border-radius:50%;border:1px solid rgba(255,255,255,.7);background:transparent;cursor:pointer}
.hero-slider .slider-dots button.active{background:#fff}

.hero.hero-slider h1 {
  font-size: 42px;
  line-height: 1.2;
  font-weight: 900
}

.hero.hero-slider .h3 {
  font-size: 32px;
  font-weight: 900
}

.hero.hero-slider .hero-text p {
  font-size: 27px
}

.hero.hero-slider .hero-grid {
  grid-template-columns: 1fr 1fr;
  gap: 24px
}

/* Hero slider buttons and text contrast */
.hero.hero-slider .hero-text,
.hero.hero-slider .hero-text p {
  color: #fff
}

.hero-slider .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .12)
}

.hero-slider .btn-ghost:hover {
  background: rgba(255, 255, 255, .2)
}

.hero-slider .slider-controls button {
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff
}

.hero-slider .slider-controls button:hover {
  background: rgba(255, 255, 255, .35)
}

/* Responsive adjustments */
@media (max-width:640px) {
  .hero-slider .slide {
    min-height: 420px;
    padding: 64px 0
  }

  .hero.hero-slider h1 {
    font-size: 36px;
    font-weight: 900
  }

  .hero.hero-slider .h3 {
    font-size: 26px;
    font-weight: 900
  }

  .hero.hero-slider .hero-text p {
    font-size: 24px
  }

  .hero-slider .slider-controls {
    inset-inline: 16px
  }

  .hero-slider .slider-controls button {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* Clients */
.clients {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2)
}

.clients-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0
}

.clients-row img {
  opacity: .7;
  transition: .2s
}

.clients-row img:hover {
  opacity: 1
}

/* Services */
.services {
  padding: 64px 0
}

.services h2,
.about h2,
.portfolio h2,
.testimonials h2,
.contact h2 {
  font-size: 26px;
  margin: 0 0 20px
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px
}

.card {
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid var(--border)
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px
}

.card p {
  margin: 0;
  color: var(--muted)
}

/* About */
.about {
  padding: 64px 0;
  background: var(--surface);
  margin: 40px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px
}

.stats {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0
}

.stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border)
}

.stats strong {
  font-size: 24px;
  color: var(--accent)
}

/* Portfolio */
.portfolio {
  padding: 64px 0
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px
}

.filters .btn {
  padding: .6rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer
}

.filters .btn.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface)
}

.item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: .3s;
  opacity: .9
}

.item:hover img {
  transform: scale(1.04);
  opacity: 1
}

/* Testimonials */
.testimonials {
  padding: 64px 0;
  background: var(--surface);
  margin-bottom: 40px;
}

.slider {
  position: relative
}

.slide {
  display: none;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid var(--border)
}

.slide.active {
  display: block
}

.testimonials .slide {
  text-align: center
}

.slider-controls {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%)
}

.slider-controls button {
  background: var(--surface);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  margin: 1rem;
}

/* Contact */
.contact {
  padding: 64px 0
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px
}

.contact-info {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted)
}

.contact-form .form-control {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-height: 48px
}

.contact-form textarea {
  resize: vertical
}

.contact-form button {
  margin-top: 10px
}

.form-msg {
  margin-top: 10px;
  color: var(--accent)
}

.settings-preview{padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.settings-preview .btn-primary{background:linear-gradient(90deg,var(--primary),var(--primary-2));border-color:transparent;color:#fff}
.settings-preview .btn-ghost{color:var(--text);border-color:var(--border);background:var(--surface-2)}

.template-preview{min-height:400px;overflow:auto}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--surface)
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 18px
}

.footer .links,
.footer .social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.footer .copy {
  margin: 8px 0 0;
  text-align: center;
  color: #8f97ad
}

.footer .links a {
  color: var(--primary) !important;
  transition: all 0.3s ease;
}

.footer .links a:hover {
  color: var(--accent) !important;
  transform: translateX(-3px);
}

.footer .social a {
  color: var(--primary);
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-flex;
}

.footer .social a svg {
  color: var(--primary);
}

.footer .social a svg path,
.footer .social a svg rect,
.footer .social a svg circle {
  transition: all 0.3s ease;
}

.footer .social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer .social a:hover svg {
  color: var(--accent);
}

.footer .social a:hover svg path {
  fill: var(--accent) !important;
  stroke: var(--accent) !important;
}

.footer .social a:hover svg rect,
.footer .social a:hover svg circle {
  stroke: var(--accent) !important;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.lightbox.open {
  display: flex
}

.lightbox img {
  max-width: min(100%, 900px);
  max-height: 80vh;
  border-radius: 12px
}

.lightbox .caption {
  color: #fff;
  margin-top: 10px;
  text-align: center
}

.lightbox .close {
  position: absolute;
  top: 18px;
  inset-inline-start: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer
}

/* Responsive */
@media (max-width:1024px) {
  .cards {
    grid-template-columns: repeat(3, 1fr)
  }

  .grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr
  }
}

@media (max-width:640px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 18px
  }

  .menu-toggle {
    display: flex
  }

  .menu {
    position: fixed;
    inset-inline: 0;
    top: 64px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: none;
    flex-direction: column;
    padding: 10px 20px
  }

  .menu.open {
    display: flex
  }

  .cards {
    grid-template-columns: 1fr
  }

  .grid {
    grid-template-columns: 1fr
  }

  .footer-grid {
    grid-template-columns: 1fr
  }
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  pointer-events: none;
  z-index: 0
}
.back-to-top{position:fixed;bottom:24px;inset-inline-end:24px;width:40px;height:40px;border-radius:50%;background:linear-gradient(90deg,var(--primary),var(--primary-2));color:#fff;border:none;box-shadow:var(--shadow);display:none;align-items:center;justify-content:center;cursor:pointer;z-index:50}
.back-to-top.show{display:flex}
.whatsapp-float{position:fixed;bottom:20px;right:20px;background:linear-gradient(90deg,var(--accent),#25D366);color:#fff;width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 24px rgba(0,0,0,.15);z-index:1000}
.whatsapp-float:hover{transform:translateY(-2px)}