/* =========================
   Base & Layout
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #580000;
  --bg-alt: #580000;
  --surface: #380101;
  --surface-alt: #580000;
  --accent: #6e0000;
  --accent-soft: rgba(255, 0, 0, 0.18);
  --accent-strong: #ff0000;
  --text: #ffffff;
  --muted: #9ca3c7;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.28s ease-out;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #ff0000 0, #7a0000 52%, #300000 100%);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

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

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

/* =========================
   Header & Navigation
   ========================= */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(255, 0, 0, 0.9), rgba(134, 0, 0, 0.6), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 0.5rem;
}

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

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 40%;
  background: radial-gradient(circle at 20% 20%, #ffe5e5 0, #ef5b5b 38%, #ff5b5b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #050816;
  font-size: 1.1rem;
  box-shadow: 0 0 0 1px rgba(245, 12, 12, 0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav a {
  position: relative;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  transition: color var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  width: 0%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width var(--transition-med);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

/* =========================
   Hero with UnicornStudio background
   ========================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px; /* header height */
  overflow: hidden;
}

/* Wrapper for UnicornStudio WebGL project */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg #unicorn-hero {
  width: 100% !important;
  height: 100% !important;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 0, 0, 0.2), transparent 60%),
              radial-gradient(circle at bottom left, rgba(131, 0, 0, 0.45), transparent 55%);
  backdrop-filter: blur(1px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 5;
  padding: 3.5rem 0 3.75rem;
}

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

.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 3vw + 1.5rem, 3.4rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  text-shadow: 0 14px 45px rgba(0, 0, 0, 0.6);
}

.hero-sub {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 1.7rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-med), color var(--transition-med), transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1020;
  font-weight: 600;
  box-shadow: 0 18px 38px rgba(235, 37, 37, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(235, 37, 37, 0.7);
}

.btn.ghost {
  background: rgba(42, 15, 15, 0.6);
  border-color: rgba(184, 148, 148, 0.3);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(42, 15, 15, 0.9);
  border-color: rgba(184, 148, 148, 0.7);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-meta span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(184, 148, 148, 0.18);
  background: rgba(42, 15, 15, 0.7);
}

/* =========================
   Sections
   ========================= */

.section {
  position: relative;
  padding: 4.6rem 0;
  background: linear-gradient(to bottom, rgba(29, 0, 0, 0.98), rgba(160, 0, 0, 0.98));
}

.section.alt {
  background: radial-gradient(circle at top, rgba(255, 0, 0, 0.445), transparent 60%), #160505;
}

.section-header {
  text-align: center;
  margin-bottom: 2.7rem;
}

.section-header.left {
  text-align: left;
}

.section-header h2 {
  font-size: 1.7rem;
  margin: 0 0 0.7rem;
}

.section-sub {
  max-width: 550px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-header.left .section-sub {
  margin-inline: 0;
}

/* =========================
   Cards / Services
   ========================= */

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

.card {
  background: radial-gradient(circle at top left, rgba(239, 91, 91, 0.12), transparent 55%), var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.3rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent, var(--accent-strong));
  opacity: 0.85;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.card ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.card li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.2rem;
}

.card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* =========================
   Jobs
   ========================= */

.jobs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2.3rem;
  align-items: flex-start;
}

.job-meta-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.job-meta-list li {
  margin-bottom: 0.3rem;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.2rem 1.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.job-card h3 {
  margin: 0;
  font-size: 1rem;
}

.job-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
}

