/* ------- COLOR PALETTE ------- */
:root {
  --primary: #0A0B23; /* Primary color for headings and main elements */
  --accent: #06c371; /* Accent color for buttons, highlights */
  --bg: #FFFFFF; /* Main background color */
  --text: #0A0B23; /* Default text color */
  --card: #FFFFFF; /* Background color for cards */
  --border: #E5E5E5; /* Default border color */
}

/* ------- RESET ------- */
* {
  box-sizing: border-box; /* Include padding and border in element width/height */
  margin: 0;
  padding: 0;
  direction: rtl; /* Right-to-left text direction */
  font-family: Open Sans, Heebo, Alef; /* Default font stack */
}

/* ------- GLOBAL ------- */
html, body {
  height: 100%; /* Ensure full height for layout */
  margin: 0;
}

body {
  background: var(--bg); /* Apply background color */
  color: var(--text); /* Default text color */
  line-height: 1.6; /* Default line spacing */
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Make sure footer stays at bottom */
  padding-top: 65px; /* Reserve space for fixed header */
}

/* ============================= */
/*        ABOUT – HERO AREA      */
/* ============================= */

.about-hero {
  position: relative; /* Allows overlay positioning */
  background-image: url("images/image9.jpg"); /* Hero background image */
  background-size: cover; /* Cover entire section */
  background-position: center top; /* Positioning of image */
  min-height: 650px; /* Minimum height of hero */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center text vertically */
  text-align: center;
  padding: 120px 20px; /* Padding around text */
  color: var(--bg); /* Default text color */
}

/* Overlay layer above the image for better readability */
.about-hero::before {
  content: "";
  position: absolute;
  inset: 0; /* Cover entire parent */
  background: rgba(0,0,0,0.55); /* Semi-transparent dark overlay */
  z-index: 0;
}

/* Hero title */
.about-hero h2 {
  font-size: 44px;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 15px;
  color: var(--bg);
}

/* Hero subtitle / description */
.about-hero p {
  max-width: 850px;
  margin: 0 auto;
  margin-top: 20px;
  font-size: 28px;
  line-height: 2; /* Spacing between lines */
  color: var(--white);
}

/* ============================= */
/*        TEAM SECTION           */
/* ============================= */

.team-section {
  text-align: center;
  padding: 60px 20px 20px 20px; /* Top, right, bottom, left padding */
}

/* Team section heading */
.team-section h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--primary);
}

/* Team grid layout */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, auto));
  gap: 30px; /* Space between cards */
  padding: 0 20px;
  justify-content: center;
}

/* Individual team card */
.team-card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Light shadow */
  padding: 25px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  margin-bottom: 20px;
}

/* Team member image */
.team-img {
  width: 160px;
  height: 160px;
  object-fit: cover; /* Maintain aspect ratio */
  border-radius: 50%; /* Circular image */
  margin-bottom: 15px;
}

/* ============================= */
/*        OFFER SECTION          */
/* ============================= */

.offer-section {
  padding: 20px 20px 60px 20px;
  text-align: center;
}

/* Offer section heading */
.offer-section h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--primary);
}

/* Offer section text */
.offer-section p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 2;
  color: var(--heading);
}

/* ============================= */
/*      FADE-IN ANIMATION        */
/* ============================= */

.fade-in {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeInUp 1.2s ease-out forwards; /* Apply fade-in animation */
}

.fade-in-delay {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeInUp 1.6s ease-out forwards; /* Delayed fade-in */
}

/* Keyframes for fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/*  HIGH CONTRAST ACCESSIBILITY  */
/* ============================= */

/* Body in high contrast mode */
body.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

/* High contrast header, footer, and product cards */
body.high-contrast header, 
body.high-contrast footer,
body.high-contrast .product-card {
  background-color: #000 !important;
  border: 2px solid #fff !important;
  color: #fff !important;
}

/* Links and buttons in high contrast */
body.high-contrast a, 
body.high-contrast button {
  color: #ffff00 !important; /* Yellow for better visibility */
}

/* ============================= */
/*         RESPONSIVE            */
/* ============================= */

/* Tablets: max width 1024px */
@media (max-width: 1024px) {
  .about-hero {
    padding: 100px 20px;
    min-height: 500px;
  }

  .about-hero h2 {
    font-size: 36px;
  }

  .about-hero p {
    font-size: 22px;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
  }

  .team-card {
    padding: 20px;
  }

  .offer-section h2 {
    font-size: 32px;
  }

  .offer-section p {
    font-size: 18px;
  }
}

/* Large mobile devices: max width 768px */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    height: auto;
    padding: 10px 20px;
  }

  .header-right {
    flex-direction: column;
    gap: 15px;
  }

  .hero-text,
  .about-hero p {
    text-align: center;
  }

  .about-hero h2 {
    font-size: 28px;
  }

  .about-hero p {
    font-size: 18px;
    line-height: 1.6;
  }

  .team-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .team-card {
    max-width: 90%;
    margin: 0 auto 20px auto;
  }

  .offer-section h2 {
    font-size: 28px;
  }

  .offer-section p {
    font-size: 16px;
    line-height: 1.5;
  }
}

/* Small mobile devices: max width 480px */
@media (max-width: 480px) {
  .about-hero {
    padding: 80px 10px;
    min-height: 400px;
  }

  .about-hero h2 {
    font-size: 24px;
  }

  .about-hero p {
    font-size: 16px;
    line-height: 1.4;
  }

  .team-card {
    padding: 15px;
  }

  .team-img {
    width: 120px;
    height: 120px;
  }

  .offer-section h2 {
    font-size: 24px;
  }

  .offer-section p {
    font-size: 14px;
  }

  nav a {
    font-size: 14px;
    margin-left: 10px;
  }

  .profile-btn, .cart-btn {
    padding: 4px 8px;
    font-size: 14px;
  }
}
