/* ================================
HAS Ag Service - Unified Styles
================================ */

:root {
  --brand-red: #C8102E;
  --white: #fff;
  --gray: #f4f4f4;
  --dark-gray: #333;
}

/* RESET & BASE */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--gray);
  color: var(--dark-gray);
  margin: 0;
  padding: 0;
}

a { text-decoration: none; color: inherit; }

/* ================================
NAVBAR
================================ */
/* ================================
NAVBAR (FIXED MOBILE + HAMBURGER)
================================ */

.navbar {
  background: #1e1e1e;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
  position: relative;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 60px;
}

.company-name {
  font-weight: bold;
  font-size: 2rem;
  letter-spacing: 1.5px;
}

/* DESKTOP NAV */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--white);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-links a.active,
.nav-links a:hover {
  background: #393e46;
}

/* HAMBURGER BUTTON */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
  z-index: 1100;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: white;
  display: block;
  border-radius: 2px;
}

/* ================================
MOBILE NAV FIX
================================ */

@media (max-width: 1024px) {

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    background: #1e1e1e;
    flex-direction: column;
    width: 100%;
    padding: 10px 0;
    gap: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  }

  /* THIS is what JS toggles */
  .nav-links.nav-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 20px;
  }

  /* dropdown fix for mobile */
  .dropdown-menu {
    position: static;
    display: none;
    background: #2a2a2a;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }
}
/* ================================
SECTION STYLES
================================ */
.hero {
  background: linear-gradient(90deg, var(--white) 0%, var(--gray) 100%);
  padding: 60px 0 40px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--brand-red);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 32px;
  color: var(--white);
}

.cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.btn-primary {
  background: var(--brand-red);
  color: var(--white);
}

.btn-primary:hover { background: #a60d24; }

.btn-ghost {
  background: transparent;
  color: var(--brand-red);
  border: 2px solid var(--brand-red);
}

.btn-ghost:hover { background: var(--gray); }

.section {
  padding: 40px 0;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.container.intro {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container.intro h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  color: var(--brand-red);
}

.team-container {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  margin-top: 32px;
}

.team-content {
  flex: 0 0 220px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.about-team-header {
  font-size: 2.2rem;
  color: var(--brand-red);
  margin-bottom: 24px;
  text-align: left;
}

.team-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  max-width: 900px;
  margin: 0 auto;
}

.service-grid {
  flex: 1;
}

.about-team-img {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 0 auto 24px auto;
  border-radius: 12px;
}

/* ================================
SERVICE GRID
================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 24px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.service-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.12); }

.service-card img {
  width: 100%;
  max-width: 120px;
  margin-bottom: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--brand-red);
}

.service-card p { color: var(--dark-gray); font-size: 1rem; }

/* ================================
PRODUCT GRID
================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.product-card:hover { transform: translateY(-6px); }

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-card .card-body { padding: 15px; }

.product-card h3 {
  color: var(--brand-red);
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.product-card p { font-size: 0.95rem; color: var(--dark-gray); }

/* ================================
FILTER BUTTONS
================================ */
.product-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--brand-red);
  background: var(--white);
  color: var(--brand-red);
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--brand-red);
  color: var(--white);
}

/* ================================
FOOTER
================================ */
footer {
  background: #1e1e1e; /* Dark charcoal */
  color: var(--white);
  text-align: center;
  padding: 28px 0 18px 0;
  margin-top: 40px;
  font-size: 1rem;
}

footer p { margin-bottom: 8px; font-size: 0.95rem; }

footer a {
  color: #fff;
  text-decoration: underline;
}

footer a:hover { color: #f4f4f4; }

@media (max-width: 1024px) {

  /* ================================
  NAV LAYOUT FIX
  ================================ */
  .navbar {
    position: relative;
    padding: 10px 16px;
  }

  .logo {
    order: 1;
  }

  .menu-toggle {
    order: 2;
  }

  .company-name {
    font-size: 1.6rem;
  }

  /* ================================
  HAMBURGER BUTTON
  ================================ */
  .menu-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 48px;
    min-height: 48px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    z-index: 2000;
  }

  /* ================================
  MOBILE MENU (SMOOTH + STABLE)
  ================================ */
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;

    display: flex;
    flex-direction: column;

    background: #1e1e1e;
    padding: 10px 0;

    max-height: 0;
    overflow: hidden;

    opacity: 0;
    transform: translateY(-10px);

    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;

    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  }

  /* OPEN MENU */
  .nav-links.nav-open {
    max-height: 700px;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 18px;
    width: 100%;
  }

  /* ================================
  DROPDOWN FIX (NO OVERLAP)
  ================================ */

  .dropdown {
    width: 100%;
  }

  .dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }

  .dropdown-menu {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #2a2a2a;
    transition: max-height 0.25s ease;
  }

  .dropdown.open .dropdown-menu {
    max-height: 300px;
  }

  .dropdown-menu a {
    padding-left: 32px;
    border-bottom: 1px solid #393e46;
    display: block;
  }

  .dropdown-menu a:last-child {
    border-bottom: none;
  }

  /* ================================
  CLEANUP
  ================================ */
  .team-container {
    flex-direction: column;
    gap: 24px;
  }

  .team-content,
  .about-team-header {
    text-align: center;
    justify-content: center;
  }

  .about-team-img {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .about-team-header {
    text-align: center;
  }
}