/* css/layout.css - Layout components */

/* Header */
.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  gap: var(--space-8);
}

.header__logo a {
  text-decoration: none;
  color: inherit;
}

.header__logo h1 {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  font-weight: var(--font-weight-bold);
  transition: color var(--transition-fast);
}

.header__logo:hover h1 {
  color: var(--color-primary-hover);
}

.header__tagline {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-base);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: var(--font-weight-semibold);
}

.nav-link.active::after {
  width: 80%;
}

.header__right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* =============================================
   HAMBURGER BUTTON — polished pill style
   ============================================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--color-primary-light, #eff6ff);
  border: 1.5px solid rgba(37, 99, 235, 0.15);
  border-radius: 0.75rem;
  cursor: pointer;
  padding: 0;
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
}

.hamburger:hover {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.3);
  transform: scale(1.06);
}

.hamburger-line {
  display: block;
  border-radius: 3px;
  background: var(--color-primary);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease,
              width 0.3s ease;
}

.hamburger-line:nth-child(1) { width: 20px; height: 2px; }
.hamburger-line:nth-child(2) { width: 14px; height: 2px; align-self: flex-start; margin-left: 11px; }
.hamburger-line:nth-child(3) { width: 20px; height: 2px; }

/* Active X state */
.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 20px;
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 20px;
}

/* =============================================
   OVERLAY
   ============================================= */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 20, 0.55);
  z-index: 999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* =============================================
   MOBILE NAV DRAWER
   ============================================= */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(88vw, 340px);
  height: 100dvh;
  height: 100vh;
  background: #ffffff;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: right 0.38s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: -8px 0 40px rgba(3, 50, 100, 0.14);
  display: flex;
  flex-direction: column;
}

.mobile-nav.active {
  right: 0;
}

/* — Header area — */
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem 1.1rem;
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
  position: relative;
  flex-shrink: 0;
}

/* Decorative orb inside header */
.mobile-nav-header::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -50px;
  right: -30px;
  pointer-events: none;
}

.mobile-nav-header::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  bottom: -20px;
  left: 20px;
  pointer-events: none;
}

/* Brand name in drawer */
.mobile-nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.mobile-nav-brand-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.mobile-nav-brand-tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Legacy h3 support */
.mobile-nav-header h3 {
  font-size: 1.05rem;
  color: #ffffff;
  margin: 0;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* Close button */
.mobile-nav-close {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 0.6rem;
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.25s ease;
  flex-shrink: 0;
}

.mobile-nav-close:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(90deg) scale(1.1);
}

/* — Navigation links area — */
.mobile-nav-menu {
  list-style: none;
  padding: 1rem 1rem 0.5rem;
  margin: 0;
  flex: 1;
}

.mobile-nav-menu li {
  margin-bottom: 0.25rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  color: #1e293b;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.875rem;
  transition: background 0.25s ease,
              color 0.25s ease,
              padding-left 0.3s ease,
              box-shadow 0.25s ease;
  position: relative;
}

/* Arrow indicator on each link */
.mobile-nav-link::after {
  content: '›';
  font-size: 1.3rem;
  line-height: 1;
  color: #94a3b8;
  transition: transform 0.3s ease, color 0.3s ease;
}

.mobile-nav-link:hover {
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  color: #0369a1;
  padding-left: 1.35rem;
  box-shadow: 0 2px 12px rgba(3, 105, 161, 0.08);
}

.mobile-nav-link:hover::after {
  transform: translateX(3px);
  color: #0ea5e9;
}

.mobile-nav-link.active {
  background: linear-gradient(135deg, #dbeafe, #bae6fd);
  color: #0369a1;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(3, 105, 161, 0.12);
  padding-left: 1.35rem;
}

.mobile-nav-link.active::after {
  color: #0ea5e9;
  font-weight: 700;
}

/* Active left accent stripe */
.mobile-nav-menu li:has(.mobile-nav-link.active)::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 100%;
  background: #0ea5e9;
  border-radius: 0 2px 2px 0;
}

/* — Divider — */
.mobile-nav-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.2), transparent);
  margin: 0.5rem 1rem;
}

/* — Contact footer area — */
.mobile-nav-contact {
  margin: 0;
  padding: 1.25rem 1.5rem 2rem;
  background: linear-gradient(135deg, #f8fafc, #f0f9ff);
  border-top: 1px solid rgba(14, 165, 233, 0.12);
  flex-shrink: 0;
}

.mobile-nav-contact-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.mobile-nav-contact p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
}

.mobile-nav-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #0369a1;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.mobile-nav-contact a:hover {
  color: #0ea5e9;
}

/* CTA button inside drawer */
.mobile-nav-cta {
  display: block;
  margin-top: 1rem;
  padding: 0.8rem 1.25rem;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0.875rem;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(3, 105, 161, 0.25);
}

.mobile-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.35);
  color: #ffffff !important;
}

/* Staggered link entry animations when drawer opens */
.mobile-nav.active .mobile-nav-menu li {
  animation: mobileNavLinkIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.mobile-nav.active .mobile-nav-menu li:nth-child(1) { animation-delay: 0.08s; }
.mobile-nav.active .mobile-nav-menu li:nth-child(2) { animation-delay: 0.14s; }
.mobile-nav.active .mobile-nav-menu li:nth-child(3) { animation-delay: 0.20s; }
.mobile-nav.active .mobile-nav-menu li:nth-child(4) { animation-delay: 0.26s; }
.mobile-nav.active .mobile-nav-menu li:nth-child(5) { animation-delay: 0.32s; }

@keyframes mobileNavLinkIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mobile-nav.active .mobile-nav-contact {
  animation: mobileNavLinkIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.38s both;
}

/* Footer */
.footer {
  background: var(--color-gray-900);
  color: var(--color-white);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-16);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-blue-500), var(--color-sky-500), var(--color-indigo-500));
}

.footer__content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.footer__company h3 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-2xl);
}

.footer__company p {
  color: var(--color-gray-400);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-8);
}

.footer__column h4 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  position: relative;
  display: inline-block;
}

.footer__column h4::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-blue-500);
}

.footer__column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__column li {
  margin-bottom: var(--space-3);
  color: var(--color-gray-400);
  font-size: var(--font-size-sm);
}

.footer__column a {
  color: var(--color-gray-400);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
  padding-left: 0;
}

.footer__column a:hover {
  color: var(--color-white);
  padding-left: var(--space-2);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-gray-800);
  padding-top: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.footer__certifications {
  display: flex;
  gap: var(--space-3);
}

.cert-mini {
  background: var(--color-gray-800);
  color: var(--color-gray-300);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}

.cert-mini:hover {
  background: var(--color-blue-600);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer__bottom p {
  margin: 0;
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

.header__logo-img {
    max-height: 50px; /* Adjust based on your header size */
    width: auto;
    display: block;
}