/* Inside Cape May — Components v1.0.0
   Design tokens + component styles.
   Override the tokens in Elementor > Site Settings > Custom CSS. */

:root {
  /* ---- COLOR ---- */
  --icm-navy:        #1B3A4B;   /* primary — headings, nav, footer */
  --icm-teal:        #2E7D8A;   /* accent — links, tips, icons */
  --icm-sand:        #F4EFE6;   /* light background band */
  --icm-cream:       #FDFBF7;   /* page background */
  --icm-coral:       #D96C4F;   /* CTA / button */
  --icm-coral-dark:  #B85539;   /* CTA hover */
  --icm-amber:       #E0A33E;   /* warnings */
  --icm-ink:         #22262B;   /* body text */
  --icm-ink-soft:    #5A6169;   /* secondary text, captions */
  --icm-line:        #DFD8CC;   /* borders, rules */
  --icm-white:       #FFFFFF;

  /* ---- TYPE ---- */
  --icm-font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --icm-font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --icm-h1: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);   /* 36 → 60px */
  --icm-h2: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);      /* 28 → 40px */
  --icm-h3: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);   /* 22 → 28px */
  --icm-h4: 1.1875rem;                                   /* 19px */
  --icm-body: 1.0625rem;                                 /* 17px */
  --icm-small: 0.9375rem;                                /* 15px */
  --icm-lede: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); /* 18 → 21px */

  --icm-lh-tight: 1.15;
  --icm-lh-head:  1.25;
  --icm-lh-body:  1.65;

  /* ---- SPACE (8px scale) ---- */
  --icm-s1: 0.5rem;    /*  8 */
  --icm-s2: 1rem;      /* 16 */
  --icm-s3: 1.5rem;    /* 24 */
  --icm-s4: 2rem;      /* 32 */
  --icm-s5: 3rem;      /* 48 */
  --icm-s6: 4rem;      /* 64 */
  --icm-s7: 6rem;      /* 96 */

  /* ---- LAYOUT ---- */
  --icm-max:      1200px;  /* full content width */
  --icm-max-prose: 720px;  /* readable text column */
  --icm-radius:   6px;
  --icm-radius-lg: 12px;
  --icm-shadow:   0 2px 8px rgba(27,58,75,.08);
  --icm-shadow-lg: 0 8px 28px rgba(27,58,75,.12);
}

/* ============================================================
   INSIDE CAPE MAY — COMPONENT LIBRARY v1.0.1
   Paste into child theme components.css
   All components scoped under .icm-c
   ============================================================ */

.icm-c, .icm-c * { box-sizing: border-box; }
.icm-c {
  font-family: var(--icm-font-body);
  font-size: var(--icm-body);
  line-height: var(--icm-lh-body);
  color: var(--icm-ink);
}
.icm-c h1, .icm-c h2, .icm-c h3, .icm-c h4 {
  font-family: var(--icm-font-head);
  color: var(--icm-navy);
  line-height: var(--icm-lh-head);
  margin: 0 0 var(--icm-s2);
  font-weight: 700;
}
.icm-c h1 { font-size: var(--icm-h1); line-height: var(--icm-lh-tight); }
.icm-c h2 { font-size: var(--icm-h2); }
.icm-c h3 { font-size: var(--icm-h3); }
.icm-c h4 { font-size: var(--icm-h4); font-family: var(--icm-font-body); font-weight: 700; }
.icm-c p  { margin: 0 0 var(--icm-s2); }
.icm-c a  { color: var(--icm-teal); text-decoration: underline; text-underline-offset: 2px; }
.icm-c a:hover { color: var(--icm-navy); }
.icm-c a:focus-visible,
.icm-c button:focus-visible,
.icm-c summary:focus-visible {
  outline: 3px solid var(--icm-teal); outline-offset: 2px; border-radius: 2px;
}
.icm-c img { max-width: 100%; height: auto; display: block; }
.icm-wrap  { max-width: var(--icm-max); margin-inline: auto; padding-inline: var(--icm-s3); }
.icm-prose { max-width: var(--icm-max-prose); margin-inline: auto; }
.icm-sec   { padding-block: var(--icm-s6); }
.icm-sec--tight { padding-block: var(--icm-s5); }
.icm-sec--sand  { background: var(--icm-sand); }

