/* ============================================================
   layout.css — Container, section, grid, nav, footer
   Overberg Service Centre
   ============================================================ */

/* --- Container -------------------------------------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* --- Section ---------------------------------------------- */
.section {
  padding-block: var(--space-xl);
}

.section--surface {
  background-color: var(--color-surface);
}

.section--dark {
  background-color: var(--color-surface-2);
}

/* ============================================================
   Navigation
   ============================================================ */
@keyframes phone-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(59, 130, 246, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(59, 130, 246, 0);   }
}

@keyframes nav-drop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(13, 13, 18, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: nav-drop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-md);
}

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

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-white);
}

/* Phone CTA */
.nav-phone {
  flex-shrink: 0;
}

.nav-phone-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-white);
  transition: opacity var(--transition);
}

.nav-phone-link:hover {
  opacity: 0.75;
}

.nav-phone-icon {
  width: 38px;
  height: 38px;
  background-color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-white);
  animation: phone-pulse 2.2s ease-out infinite;
}

.nav-phone-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--color-white);
  letter-spacing: 0.01em;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-xs);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

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

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

/* Mobile nav */
@media (max-width: 900px) {
  .nav-phone-number {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-phone {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background-color: #000;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-sm) var(--space-md) var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  }

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

  .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
  }
}

/* ============================================================
   Footer
   ============================================================ */
#site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-lg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.footer-logo {
  height: 52px;
  width: auto;
}

.footer-tagline {
  margin-top: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer-contact p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

.footer-contact a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

.footer-bottom {
  padding-block: var(--space-md);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.2);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.2);
  transition: color var(--transition);
}

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

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
