/* === AGS America — Detail Pages === */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-light: #f0ede8;
  --bg-dark: #111111;
  --bg-card: #1a1a1a;
  --text-on-light: #1a1a1a;
  --text-on-dark: #f0ede8;
  --accent: #c8a45c;
  --accent-hover: #dbb96e;
  --border: rgba(255,255,255,0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  overflow-x: hidden;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 3vw;
  background: var(--bg-dark);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* === Page Hero === */
.page-hero {
  padding: 10rem 5vw 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero .page-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.page-hero .page-intro {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
  max-width: 640px;
}

/* === Content Section === */
.page-section {
  padding: 4rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
}

.page-section + .page-section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2rem;
}

.section-text {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
  font-weight: 300;
  max-width: 720px;
}

.section-text + .section-text {
  margin-top: 1.25rem;
}

/* === Cards Grid === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  transition: border-color 0.3s;
}

.card:hover {
  border-color: rgba(200,164,92,0.3);
}

.card-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.1);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-dark);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.timeline-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
}

/* === Stats Row === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding: 2.5rem 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #ffffff;
}

.stat-unit {
  font-size: 1rem;
  color: var(--accent);
  margin-left: 0.25rem;
}

.stat-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* === Certification Badges === */
.cert-list {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cert-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 2rem;
  text-align: center;
}

.cert-badge .cert-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.cert-badge .cert-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
}

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-list li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-value {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
}

.contact-value a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-value a:hover {
  color: var(--accent);
}

.map-container {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: 0;
  filter: grayscale(0.8) brightness(0.7) contrast(1.1);
}

/* === Photo Grid === */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.photo-item {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.photo-item.photo-wide {
  grid-column: 1 / -1;
}

.photo-item.photo-wide img {
  height: 360px;
}

.photo-caption {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  background: var(--bg-card);
}

/* === Footer === */
.site-footer {
  position: relative;
  z-index: 10;
  background: var(--bg-dark);
  padding: 1.25rem 5vw;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.footer-info {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* === Hamburger Toggle === */
.nav-toggle {
  display: none;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  z-index: 201;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 2.5px 0;
  background: #fff;
  border-radius: 1px;
  -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17,17,17,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .cert-list {
    flex-direction: column;
  }
}