/* ---- BUTTONS ---- */
.icm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 14px 32px;
  font-family: var(--icm-font-body); font-size: 1rem; font-weight: 600;
  letter-spacing: .02em; text-decoration: none; border-radius: var(--icm-radius);
  transition: background .18s ease, color .18s ease; border: 2px solid transparent;
}
.icm-btn--primary { background: var(--icm-coral); color: #fff; }
.icm-btn--primary:hover { background: var(--icm-coral-dark); color: #fff; }
.icm-btn--secondary { background: transparent; color: var(--icm-navy); border-color: var(--icm-navy); }
.icm-btn--secondary:hover { background: var(--icm-navy); color: #fff; }

/* ---- 1. HERO (full-bleed) ---- */
.icm-hero {
  position: relative; min-height: clamp(380px, 56vh, 620px);
  display: grid; place-items: center; text-align: center;
  padding: var(--icm-s6) var(--icm-s3); overflow: hidden;
  /* fallback so an image-less hero is still legible */
  background-image: linear-gradient(160deg, var(--icm-navy) 0%, #0F2733 100%);
}
.icm-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.icm-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,58,75,.30) 0%, rgba(27,58,75,.62) 100%);
}
.icm-hero__inner { position: relative; z-index: 2; max-width: 860px; }
.icm-hero h1 { color: #fff; margin-bottom: var(--icm-s3); text-wrap: balance; }
.icm-hero__sub {
  color: rgba(255,255,255,.94); font-size: var(--icm-lede);
  margin: 0 auto var(--icm-s4); max-width: 620px;
}

/* ---- 2. HERO SPLIT ---- */
.icm-herosplit { display: grid; gap: 0; }
.icm-herosplit__media img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.icm-herosplit__body { padding: var(--icm-s5) var(--icm-s3); align-self: center; }
@media (min-width: 900px) {
  .icm-herosplit { grid-template-columns: 1fr 1fr; }
  .icm-herosplit__body { padding: var(--icm-s6) var(--icm-s5); }
}
/* no image supplied — don't leave a blank half */
.icm-herosplit__media:empty { display: none; }
.icm-herosplit:has(.icm-herosplit__media:empty) { grid-template-columns: 1fr; }
.icm-herosplit:has(.icm-herosplit__media:empty) .icm-herosplit__body { max-width: var(--icm-max-prose); margin-inline: auto; }
/* cards without an image keep an even baseline */
.icm-card__img:not([src]), .icm-card__img[src=""] { display: none; }

/* ---- 3. INTRO BLOCK ---- */
.icm-intro { max-width: var(--icm-max-prose); margin-inline: auto; text-align: center; }
.icm-intro p { font-size: var(--icm-lede); color: var(--icm-ink-soft); }

/* ---- 4. KEY FACTS ---- */
.icm-facts {
  background: var(--icm-sand); border-radius: var(--icm-radius-lg);
  padding: var(--icm-s4); max-width: var(--icm-max-prose); margin-inline: auto;
}
.icm-facts h3 { margin-bottom: var(--icm-s3); font-size: var(--icm-h4); font-family: var(--icm-font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--icm-ink-soft); }
.icm-facts dl { margin: 0; display: grid; gap: var(--icm-s2); }
.icm-facts__row { display: grid; gap: 2px; padding-bottom: var(--icm-s2); border-bottom: 1px solid var(--icm-line); }
.icm-facts__row:last-child { border-bottom: 0; padding-bottom: 0; }
.icm-facts dt { font-weight: 700; color: var(--icm-navy); font-size: var(--icm-small); letter-spacing: .03em; text-transform: uppercase; }
.icm-facts dd { margin: 0; }
@media (min-width: 620px) {
  .icm-facts__row { grid-template-columns: 190px 1fr; gap: var(--icm-s3); align-items: baseline; }
}

/* ---- 5. CARD GRIDS ---- */
.icm-cards { display: grid; gap: var(--icm-s3); grid-template-columns: 1fr; }
@media (min-width: 620px) { .icm-cards--2, .icm-cards--3, .icm-cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .icm-cards--3 { grid-template-columns: repeat(3, 1fr); }
  .icm-cards--4 { grid-template-columns: repeat(4, 1fr); }
}
.icm-card {
  background: #fff; border: 1px solid var(--icm-line); border-radius: var(--icm-radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.icm-card:hover { transform: translateY(-3px); box-shadow: var(--icm-shadow-lg); }
.icm-card__img { aspect-ratio: 3/2; width: 100%; object-fit: cover; }
.icm-card__body { padding: var(--icm-s3); display: flex; flex-direction: column; flex: 1; }
.icm-card__body h3 { font-size: 1.25rem; margin-bottom: var(--icm-s1); }
.icm-card__body p { font-size: var(--icm-small); color: var(--icm-ink-soft); flex: 1; }
.icm-card__link { font-weight: 600; font-size: var(--icm-small); text-decoration: none; margin-top: var(--icm-s2); }
.icm-card__link::after { content: " →"; }
.icm-card__link:hover { text-decoration: underline; }

/* ---- 6. COMPARISON TABLE (stacks to cards on mobile) ---- */
.icm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.icm-table { width: 100%; border-collapse: collapse; font-size: var(--icm-small); }
.icm-table caption { caption-side: top; text-align: left; font-size: var(--icm-small); color: var(--icm-ink-soft); padding-bottom: var(--icm-s2); }
.icm-table th, .icm-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--icm-line); vertical-align: top; }
.icm-table thead th { background: var(--icm-navy); color: #fff; font-weight: 600; letter-spacing: .02em; border-bottom: 0; }
.icm-table tbody tr:nth-child(even) { background: var(--icm-cream); }
.icm-table td:first-child { font-weight: 600; color: var(--icm-navy); }
@media (max-width: 767px) {
  .icm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .icm-table tr {
    display: block; margin-bottom: var(--icm-s3); border: 1px solid var(--icm-line);
    border-radius: var(--icm-radius); overflow: hidden; background: #fff;
  }
  .icm-table tbody tr:nth-child(even) { background: #fff; }
  .icm-table td { display: grid; grid-template-columns: 42% 1fr; gap: var(--icm-s2); border-bottom: 1px solid var(--icm-line); }
  .icm-table td:last-child { border-bottom: 0; }
  .icm-table td::before { content: attr(data-label); font-weight: 700; color: var(--icm-navy); font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; }
}

/* ---- 7. NUMBERED LIST ---- */
.icm-numbered { counter-reset: icm; display: grid; gap: var(--icm-s4); max-width: 860px; margin-inline: auto; }
.icm-numbered__item { counter-increment: icm; display: grid; gap: var(--icm-s3); grid-template-columns: auto 1fr; align-items: start; }
.icm-numbered__item::before {
  content: counter(icm); font-family: var(--icm-font-head); font-size: 2.75rem;
  line-height: .9; color: var(--icm-coral); font-weight: 700; min-width: 1.6em;
}
.icm-numbered__item h3 { margin-bottom: var(--icm-s1); }
.icm-numbered__item p:last-child { margin-bottom: 0; }

/* ---- 8. CALLOUTS ---- */
.icm-callout {
  border-left: 4px solid var(--icm-teal); background: var(--icm-cream);
  padding: var(--icm-s3); border-radius: 0 var(--icm-radius) var(--icm-radius) 0;
  margin-block: var(--icm-s4); max-width: var(--icm-max-prose); margin-inline: auto;
}
.icm-callout__label {
  display: block; font-size: .8125rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--icm-teal); margin-bottom: var(--icm-s1);
}
.icm-callout p:last-child { margin-bottom: 0; }
.icm-callout--warn { border-left-color: var(--icm-amber); background: #FDF8EE; }
.icm-callout--warn .icm-callout__label { color: #96690F; }

/* ---- 9. PULL QUOTE ---- */
.icm-quote {
  max-width: 820px; margin: var(--icm-s5) auto; text-align: center;
  font-family: var(--icm-font-head); font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  line-height: 1.35; color: var(--icm-navy); border: 0; padding: 0 var(--icm-s3);
}
.icm-quote cite { display: block; margin-top: var(--icm-s2); font-family: var(--icm-font-body); font-size: var(--icm-small); font-style: normal; color: var(--icm-ink-soft); letter-spacing: .04em; text-transform: uppercase; }

/* ---- 10. TWO-COL LIST (do / don't) ---- */
.icm-twocol { display: grid; gap: var(--icm-s3); max-width: 980px; margin-inline: auto; }
@media (min-width: 760px) { .icm-twocol { grid-template-columns: 1fr 1fr; gap: var(--icm-s4); } }
.icm-twocol__col { background: #fff; border: 1px solid var(--icm-line); border-radius: var(--icm-radius-lg); padding: var(--icm-s3); }
.icm-twocol__col h3 { font-size: 1.25rem; }
.icm-twocol ul { margin: 0; padding-left: 1.15em; }
.icm-twocol li { margin-bottom: var(--icm-s1); }
.icm-twocol--yes { border-top: 4px solid var(--icm-teal); }
.icm-twocol--no  { border-top: 4px solid var(--icm-amber); }

/* ---- 11. ITINERARY TIMELINE ---- */
.icm-timeline { max-width: 780px; margin-inline: auto; position: relative; padding-left: var(--icm-s4); }
.icm-timeline::before { content:""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--icm-line); }
.icm-timeline__step { position: relative; padding-bottom: var(--icm-s4); }
.icm-timeline__step:last-child { padding-bottom: 0; }
.icm-timeline__step::before {
  content:""; position: absolute; left: calc(-1 * var(--icm-s4) + 2px); top: 7px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--icm-coral); box-shadow: 0 0 0 4px var(--icm-cream);
}
.icm-timeline__time { display: block; font-size: var(--icm-small); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--icm-teal); margin-bottom: 2px; }
.icm-timeline__step h3 { font-size: 1.25rem; margin-bottom: var(--icm-s1); }
.icm-timeline__step p:last-child { margin-bottom: 0; }

/* ---- 12. FAQ ACCORDION ---- */
.icm-faq { max-width: var(--icm-max-prose); margin-inline: auto; }
.icm-faq__item { border-bottom: 1px solid var(--icm-line); }
.icm-faq__item summary {
  cursor: pointer; list-style: none; padding: var(--icm-s3) 44px var(--icm-s3) 0;
  font-family: var(--icm-font-head); font-size: 1.1875rem; font-weight: 700;
  color: var(--icm-navy); position: relative; min-height: 44px;
}
.icm-faq__item summary::-webkit-details-marker { display: none; }
.icm-faq__item summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--icm-font-body); font-size: 1.75rem; font-weight: 400; color: var(--icm-teal); line-height: 1;
}
.icm-faq__item[open] summary::after { content: "−"; }
.icm-faq__a { padding: 0 0 var(--icm-s3); }
.icm-faq__a p:last-child { margin-bottom: 0; }

