/* =============================
   AffigBenzo AppHire - style.css
   Professional Corporate Theme (blue/gray palette)
   Mobile-first, Flexbox-only layouts
   ============================= */

/* -----------------------------
   CSS RESET & NORMALIZE
------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.4; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2rem; }
a { background-color: transparent; text-decoration: none; }
img { border-style: none; max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid #1FB7A6; outline-offset: 2px; }

/* -----------------------------
   THEME VARIABLES (with fallbacks)
------------------------------*/
:root {
  --primary: #123B6D;
  --secondary: #1FB7A6;
  --accent: #F4F7FB;
  --ink: #0E223D; /* main text */
  --muted: #5C6B7A; /* secondary text */
  --line: #DCE3EC; /* borders */
  --surface: #ffffff; /* cards */
  --surface-alt: #F8FAFD; /* light background */
  --shadow: 0 4px 12px rgba(18, 59, 109, 0.08);
}

/* -----------------------------
   BASE TYPOGRAPHY & BODY
------------------------------*/
body {
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink, #0E223D);
  background: var(--surface-alt, #F8FAFD);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--primary, #123B6D);
  letter-spacing: 0.2px;
}

/* Type scale - mobile first */
h1 { font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.35; margin-bottom: 8px; }
p, li, address { font-size: 16px; line-height: 1.65; color: var(--ink, #0E223D); }
.small { font-size: 14px; color: var(--muted, #5C6B7A); }
.text-section { color: var(--muted, #5C6B7A); max-width: 70ch; }

/* Links */
a { color: var(--primary, #123B6D); text-decoration: underline; text-underline-offset: 2px; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; }
a:hover { color: #0e2f59; }

/* Buttons (used via context selectors below) */
.btn, .header-ctas a, .content-wrapper > div > a, .content-wrapper > p > a, .mobile-nav a.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .08s ease;
}
.btn:active, .header-ctas a:active, .content-wrapper > div > a:active { transform: translateY(1px); }

/* Primary & Outline variants for CTAs */
.header-ctas a:first-child, .btn-primary { background: var(--primary, #123B6D); color: #fff; box-shadow: var(--shadow); }
.header-ctas a:first-child:hover, .btn-primary:hover { background: #0e2f59; }
.header-ctas a:last-child, .btn-outline { background: #fff; color: var(--primary, #123B6D); border-color: var(--primary, #123B6D); }
.header-ctas a:last-child:hover, .btn-outline:hover { background: var(--accent, #F4F7FB); }

/* Utility badges/labels (optional) */
.badge { display:inline-flex; align-items:center; padding: 4px 10px; border-radius: 999px; background: var(--accent, #F4F7FB); color: var(--primary, #123B6D); font-size: 12px; border:1px solid var(--line, #DCE3EC); }

/* -----------------------------
   LAYOUT: CONTAINERS & SPACING
   (Flexbox-only; no grid/columns)
------------------------------*/
/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--surface, #fff); border: 1px solid var(--line, #DCE3EC); border-radius: 12px; box-shadow: var(--shadow); }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #fff; border: 1px solid var(--line, #DCE3EC); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink, #0E223D); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Structural wrappers used by all pages */
main { display: flex; flex-direction: column; gap: 20px; }
section { display: flex; flex-direction: column; margin-bottom: 60px; padding: 40px 20px; background: var(--surface, #ffffff); border-top: 1px solid rgba(220,227,236,0.35); border-bottom: 1px solid rgba(220,227,236,0.35); }
.container { display: flex; width: 100%; justify-content: center; }
.content-wrapper { display: flex; flex-direction: column; flex-wrap: wrap; gap: 16px; width: 100%; max-width: 1120px; padding: 0 8px; }

/* Lists spacing */
ul, ol { display: flex; flex-direction: column; gap: 8px; }
li { padding-left: 2px; }

/* Address */
address { font-style: normal; color: var(--muted, #5C6B7A); }

/* -----------------------------
   HEADER & NAVIGATION
------------------------------*/
header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--line, #DCE3EC); box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
header .container { padding: 10px 16px; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: flex; align-items: center; text-decoration: none; }
.logo-text { font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; font-weight: 800; letter-spacing: 0.3px; color: var(--primary, #123B6D); font-size: 18px; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { text-decoration: none; color: var(--ink, #0E223D); padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; }
.main-nav a:hover { background: var(--accent, #F4F7FB); border-color: var(--line, #DCE3EC); }

.header-ctas { display: flex; align-items: center; gap: 12px; }
.header-ctas a { text-decoration: none; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  position: fixed; right: 14px; top: 14px; z-index: 1101;
  width: 44px; height: 44px; border-radius: 8px; background: var(--primary, #123B6D);
  color: #fff; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.mobile-menu-toggle:hover { background: #0e2f59; }

/* Mobile Menu Panel */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1100; background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); opacity: 0; transition: transform .3s ease, opacity .25s ease; box-shadow: -6px 0 16px rgba(0,0,0,0.08);
}
/* Support multiple possible open states */
.mobile-menu.open, .mobile-menu.active, .mobile-menu.show, body.menu-open .mobile-menu { transform: translateX(0); opacity: 1; }

.mobile-menu-close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 8px; background: var(--accent, #F4F7FB); color: var(--ink, #0E223D); font-size: 18px; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; padding: 72px 20px 20px; }
.mobile-nav a { display: flex; padding: 14px 12px; border-radius: 8px; color: var(--ink, #0E223D); text-decoration: none; border: 1px solid var(--line, #DCE3EC); }
.mobile-nav a:hover { background: var(--accent, #F4F7FB); }
.mobile-nav a.cta { background: var(--primary, #123B6D); color: #fff; border-color: var(--primary, #123B6D); }

/* Show main nav on larger screens; hide mobile toggle */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   SECTIONS & CONTENT STYLES
------------------------------*/
/* Hero emphasis (first section) */
main > section:first-child { background: var(--accent, #F4F7FB); border: 1px solid rgba(220,227,236,0.6); }
main > section:first-child h1 { font-size: 36px; }

/* Text-image sections responsive direction */
.text-image-section { align-items: center; }
@media (max-width: 768px) { .text-image-section { flex-direction: column; } }

/* Testimonials: ensure strong contrast */
#home-testimonials + .container, .testimonial-wrapper { display: flex; }
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--primary, #123B6D); }

/* Feature / Info blocks (general) */
.card, .testimonial-card { gap: 12px; }

/* Lists within text-section */
.text-section ul, .text-section ol { gap: 6px; }

/* Inline CTA rows inside sections */
.content-wrapper > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* -----------------------------
   FOOTER
------------------------------*/
footer { background: var(--primary, #123B6D); color: #e9f2ff; padding-top: 28px; }
footer .container { padding: 16px; }
footer .content-wrapper { gap: 16px; }
footer nav { display: flex; flex-direction: column; gap: 12px; }
footer a { color: #e9f2ff; text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: #ffffff; }
footer .logo-text { color: #fff; }
footer p { color: #e9f2ff; }
footer address { color: #d6e6ff; }

@media (min-width: 768px) {
  footer nav { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* -----------------------------
   CARDS & PANELS (generic)
------------------------------*/
.panel { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--line, #DCE3EC); border-radius: 12px; box-shadow: var(--shadow); padding: 20px; }

/* -----------------------------
   SPACING UTILITIES
------------------------------*/
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-16 { margin-top: 16px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-24 { margin-bottom: 24px !important; }
.mt-32 { margin-top: 32px !important; }
.mb-32 { margin-bottom: 32px !important; }

/* -----------------------------
   TABLES (if any appear later)
------------------------------*/
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line, #DCE3EC); }
th { background: var(--accent, #F4F7FB); color: var(--primary, #123B6D); }

/* -----------------------------
   RESPONSIVE TYPOGRAPHY & LAYOUT
------------------------------*/
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .content-wrapper { gap: 20px; padding: 0 16px; }
}
@media (min-width: 1100px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* -----------------------------
   INTERACTIONS & MICRO-ANIMATIONS
------------------------------*/
@media (prefers-reduced-motion: no-preference) {
  .hover-raise:hover { transform: translateY(-2px); }
}

/* -----------------------------
   COOKIE CONSENT BANNER & MODAL
------------------------------*/
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  display: flex; justify-content: center; padding: 12px; pointer-events: none;
  transform: translateY(100%); opacity: 0; transition: transform .3s ease, opacity .25s ease;
}
.cookie-banner.show, body.cookies-open .cookie-banner { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-inner {
  display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1120px;
  background: #ffffff; border: 1px solid var(--line, #DCE3EC); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  padding: 16px; color: var(--ink, #0E223D);
}
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .accept { background: var(--secondary, #1FB7A6); color: #fff; border: 1px solid var(--secondary, #1FB7A6); }
.cookie-actions .accept:hover { background: #179a90; }
.cookie-actions .reject { background: #fff; color: var(--primary, #123B6D); border: 1px solid var(--primary, #123B6D); }
.cookie-actions .reject:hover { background: var(--accent, #F4F7FB); }
.cookie-actions .settings { background: #fff; color: var(--ink, #0E223D); border: 1px solid var(--line, #DCE3EC); }
.cookie-actions .settings:hover { background: var(--accent, #F4F7FB); }

/* Cookie Preferences Modal */
.cookie-overlay { position: fixed; inset: 0; background: rgba(14,34,61,0.5); z-index: 1200; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.cookie-overlay.show, body.cookies-modal-open .cookie-overlay { opacity: 1; pointer-events: auto; }
.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -40%);
  width: min(96vw, 680px); background: #fff; border: 1px solid var(--line, #DCE3EC);
  border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.18); z-index: 1201; opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; gap: 16px; padding: 20px; transition: opacity .25s ease, transform .3s ease;
}
.cookie-modal.show, body.cookies-modal-open .cookie-modal { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle rows */
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line, #DCE3EC); border-radius: 10px; padding: 12px; }
.toggle { position: relative; width: 44px; height: 24px; background: #cfd8e3; border-radius: 999px; transition: background .2s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform .2s ease; }
.toggle.on { background: var(--secondary, #1FB7A6); }
.toggle.on::after { transform: translateX(20px); }

/* -----------------------------
   ACCESSIBILITY & MISC
------------------------------*/
::selection { background: rgba(31,183,166,0.22); }

/* Ensure adequate gaps so nothing overlaps */
.content-wrapper > * + * { margin-top: 0; }

/* -----------------------------
   PAGE-SPECIFIC LIGHT TOUCHES
------------------------------*/
/* Index - hero CTAs spacing */
[aria-labelledby="home-hero"] .content-wrapper > div { gap: 12px; }

/* Testimonials section background light to separate */
[aria-labelledby="home-testimonials"] { background: var(--accent, #F4F7FB); }

/* Pricing notes */
[aria-labelledby="home-pricing"], main section:has(h2) {}

/* Support page - lists inside knowledge base */
[aria-label="Footer"] { gap: 12px; }

/* -----------------------------
   MEDIA QUERIES: LAYOUT ADJUSTMENTS
------------------------------*/
@media (min-width: 768px) {
  section { padding: 56px 24px; }
  .content-wrapper > div { gap: 16px; }
}

@media (min-width: 992px) {
  header .content-wrapper { gap: 24px; }
}

/* -----------------------------
   PRINT (basic)
------------------------------*/
@media print {
  header, .mobile-menu-toggle, .cookie-banner, .cookie-overlay, .cookie-modal { display: none !important; }
  a { text-decoration: underline; color: #000; }
  section { border: none; background: #fff; }
}
