/* ==========================================================================
   MAIN.CSS — Shared styles across all pages
   Variables, reset, typography, nav, footer, buttons, page-hero, back-link
   ========================================================================== */

/* VARIABLES */
:root {
  --blue: #1E5FA8;
  --blue-light: #4F8EF7;
  --blue-dark: #0D3D6E;
  --blue-pale: #EBF2FF;
  --text-dark: #0F1C2E;
  --text-body: #3D5066;
  --text-muted: #7A90A8;
  --white: #FFFFFF;
  --border: #D6E4F7;
  --success: #1E9E6B;
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* BASE */
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-body);
  background: var(--white);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  color: var(--text-dark);
  line-height: 1.2;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--blue-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-body);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--blue); }

.nav-cta {
  background: var(--blue);
  color: white !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--blue-dark) !important; color: white !important; }

/* BUTTONS */
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: white;
  text-decoration: none;
  padding: 16px 36px;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(30, 95, 168, 0.3);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--blue);
  text-decoration: none;
  padding: 16px 36px;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid var(--blue);
  transition: all 0.2s;
  margin-left: 16px;
}

.btn-secondary:hover { background: var(--blue-pale); }

.btn-white {
  display: inline-block;
  background: white;
  color: var(--blue);
  text-decoration: none;
  padding: 16px 40px;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* SECTION TAG */
.section-tag {
  display: inline-block;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

/* PAGE HERO (case-studies hub & individual pages) */
.page-hero {
  padding: 140px 40px 80px;
  background: var(--blue-dark);
  text-align: center;
}

.page-hero .section-tag { color: var(--blue-light); }

.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.page-hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  max-width: 500px;
  margin: 0 auto;
}

/* BACK LINK */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover { color: white; }

/* FOOTER */
footer {
  background: var(--text-dark);
  padding: 48px 40px;
  color: rgba(255,255,255,0.6);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left .footer-name {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  display: block;
  margin-bottom: 4px;
}

.footer-left .footer-title {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.footer-right a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-right a:hover { color: white; }

/* HAMBURGER BUTTON */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

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

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

/* MOBILE NAV DRAWER */
.nav-mobile {
  display: none;
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 8px 20px 16px;
  z-index: 99;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

.nav-mobile a {
  text-decoration: none;
  color: var(--text-body);
  font-size: 16px;
  font-weight: 500;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--blue); }

.nav-mobile .nav-cta {
  margin-top: 8px;
  background: var(--blue);
  color: white !important;
  text-align: center;
  padding: 13px;
  border-radius: 8px;
  font-weight: 600;
  border-bottom: none;
}

.nav-mobile .nav-cta:hover { background: var(--blue-dark) !important; }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .page-hero { padding: 100px 20px 60px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { align-items: flex-start; }
}

@media (max-width: 480px) {
  .page-hero { padding: 90px 16px 48px; }
  .page-hero p { font-size: 16px; }
  footer { padding: 36px 16px; }
  .btn-primary { padding: 14px 28px; font-size: 15px; }
}
