/* =============================================
   FreeClinicalTrials.com — Global Stylesheet
   Palette mirrors PlanetCure for brand family:
     Primary:    #1a5c6b (deep teal)
     Background: #fafaf8 (warm white)
     Text:       #1a1a1a
     Accent/CTA: #e8a020 (amber)
     Light teal: #e8f4f6
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: #fafaf8;
  color: #1a1a1a;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #1a5c6b; text-decoration: underline; transition: color .2s; }
a:hover { color: #e8a020; }

h1,h2,h3,h4,h5 { font-family: 'Playfair Display', serif; line-height: 1.25; color: #1a1a1a; }
h1 { font-size: clamp(2rem,5vw,3.2rem); margin-bottom: .6em; }
h2 { font-size: clamp(1.5rem,3.5vw,2.2rem); margin-bottom: .5em; }
h3 { font-size: clamp(1.15rem,2.5vw,1.5rem); margin-bottom: .4em; }
h4 { font-size: 1.1rem; margin-bottom: .35em; font-family: 'Inter', sans-serif; font-weight: 700; }
p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }
ul,ol { padding-left: 1.5em; margin-bottom: 1.1em; }
li { margin-bottom: .35em; }

/* ---- Layout ---- */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }
.container--wide { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ---- Navigation ---- */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #e0e8ea;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(26,92,107,.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a5c6b;
  text-decoration: none;
  letter-spacing: -.5px;
}
.nav-logo span { color: #e8a020; }
.nav-logo:hover { color: #1a5c6b; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0; margin: 0;
}
.nav-links a { text-decoration: none; font-size: .95rem; font-weight: 500; color: #1a1a1a; }
.nav-links a:hover { color: #1a5c6b; }
.nav-cta {
  background: #e8a020;
  color: #fff !important;
  padding: .45rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none !important;
  transition: background .2s;
}
.nav-cta:hover { background: #d4911a !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: #1a1a1a; transition: all .3s; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}
.btn-primary { background: #e8a020; color: #fff; }
.btn-primary:hover { background: #d4911a; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,160,32,.35); }
.btn-teal { background: #1a5c6b; color: #fff; }
.btn-teal:hover { background: #164f5c; color: #fff; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #1a5c6b; border: 2px solid #1a5c6b; }
.btn-secondary:hover { background: #1a5c6b; color: #fff; }
.btn-sm { padding: .5rem 1.1rem; font-size: .9rem; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #1a5c6b 0%, #0f3840 100%);
  color: #fff;
  padding: 5rem 1.25rem 4.5rem;
  text-align: center;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem,5.5vw,3.6rem); max-width: 780px; margin: 0 auto .6em; }
.hero .hero-sub {
  font-size: clamp(1.05rem,2.5vw,1.25rem);
  max-width: 620px;
  margin: 0 auto 2rem;
  opacity: .9;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}
.hero-badge {
  display: inline-block;
  background: rgba(232,160,32,.2);
  color: #f5c25e;
  border: 1px solid rgba(232,160,32,.4);
  padding: .3rem .8rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }

/* ---- Search bar ---- */
.search-wrap {
  max-width: 680px;
  margin: 0 auto 1.5rem;
}
.search-form {
  display: flex;
  gap: .5rem;
  background: #fff;
  border-radius: 12px;
  padding: .5rem .5rem .5rem .75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  flex-wrap: wrap;
}
.search-form input[type="text"] {
  flex: 1;
  min-width: 160px;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  background: transparent;
  padding: .4rem 0;
}
.search-form input[type="text"]::placeholder { color: #888; }
.search-form .search-divider {
  width: 1px;
  background: #e0e8ea;
  align-self: stretch;
  margin: .2rem 0;
}
.search-form input[type="text"].zip-input { min-width: 100px; max-width: 130px; }
.search-form button { white-space: nowrap; }

/* ---- Stats bar ---- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
}
.stat-item { text-align: center; color: rgba(255,255,255,.9); }
.stat-num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: #f5c25e; display: block; line-height: 1.1; }
.stat-label { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .5px; }

/* ---- Section spacing ---- */
section { padding: 4rem 0; }
.section-label { font-size: .8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #1a5c6b; margin-bottom: .6rem; }
.section-heading { font-size: clamp(1.6rem,3.5vw,2.3rem); margin-bottom: .5em; }
.section-sub { font-size: 1.1rem; color: #4a5568; max-width: 600px; margin-bottom: 2.5rem; }

/* ---- Conditions grid ---- */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.condition-pill {
  background: #fff;
  border: 2px solid #e0e8ea;
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.condition-pill:hover {
  border-color: #1a5c6b;
  box-shadow: 0 4px 16px rgba(26,92,107,.1);
  transform: translateY(-1px);
  color: inherit;
}
.condition-pill .pill-icon { font-size: 1.5rem; flex-shrink: 0; }
.condition-pill h3 { font-family: 'Inter', sans-serif; font-size: .95rem; font-weight: 700; margin: 0 0 .15rem; color: #1a1a1a; }
.condition-pill p { font-size: .8rem; color: #888; margin: 0; }

/* ---- How it works ---- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}
.how-step {
  text-align: center;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #1a5c6b;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.how-step h3 { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.how-step p { font-size: .9rem; color: #4a5568; }

/* ---- Why it's free callout ---- */
.why-callout {
  background: #1a5c6b;
  color: #fff;
  border-radius: 16px;
  padding: 3rem 2.5rem;
}
.why-callout h2 { color: #fff; margin-bottom: .75rem; }
.why-callout p { color: rgba(255,255,255,.88); font-size: 1.05rem; margin-bottom: 1rem; }
.why-callout p:last-child { margin-bottom: 0; }
.why-callout .amber { color: #f5c25e; font-weight: 700; }

/* ---- Trial cards (search results) ---- */
.trial-card {
  background: #fff;
  border: 1px solid #e0e8ea;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid #1a5c6b;
  transition: box-shadow .2s;
}
.trial-card:hover { box-shadow: 0 4px 18px rgba(26,92,107,.1); }
.trial-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.trial-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1rem; color: #1a1a1a; flex: 1; }
.trial-phase {
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .65rem;
  border-radius: 12px;
  background: #e8f4f6;
  color: #1a5c6b;
  white-space: nowrap;
}
.trial-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .85rem; color: #666; margin-bottom: .75rem; }
.trial-meta span { display: flex; align-items: center; gap: .3rem; }
.trial-summary { font-size: .9rem; color: #444; margin-bottom: 1rem; line-height: 1.6; }
.trial-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.trial-id { font-size: .78rem; color: #aaa; font-family: monospace; }

/* Loading / empty states */
.loading-state, .empty-state {
  text-align: center;
  padding: 3rem;
  color: #888;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid #e0e8ea;
  border-top-color: #1a5c6b;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Email capture ---- */
.email-section {
  background: #f0f7f9;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
}
.email-section h2 { margin-bottom: .5rem; }
.email-section p { color: #4a5568; margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.email-form { display: flex; gap: .75rem; max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.email-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: .75rem 1rem;
  border: 2px solid #c2dfe4;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  transition: border-color .2s;
  color: #1a1a1a;
}
.email-form input[type="email"]:focus { outline: none; border-color: #1a5c6b; }
.email-fine { font-size: .8rem; color: #888; margin-top: .75rem; }

/* ---- Callout ---- */
.callout {
  background: #e8f4f6;
  border-left: 4px solid #1a5c6b;
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout p { font-size: .95rem; margin-bottom: .6em; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: #1a5c6b; }

/* ---- PlanetCure crosslink banner ---- */
.crosslink-banner {
  background: linear-gradient(135deg, #0f3840 0%, #1a5c6b 100%);
  color: #fff;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}
.crosslink-banner p { color: rgba(255,255,255,.9); margin: 0; font-size: .95rem; }
.crosslink-banner strong { color: #f5c25e; }

/* ---- Footer ---- */
.site-footer { background: #1a1a1a; color: rgba(255,255,255,.7); padding: 3rem 1.25rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .nav-logo { font-size: 1.3rem; color: #fff; display: block; margin-bottom: .5rem; }
.footer-brand p { font-size: .9rem; max-width: 280px; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: .75rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .9rem; }
.footer-col a:hover { color: #e8a020; }
.footer-disclaimer { font-size: .8rem; color: rgba(255,255,255,.45); line-height: 1.7; margin-bottom: 1.5rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom a:hover { color: #e8a020; }

/* Utility */
.text-teal { color: #1a5c6b; }
.text-amber { color: #e8a020; }
.text-muted { color: #888; font-size: .9rem; }
.text-center { text-align: center; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }
.hr-light { border: none; border-top: 1px solid #e0e8ea; margin: 2rem 0; }
[id] { scroll-margin-top: 80px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 1rem 1.25rem; gap: .75rem; border-bottom: 1px solid #e0e8ea; box-shadow: 0 4px 12px rgba(0,0,0,.1); align-items: flex-start; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .site-nav { position: relative; }
  .footer-top { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  section { padding: 2.75rem 0; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .crosslink-banner { flex-direction: column; }
  .stats-bar { gap: 1.5rem; }
}
@media (max-width: 480px) {
  .search-form { flex-direction: column; padding: .75rem; }
  .search-form .search-divider { display: none; }
  .search-form input[type="text"].zip-input { max-width: 100%; }
  .email-form { flex-direction: column; }
  .email-form input, .email-form button { width: 100%; }
}