.job-company {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.job-details {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.job-details li {
  margin-bottom: 0.2rem;
}

.job-cta {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(184, 148, 148, 0.3);
  background: rgba(42, 15, 15, 0.7);
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.job-cta:hover {
  background: rgba(42, 15, 15, 0.95);
  border-color: rgba(184, 148, 148, 0.85);
  transform: translateY(-1px);
}

/* =========================
   About
   ========================= */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: 2.4rem;
  align-items: flex-start;
}

.about-body {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1.3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.stat {
  background: radial-gradient(circle at top left, rgba(239, 91, 91, 0.25), transparent 60%), var(--surface);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.8rem;
  text-align: left;
  border: 1px solid rgba(184, 148, 148, 0.16);
}

.stat-value {
  display: block;
  font-weight: 600;
  font-size: 1.15rem;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.about-panel {
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.3rem 1.4rem;
  border: 1px solid rgba(184, 148, 148, 0.2);
  box-shadow: var(--shadow-soft);
}

.about-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.checklist {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.checklist li {
  margin-bottom: 0.35rem;
  position: relative;
  padding-left: 1.4rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.8rem;
  color: var(--accent);
}

/* =========================
   Testimonials
   ========================= */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.testimonial {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem 1.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
}

.quote {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.author {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(219, 209, 209, 0.9);
}

/* =========================
   Contact
   ========================= */

.contact-section {
  background: radial-gradient(circle at top, rgba(239, 91, 91, 0.25), transparent 60%), #160505;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
  gap: 2.3rem;
  align-items: flex-start;
}

.contact-meta {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-meta li {
  margin-bottom: 0.4rem;
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem 1.4rem;
  border: 1px solid rgba(184, 148, 148, 0.22);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

label {
  font-size: 0.76rem;
  color: var(--muted);
}

input,
select,
textarea {
  border-radius: 0.7rem;
  border: 1px solid rgba(184, 148, 148, 0.35);
  background: rgba(42, 15, 15, 0.72);
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  font-family: inherit;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(184, 148, 148, 0.7);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(239, 91, 91, 0.6);
  background: rgba(42, 15, 15, 0.98);
}

.btn.full-width {
  width: 100%;
  justify-content: center;
}

.form-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* =========================
   Footer
   ========================= */

.site-footer {
  border-top: 1px solid rgba(184, 148, 148, 0.18);
  background: #160505;
  padding: 1rem 0 1.1rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* =========================
   Responsive
   ========================= */

@media (max-width: 960px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .about-layout,
  .jobs-layout,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding-inline: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    padding: 0.8rem 0.9rem;
    background: rgba(32, 10, 10, 0.98);
    border-radius: 1rem;
    border: 1px solid rgba(184, 148, 148, 0.25);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7);
    flex-direction: column;
    gap: 0.6rem;
    transform-origin: top right;
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-med), transform var(--transition-med);
  }

  .nav.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .hero-content {
    padding-top: 3.2rem;
    padding-bottom: 3.4rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

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

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

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

  .section {
    padding: 3.7rem 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .hero {
    padding-top: 68px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-form {
    padding: 1.3rem 1.1rem 1.2rem;
  }

  .card {
    padding-inline: 1.1rem;
  }

  .job-card {
    padding-inline: 1.1rem;
  }
}


/* ---------------------------------------------------- */
/* Job Application Modal (Pop-up) Styles */
/* ---------------------------------------------------- */
.modal {
    display: none; /* مخفي افتراضياً */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* خلفية معتمة */
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a; /* لون الخلفية غامق */
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #444;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-modal:hover {
    color: #fff;
}

.modal h3 {
    margin-top: 0;
    color: #fff;
}

.modal p {
    color: #ccc;
    margin-bottom: 25px;
}

.btn-dashboard-link {
    background-color: #b91c1c; /* اللون الأحمر الخاص بموقعك */
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s;
}

.btn-dashboard-link:hover {
    background-color: #991b1b;
}

@keyframes slideDown {
    from {top: -50px; opacity: 0;}
    to {top: 0; opacity: 1;}
}

/* تنسيق زر See All */
.see-all-container {
    text-align: center;
    margin-top: 30px;
}
.btn-outline {
    border: 1px solid #fff;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
}
.btn-outline:hover {
    background: #fff;
    color: #000;
}
