:root {
  --primary: #0c2d57;
  --primary-deep: #081f3e;
  --accent: #f58220;
  --bg-light: #f5f8fc;
  --text: #16324f;
  --text-soft: #4b5f75;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(7, 32, 65, 0.12);
  --transition: 0.35s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-light {
  background: var(--bg-light);
}

h1,
h2,
h3,
h4 {
  line-height: 1.4;
}

h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  margin-bottom: 1.7rem;
  color: var(--primary);
  position: relative;
  width: fit-content;
}

h2::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  bottom: -8px;
  width: 50%;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(12, 45, 87, 0.85);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(8, 31, 62, 0.95);
  box-shadow: 0 10px 25px rgba(7, 30, 59, 0.25);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 78px;
}

.logo {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #e8eef7;
  font-weight: 600;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 3px;
  background: var(--white);
  border-radius: 20px;
}

.hero {
  min-height: 95vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: var(--white);
  background-image: linear-gradient(
      135deg,
      rgba(7, 28, 55, 0.82),
      rgba(12, 45, 87, 0.72)
    ),
    url("https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(245, 130, 32, 0.18),
    transparent 50%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 920px;
  animation: fadeUp 1.05s ease both;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #eff5fd;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.82rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: var(--transition);
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-3px);
  background: #ff8f2e;
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.about-grid {
  display: grid;
  gap: 1.7rem;
  grid-template-columns: 2fr 1fr;
  align-items: start;
}

.about-grid p {
  color: var(--text-soft);
}

.about-card {
  background: linear-gradient(160deg, #f0f6ff, #ffffff);
  border: 1px solid #dde8f7;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.cards-grid {
  display: grid;
  gap: 1rem;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.3rem;
  border: 1px solid #dce8f8;
  box-shadow: 0 8px 20px rgba(11, 45, 84, 0.08);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 30px rgba(11, 45, 84, 0.14);
  border-color: #b7d0ef;
}

.icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f1f7ff;
  margin-bottom: 0.8rem;
  font-size: 1.5rem;
}

.projects-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 300px;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 18, 37, 0.85), rgba(5, 18, 37, 0.2));
  color: var(--white);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover img {
  transform: scale(1.08);
}

.project-card:hover .project-overlay {
  transform: translateY(0);
  opacity: 1;
}

.why-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.why-card {
  text-align: center;
  padding-block: 2rem;
}

.stats-section {
  background: linear-gradient(120deg, var(--primary), var(--primary-deep));
  color: var(--white);
}

.stats-section h2 {
  color: var(--white);
}

.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
}

.stat-card h3 {
  font-size: 2.2rem;
  color: #ffd2ad;
}

.contact-form {
  margin-top: 0.7rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid #dbe7f7;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.form-alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
}

.form-alert.success {
  background: #e7f7ee;
  color: #18663a;
  border: 1px solid #b8e6c8;
}

.form-alert.error {
  background: #fff0f0;
  color: #8c2020;
  border: 1px solid #f2bbbb;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c7daef;
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font-family: inherit;
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  background: #fbfdff;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.15);
}

.footer {
  background: #081a34;
  color: #d7e1ef;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.footer h3,
.footer h4 {
  color: var(--white);
  margin-bottom: 0.65rem;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.footer a:hover {
  color: var(--accent);
}

.copyright {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
  padding: 1rem 0;
  color: #adc0d7;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    inset-inline: 0;
    background: rgba(8, 31, 62, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .nav-links.open {
    max-height: 320px;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 4.2rem 0;
  }

  .hero {
    min-height: 88vh;
    background-attachment: scroll;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
