/* =====================================================================
   ESTA money-page — pixel-copy of esta.cbp.dhs.gov
   Palette extracted verbatim from official styles-FA2M6XGH.css.
   Primary font: Roboto (matches upstream).
   =====================================================================
*/

:root {
  --cbp-navy: #00416a;
  --cbp-blue: #1460aa;
  --cbp-blue-hover: #0d4d8a;
  --dhs-red: #a00000;
  --dhs-red-dark: #7a0000;
  --dhs-orange: #f09511;
  --panel-blue: #edf3f9;
  --panel-cream: #fef7ed;
  --line: #ddd;
  --line-strong: #bbb;
  --ink: #222;
  --ink-soft: #555;
  --ink-mute: #777;
  --gov-bar-bg: #112e51;
  --gov-bar-alt: #f0f0f0;
  --link: #1460aa;
  --link-visited: #4c2c92;
  --shadow-panel: 0 1px 2px rgba(0,0,0,0.08);
  --radius: 2px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Roboto', Calibri, Tahoma, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--link-visited); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

img { max-width: 100%; height: auto; display: block; }

/* =====================================================================
   1. Government top banner
   ===================================================================== */

.gov-banner {
  background: var(--gov-bar-alt);
  border-bottom: 1px solid #ccc;
  padding: 6px 0;
  font-size: 13px;
  color: #212121;
}
.gov-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gov-banner-flag {
  width: 18px;
  height: 12px;
  background: linear-gradient(to bottom,
    #b22234 0 2px, #fff 2px 4px, #b22234 4px 6px, #fff 6px 8px, #b22234 8px 10px, #fff 10px 12px);
  position: relative;
  flex-shrink: 0;
}
.gov-banner-flag::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 6px;
  background: #3c3b6e;
}
.gov-banner-title { font-weight: 500; }
.gov-banner-toggle {
  margin-left: auto;
  color: var(--link);
  font-size: 12px;
  padding: 2px 6px;
  cursor: pointer;
}
.gov-banner-toggle::after { content: ' ▾'; font-size: 10px; }

.gov-details {
  display: none;
  background: var(--gov-bar-alt);
  padding: 14px 0 18px;
  border-bottom: 1px solid #ccc;
}
.gov-details.gov-details--open { display: block; }
.gov-details-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  font-size: 13px;
}
.gov-details h3 {
  font-size: 13px;
  color: var(--gov-bar-bg);
  margin: 0 0 4px;
}
.gov-details p { margin: 0 0 6px; color: #333; }
.gov-details-icon {
  display: inline-block;
  width: 40px; height: 40px;
  vertical-align: middle;
  margin-right: 10px;
}

/* =====================================================================
   2. CBP masthead (dark navy)
   ===================================================================== */

.cbp-header {
  background: var(--cbp-navy);
  color: #fff;
  padding: 14px 0;
  border-bottom: 3px solid var(--cbp-blue);
}
.cbp-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.cbp-logo {
  height: 56px;
  width: auto;
}
.cbp-title-block { line-height: 1.2; }
.cbp-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.cbp-sub {
  font-size: 12px;
  color: #cfe0f2;
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.cbp-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.cbp-lang-select {
  background: #fff;
  color: var(--ink);
  padding: 6px 26px 6px 10px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--cbp-blue);
  border-radius: 2px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2300416a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  min-width: 130px;
}
.cbp-help-btn {
  background: var(--dhs-orange);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  letter-spacing: 0.03em;
}
.cbp-help-btn:hover { background: #d88410; text-decoration: none; }

/* =====================================================================
   3. ESTA sub-header (blue band)
   ===================================================================== */

.esta-header {
  background: var(--cbp-blue);
  color: #fff;
  padding: 14px 0;
}
.esta-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.esta-logo {
  height: 44px;
  width: auto;
}
.esta-title-block { line-height: 1.15; }
.esta-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.esta-sub {
  font-size: 12px;
  color: #d6e5f2;
  margin-top: 2px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* =====================================================================
   4. Main nav (grey bar with pull-downs)
   ===================================================================== */

.main-nav {
  background: #f6f6f6;
  border-bottom: 1px solid var(--line);
}
.main-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 0;
}
.main-nav a {
  display: block;
  padding: 12px 20px;
  color: var(--cbp-navy);
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.main-nav a:first-child { border-left: 1px solid var(--line); }
.main-nav a:hover {
  background: var(--panel-blue);
  color: var(--cbp-blue);
  text-decoration: none;
}
.main-nav a.main-nav-active {
  background: var(--cbp-blue);
  color: #fff;
}

/* =====================================================================
   5. Main content area
   ===================================================================== */

.main {
  flex: 1;
  padding: 32px 16px 48px;
}
.main-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* --- Welcome hero --- */
.welcome-hero {
  text-align: center;
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.welcome-heading {
  font-size: 44px;
  color: var(--cbp-navy);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.welcome-heading strong {
  font-weight: 500;
  color: var(--cbp-blue);
}
.welcome-sub {
  font-size: 17px;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 720px;
  margin: 0 auto;
}

/* --- Process overview strip --- */
.process-strip {
  background: var(--panel-blue);
  border-top: 3px solid var(--cbp-blue);
  border-bottom: 1px solid #cad9ea;
  padding: 22px 16px;
  margin-bottom: 30px;
}
.process-strip-title {
  text-align: center;
  color: var(--cbp-navy);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}
.process-step {
  text-align: center;
}
.process-step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cbp-blue);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.process-step-lbl {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

/* --- Primary CTAs --- */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 32px;
}
.cta-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--cbp-blue);
  padding: 22px 22px 22px;
  background: #fff;
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
}
.cta-card h2 {
  color: var(--cbp-navy);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cta-card p {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 18px;
  flex: 1;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--cbp-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.12s ease;
  border: 1px solid transparent;
  text-decoration: none !important;
  align-self: flex-start;
}
.cta-btn:hover { background: var(--cbp-blue-hover); text-decoration: none; }
.cta-btn.cta-btn--secondary {
  background: #fff;
  color: var(--cbp-blue);
  border-color: var(--cbp-blue);
}
.cta-btn.cta-btn--secondary:hover { background: var(--panel-blue); }
.cta-btn::after { content: ' →'; margin-left: 4px; }

/* --- Info panel --- */
.info-panel {
  background: var(--panel-cream);
  border-left: 3px solid var(--dhs-orange);
  padding: 16px 20px;
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--ink);
}
.info-panel h3 {
  color: var(--dhs-red);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Right aside --- */
.aside {
  position: sticky;
  top: 16px;
}
.aside-block {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--cbp-navy);
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-panel);
}
.aside-block h3 {
  color: var(--cbp-navy);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.aside-block .aside-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--cbp-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  border-radius: 2px;
  text-decoration: none;
}
.aside-block .aside-btn:hover { background: var(--cbp-blue-hover); text-decoration: none; }
.aside-block .aside-btn.aside-btn--outline {
  background: #fff;
  color: var(--cbp-blue);
  border: 1px solid var(--cbp-blue);
}
.aside-block .aside-btn.aside-btn--outline:hover { background: var(--panel-blue); }
.aside-block ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-soft);
}
.aside-block ul li { margin-bottom: 6px; }