/* ---- 13. RELATED GUIDES ---- */
.icm-related { border-top: 1px solid var(--icm-line); padding-top: var(--icm-s4); }
.icm-related h2 { font-size: var(--icm-h3); margin-bottom: var(--icm-s3); }
.icm-related__grid { display: grid; gap: var(--icm-s2); grid-template-columns: 1fr; }
@media (min-width: 700px) { .icm-related__grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.icm-related__item {
  display: block; padding: var(--icm-s3); background: var(--icm-sand);
  border-radius: var(--icm-radius); text-decoration: none; color: var(--icm-navy);
  font-weight: 600; transition: background .18s ease;
}
.icm-related__item:hover { background: var(--icm-line); color: var(--icm-navy); }
.icm-related__item span { display: block; font-weight: 400; font-size: var(--icm-small); color: var(--icm-ink-soft); margin-top: 4px; }

/* ---- 14. CTA BAND ---- */
.icm-cta { background: var(--icm-navy); color: #fff; text-align: center; padding: var(--icm-s6) var(--icm-s3); }
.icm-cta h2 { color: #fff; max-width: 720px; margin-inline: auto; }
.icm-cta p { color: rgba(255,255,255,.86); max-width: 560px; margin: 0 auto var(--icm-s4); font-size: var(--icm-lede); }

/* ---- 15. PRICE TABLE ---- */
.icm-price { width: 100%; border-collapse: collapse; max-width: var(--icm-max-prose); margin-inline: auto; }
.icm-price th, .icm-price td { padding: 12px 14px; border-bottom: 1px solid var(--icm-line); }
.icm-price thead th { background: var(--icm-sand); color: var(--icm-navy); text-align: left; font-weight: 700; }
.icm-price td:last-child, .icm-price th:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--icm-navy); }

/* ---- 16. IMAGE BAND ---- */
.icm-band figure { margin: 0; }
.icm-band img { width: 100%; max-height: 560px; object-fit: cover; }
.icm-band figcaption { font-size: var(--icm-small); color: var(--icm-ink-soft); padding: var(--icm-s2) var(--icm-s3); text-align: center; }

/* ---- 17. STICKY TOC ---- */
.icm-toc { background: var(--icm-sand); border-radius: var(--icm-radius-lg); padding: var(--icm-s3); margin-bottom: var(--icm-s4); }
.icm-toc h2 { font-size: 1.0625rem; font-family: var(--icm-font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--icm-ink-soft); margin-bottom: var(--icm-s2); }
.icm-toc ol { margin: 0; padding-left: 1.25em; columns: 1; }
@media (min-width: 760px) { .icm-toc ol { columns: 2; column-gap: var(--icm-s4); } }
.icm-toc li { margin-bottom: 6px; break-inside: avoid; }
@media (min-width: 1100px) {
  .icm-toc--sticky { position: sticky; top: 100px; }
}

/* ---- 18. MAP EMBED ---- */
.icm-map { position: relative; aspect-ratio: 16/9; border-radius: var(--icm-radius-lg); overflow: hidden; border: 1px solid var(--icm-line); }
.icm-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- UTILITIES ---- */
.icm-center { text-align: center; }
.icm-verified { font-size: var(--icm-small); color: var(--icm-ink-soft); font-style: italic; }
.icm-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .icm-c *, .icm-c *::before, .icm-c *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
  }
}

/* ---- PRINT ---- */
@media print {
  .icm-hero::after, .icm-cta { background: none !important; color: #000 !important; }
  .icm-faq__item[open] .icm-faq__a, .icm-faq__a { display: block !important; }
}
