/* Base styles for AL JYNOM Technical Services landing page */

:root {
  /* Brand palette based on AL JYNOM logo */
  --color-bg: #071b20; /* deep teal/navy background */
  --color-surface: #ffffff;
  --color-surface-alt: #f5f7f9;
  --color-primary: #00a9a4; /* teal from gear and Arabic text */
  --color-primary-dark: #00827d;
  --color-accent: #f5393d; /* red from English text */
  --color-text-main: #111827;
  --color-text-muted: #4b5563;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius-card: 0.75rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text-main);
  background-color: #f3f4f6;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-weight: 700;
}

h2 {
  font-size: 1.7rem;
}

/* Template-inspired section headings */
.section > .container > h2 {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1.4rem;
}

.section > .container > h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.section-intro {
  max-width: 640px;
  color: var(--color-text-muted);
}

/* Header & Navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #ffffff;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  height: 3.25rem;
  width: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--color-text-main);
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-toggle span {
  width: 1.5rem;
  height: 2px;
  background-color: #111827;
  border-radius: 999px;
}

/* Hero */

.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  color: #f9fafb;
  background-image:
    linear-gradient(to right, rgba(7, 27, 32, 0.94), rgba(7, 27, 32, 0.55), rgba(7, 27, 32, 0.2)),
    url('https://images.pexels.com/photos/8961067/pexels-photo-8961067.jpeg');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  padding: 5rem 0 4rem;
  max-width: 40rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 3.3rem);
  max-width: 34rem;
  letter-spacing: 0.01em;
}

.hero-subtitle {
  margin-top: 0.9rem;
  color: #e5e7eb;
  font-weight: 500;
}

.hero-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.75rem 0 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background-color: rgba(7, 27, 32, 0.76);
  border: 1px solid rgba(0, 169, 164, 0.7);
  font-size: 0.87rem;
  backdrop-filter: blur(10px);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease,
    transform 0.12s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #0f172a;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(14, 165, 233, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.8);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: rgba(15, 23, 42, 0.6);
  text-decoration: none;
}

/* Make hero CTA pop more */
.hero .btn-secondary {
  background-color: #ffffff;
  color: var(--color-accent);
  border-color: transparent;
}

.hero .btn-secondary:hover,
.hero .btn-secondary:focus {
  background-color: #ffe4e5;
  color: var(--color-accent);
}

/* About */

.about {
  background-color: #ffffff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.about-item {
  padding: 1.1rem 1.3rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.16s ease;
}

.about-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  border-color: rgba(14, 165, 233, 0.45);
}

.about-item h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* Services */

.services {
  background-color: #f9fafb;
}

.services-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.service-card {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.35rem 1.6rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-top: 3px solid var(--color-primary);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.16s ease,
    border-top-color 0.16s ease;
}

/* Alternate accent colors across service cards */
.service-card:nth-child(2n) {
  border-top-color: var(--color-accent);
}

.service-card:nth-child(3n) {
  border-top-color: var(--color-primary-dark);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  border-color: rgba(14, 165, 233, 0.5);
}

.service-card h3 {
  font-size: 1rem;
}

.service-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* Why Choose Us */

.why-us {
  background-color: #ffffff;
}

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

.why-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.3rem;
  border-radius: 0.9rem;
  background-color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  font-size: 0.9rem;
}

.why-item::before {
  content: '✔';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background-color: var(--color-primary);
  color: #0b1120;
  font-size: 0.8rem;
}

/* Projects / Gallery */

.projects {
  background-color: #f9fafb;
}

.gallery-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.gallery-item {
  background-color: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.16s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.16);
  border-color: rgba(14, 165, 233, 0.55);
}

.gallery-item img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0.75rem 1rem 1rem;
  font-weight: 600;
}

/* Contact */

.contact {
  background-color: #ffffff;
}

.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info p {
  color: var(--color-text-muted);
}

.contact-info a {
  color: var(--color-primary-dark);
}

.contact-form-wrapper {
  padding: 0.75rem;
  border-radius: 1.25rem;
  background-color: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.contact-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 1rem;
}

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

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary-dark);
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.form-message.success {
  color: #16a34a;
}

.form-message.error {
  color: #dc2626;
}

/* Footer */

.site-footer {
  background-color: #020617;
  color: #9ca3af;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

/* Responsive Layouts */

@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    inset: 100% 0 auto;
    background-color: rgba(15, 23, 42, 0.98);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
  }

  .main-nav.open {
    transform: scaleY(1);
    opacity: 1;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (min-width: 640px) {
  .about-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .hero-content {
    padding: 6rem 0 5rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .gallery-item {
    min-height: 320px;
    min-width: 240px;
  }

  .gallery-item img {
    height: 260px;
  }

  .contact-layout {
    flex-direction: row;
  }

  .contact-info,
  .contact-form-wrapper {
    flex: 1;
  }
}
