/* ============================================================
   ApostilleGuideUSA.com — Master Stylesheet
   Aesthetic: Refined editorial / civic authority
   Fonts: Playfair Display (display) + Source Sans 3 (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --navy:       #1a2744;
  --navy-deep:  #0f1a30;
  --navy-mid:   #243358;
  --cream:      #f8f5ef;
  --cream-dark: #ede9e0;
  --amber:      #c8882a;
  --amber-light:#e8a84a;
  --text:       #2c2c2c;
  --text-muted: #5a5a5a;
  --text-light: #888;
  --white:      #ffffff;
  --border:     #d4cfc6;
  --border-light: #ebe7df;
  --success:    #2d6a4f;
  --radius:     4px;
  --radius-md:  8px;
  --shadow-sm:  0 1px 4px rgba(26,39,68,0.08);
  --shadow-md:  0 4px 16px rgba(26,39,68,0.12);
  --shadow-lg:  0 8px 32px rgba(26,39,68,0.16);
  --max-width:  1100px;
  --content-width: 780px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--amber); }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.4em; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; margin: 2.5rem 0 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; margin: 2rem 0 0.7rem; }
h4 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1.1rem; }
strong { font-weight: 600; color: var(--navy); }
em { font-style: italic; }

/* ── Header / Nav ── */
.site-header {
  background: var(--navy-deep);
  border-bottom: 3px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.4s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 1rem;
}
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span { color: var(--amber); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--amber-light); background: rgba(255,255,255,0.07); }
.site-nav a.active { color: var(--amber-light); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 60%, #2a3f6e 100%);
  color: var(--white);
  padding: 4rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(200,136,42,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 1rem;
  border: 1px solid rgba(200,136,42,0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1.2rem;
  max-width: 680px;
}
.hero .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  font-family: 'Source Sans 3', sans-serif;
}
.btn-primary {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,136,42,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-dark:hover {
  background: var(--navy);
  color: var(--white);
}

/* ── Main layout ── */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  align-items: start;
}
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ── Sidebar ── */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.sidebar-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card ul li { margin-bottom: 0.4rem; }
.sidebar-card ul li a { font-size: 0.92rem; }

/* ── Info boxes ── */
.info-box {
  border-left: 4px solid var(--amber);
  background: var(--white);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.8rem 0;
  box-shadow: var(--shadow-sm);
}
.info-box.tip { border-color: var(--success); }
.info-box.warning { border-color: #c0392b; }
.info-box.warning p { color: #8b2316; }
.info-box strong { display: block; margin-bottom: 0.3rem; }

/* ── Quick Facts box ── */
.quick-facts {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin: 2rem 0;
}
.quick-facts h3 {
  color: var(--amber-light);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}
.quick-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
}
.qf-item { }
.qf-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.qf-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}
.qf-value.highlight { color: var(--amber-light); }

/* ── Step list ── */
.step-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.step-list li {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.1rem;
}
.step-content h4 { margin: 0 0 0.3rem; }
.step-content p { margin: 0; font-size: 0.96rem; }

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table thead th {
  background: var(--navy);
  color: var(--white);
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  font-family: 'Source Sans 3', sans-serif;
}
.data-table tbody tr { border-bottom: 1px solid var(--border-light); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--cream); }
.data-table td { padding: 0.75rem 1rem; vertical-align: top; }

/* ── FAQ ── */
.faq-list { margin: 1.5rem 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--white);
}
.faq-q {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--navy);
  user-select: none;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--cream); }
.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 300;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.96rem;
  padding: 0 1.25rem;
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding: 0 1.25rem 1.1rem;
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
  color: var(--text);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--amber);
  color: var(--text);
  text-decoration: none;
}
.card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
.card h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.card p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.card .fee-badge {
  display: inline-block;
  background: var(--cream-dark);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-top: 0.75rem;
}

/* ── State grid ── */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.state-link {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.state-link:hover {
  border-color: var(--amber);
  background: var(--cream);
  color: var(--amber);
}
.state-link .fee {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 0.9rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.83rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb span { margin: 0 0.4rem; }

/* ── Page header ── */
.page-header {
  background: linear-gradient(to right, var(--navy-deep), var(--navy-mid));
  color: var(--white);
  padding: 2.5rem 1.5rem;
}
.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-header .eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 0.5rem;
}
.page-header h1 { color: var(--white); font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.page-header .subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  margin-top: 0.6rem;
  max-width: 600px;
}

/* ── Disclaimer ── */
.disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 2.5rem 0 1rem;
  background: var(--white);
  line-height: 1.5;
}
.disclaimer strong { color: var(--text-muted); }

/* ── Section dividers ── */
.section { padding: 3rem 1.5rem; }
.section-alt { background: var(--white); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.rule {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5rem 0;
}

/* ── Tool styles ── */
.tool-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
}
.tool-wrap h2 { margin-top: 0; }
.form-row { margin-bottom: 1.2rem; }
.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--navy);
  text-transform: uppercase;
}
.form-row select, .form-row input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%231a2744' d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px;
}
.form-row select:focus, .form-row input:focus {
  outline: none;
  border-color: var(--amber);
  background-color: var(--white);
}
.checklist-output {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: none;
}
.checklist-output.visible { display: block; }
.checklist-output h3 {
  font-size: 1rem;
  margin: 0 0 1.2rem;
  color: var(--navy);
}
.checklist-output ul { list-style: none; padding: 0; }
.checklist-output ul li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.94rem;
}
.checklist-output ul li:last-child { border-bottom: none; }
.checklist-output ul li::before {
  content: '□';
  font-size: 1.1rem;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.output-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
  padding: 1.2rem;
  background: var(--navy);
  border-radius: var(--radius);
  color: var(--white);
}
.output-meta-item .meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.2rem;
}
.output-meta-item .meta-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber-light);
}

/* ── Footer ── */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  font-size: 0.88rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand .site-logo { font-size: 1.1rem; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.6; }
.footer-col h5 {
  color: var(--amber-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--amber-light); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.45); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber-light); }

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.5s ease forwards;
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.12s; }
.fade-in:nth-child(3) { animation-delay: 0.19s; }
.fade-in:nth-child(4) { animation-delay: 0.26s; }
.fade-in:nth-child(5) { animation-delay: 0.33s; }
.fade-in:nth-child(6) { animation-delay: 0.40s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.highlight-amber { color: var(--amber); }
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--cream-dark);
  color: var(--navy);
}
.tag.green { background: #d4edda; color: #155724; }
.tag.orange { background: #fdebd0; color: #7d5a00; }
.tag.red { background: #f8d7da; color: #721c24; }

/* ── Ads placeholder ── */
.ad-slot {
  background: var(--cream-dark);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 1.5rem;
  margin: 2rem 0;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero { padding: 2.5rem 1rem 2.5rem; }
  .page-wrap, .content-wrap, .section { padding-left: 1rem; padding-right: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  h2 { margin-top: 1.8rem; }
  .site-nav { display: none; }
}
@media (max-width: 480px) {
  .quick-facts-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