/* --- Flags strip (visa waiver countries) --- */
.flags-strip {
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.flags-strip h4 {
  text-align: center;
  color: var(--cbp-navy);
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.flags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  padding: 0 6px;
}
.flags-grid img {
  width: 40px; height: 26px;
  object-fit: cover;
  border: 1px solid var(--line);
  margin: 0 auto;
  display: block;
}

/* =====================================================================
   6. Footer
   ===================================================================== */

.site-footer {
  background: var(--cbp-navy);
  color: #cfe0f2;
  padding: 32px 0 24px;
  margin-top: auto;
  font-size: 13px;
}
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 40px;
}
.site-footer h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #cfe0f2; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer-seals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.site-footer-seals img { max-height: 56px; width: auto; opacity: 0.9; }
.site-footer-copyright {
  max-width: 1180px;
  margin: 20px auto 0;
  padding: 16px 16px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  color: #a3bfd8;
}

/* =====================================================================
   7. Responsive
   ===================================================================== */

@media (max-width: 900px) {
  .main-inner { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .cbp-header-inner { flex-wrap: wrap; }
  .cbp-header-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .cbp-title { font-size: 17px; }
  .esta-title { font-size: 18px; }
  .welcome-heading { font-size: 30px; }
  .main-nav-inner { overflow-x: auto; }
  .main-nav a { white-space: nowrap; padding: 12px 14px; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer-seals { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .gov-details-inner { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .site-footer-inner { grid-template-columns: 1fr; }
  .welcome-heading { font-size: 24px; }
  .process-step-num { width: 40px; height: 40px; font-size: 18px; }
}
