/* ============================================================
   ranking.css — Styles specific to the main ranking page
   Small Ship Antarctica Cruises
   ============================================================ */

/* --- HERO BLOCK --- */
.ranking-hero {
  color: #fff;
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  background: var(--color-navy);
}

.ranking-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-small-ship-antarctica.jpg');
  background-size: cover;
  background-position: center 40%;
  z-index: 0;
}

.ranking-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(11,31,58,.85) 0%,
    rgba(30,77,140,.70) 50%,
    rgba(11,31,58,.78) 100%);
}

.ranking-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.ranking-hero__eyebrow {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-cta);
  margin-bottom: 12px;
}

.ranking-hero h1 {
  font-family: var(--font-head);
  color: #fff;
  font-size: clamp(1.75rem, 4.5vw, 2.8rem);
  margin-bottom: 1rem;
  max-width: 820px;
  line-height: 1.15;
  letter-spacing: .02em;
}

.ranking-hero__subtitle {
  font-size: clamp(.95rem, 2.2vw, 1.1rem);
  color: rgba(255,255,255,.82);
  max-width: 640px;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.ranking-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 1.75rem;
}

.meta-chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.9);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* --- STATS BAR (below hero) --- */
.hero-stats {
  background: var(--color-mid-blue);
  padding: 0;
}

.hero-stats__list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-stats__item {
  flex: 1;
  min-width: 120px;
  padding: 18px 24px;
  border-right: 1px solid rgba(255,255,255,.15);
  text-align: center;
}

.hero-stats__item:last-child { border-right: none; }

.hero-stats__value {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hero-stats__label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-top: 5px;
}

/* --- METHODOLOGY BANNER --- */
.methodology-banner {
  background: var(--color-ice-bg);
  border-left: 4px solid var(--color-mid-blue);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 0 0 28px;
}

.methodology-banner p {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: .4rem;
}

.methodology-banner p:last-child { margin-bottom: 0; }

.methodology-banner a {
  color: var(--color-mid-blue);
  font-weight: 600;
}

/* Criteria list inside methodology */
.criteria-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.criteria-list li {
  font-size: .9rem;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
}

/* --- COMPARISON TABLE --- */
.table-section {
  margin: 0 0 48px;
}

.table-section h2 { margin-bottom: 1rem; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
  font-size: .875rem;
}

.comparison-table thead {
  background: var(--color-navy);
  color: #fff;
}

.comparison-table thead th {
  padding: 13px 14px;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.comparison-table thead th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
  width: 36px;
  min-width: 36px;
}

.comparison-table thead th:nth-child(2) { min-width: 160px; }
.comparison-table thead th:nth-child(3) { min-width: 130px; }
.comparison-table thead th:last-child { border-radius: 0 var(--radius-lg) 0 0; }

.comparison-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background .12s;
}

.comparison-table tbody tr:last-child { border-bottom: none; }
.comparison-table tbody tr:hover { background: var(--color-ice-bg); }

.comparison-table tbody tr.row-featured { background: #EAF2FB; }
.comparison-table tbody tr.row-featured:hover { background: #DCE9F7; }

.comparison-table td {
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.45;
}

.table-rank {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--color-mid-blue);
  font-size: 1rem;
  white-space: nowrap;
}

.table-operator { font-weight: 600; color: var(--color-text); }
.table-ships { color: var(--color-text-muted); font-size: .82rem; }

.tier-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tier-entry    { background: #E8F4FD; color: #1A6FA8; }
.tier-mid      { background: #EBF5EB; color: #2E7D32; }
.tier-mid-prem { background: #EEF3FA; color: var(--color-mid-blue); }
.tier-premium  { background: #F3EEF9; color: #6B3BAA; }
.tier-ultra    { background: #FFF3E0; color: #BF6E00; }

/* --- LAYOUT WRAPPER --- */
.ranking-layout-wrap {
  padding-top: 44px;
  padding-bottom: 60px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 36px;
  align-items: start;
}

.ranking-main { min-width: 0; }

/* Sidebar */
.ranking-sidebar {
  position: sticky;
  top: 84px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-title {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: .83rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color .12s;
}

.sidebar-list a:hover {
  color: var(--color-cta);
  text-decoration: none;
}

.sidebar-rank {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-mid-blue);
  min-width: 20px;
}

/* --- OPERATOR CARD IMAGE PLACEHOLDERS --- */
.operator-card__image {
  margin: -28px -28px 22px -28px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 820 / 300;
  position: relative;
}

.operator-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.operator-card:hover .operator-card__image img { transform: scale(1.03); }

/* CSS gradient placeholder — used when no real photo */
.operator-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.operator-card__image--placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 30'%3E%3Cpath d='M15 18 L18 10 L62 10 L65 18 Z' fill='white' opacity='0.08'/%3E%3Cpath d='M13 18 L67 18 L64 22 L16 22 Z' fill='white' opacity='0.08'/%3E%3Crect x='28' y='5' width='24' height='5' rx='1' fill='white' opacity='0.06'/%3E%3Crect x='37' y='1' width='6' height='7' rx='0.5' fill='white' opacity='0.12'/%3E%3C/svg%3E") center/60% no-repeat;
}

/* --- OPERATOR CARDS --- */
.operator-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  scroll-margin-top: 84px;
}

.operator-card--featured {
  border-color: var(--color-cta);
  border-width: 2px;
  box-shadow: 0 4px 24px rgba(232,80,10,.1);
}

.operator-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.operator-card__rank-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
}

.operator-rank-num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-mid-blue);
  line-height: 1;
  min-width: 48px;
  opacity: .8;
}

.operator-card--featured .operator-rank-num {
  opacity: 1;
  color: var(--color-cta);
}

.operator-card__title-block h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-bottom: .3rem;
  line-height: 1.25;
}

.best-for-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-ice-bg);
  color: var(--color-mid-blue);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-body);
}

.best-for-badge::before { content: '✓ '; }

.operator-card__price-badge {
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Specs grid */
.operator-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 16px;
  background: var(--color-ice-bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-light);
}

.spec-value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Body text */
.operator-card__body p {
  font-size: .9375rem;
  color: #2A3A4E;
  line-height: 1.72;
  margin-bottom: .9rem;
}

.operator-card__body p:last-child { margin-bottom: 0; }

.operator-card__verdict {
  background: var(--color-ice-bg);
  border-left: 3px solid var(--color-mid-blue);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem !important;
  margin-top: 16px !important;
}

.operator-card--featured .operator-card__verdict {
  border-left-color: var(--color-cta);
}

/* Awards strip */
.operator-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-gold-bg);
  border: 1px solid #E8D4A0;
  color: #8A6A14;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Footer row */
.operator-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  gap: 12px;
  flex-wrap: wrap;
}

/* --- VOYAGE TYPES GRID --- */
.voyage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.voyage-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}

.voyage-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.voyage-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.voyage-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-navy);
}

.voyage-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.voyage-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  background: var(--color-ice-bg);
  color: var(--color-mid-blue);
  font-family: var(--font-head);
  letter-spacing: .04em;
}

.voyage-badge--price {
  background: #FFF3ED;
  color: #BF4A08;
}

.voyage-card p {
  font-size: .875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- SEASON GUIDE --- */
.season-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin: 24px 0;
}

.season-cell {
  padding: 20px 14px;
  text-align: center;
  border-right: 1px solid var(--color-border);
}

.season-cell:last-child { border-right: none; }

.season-cell--shoulder { background: var(--color-ice-bg); }

.season-cell--peak {
  background: var(--color-mid-blue);
  color: #fff;
}

.season-cell--peak .season-month { color: #fff; }
.season-cell--peak .season-label { color: rgba(255,255,255,.8); }
.season-cell--peak .season-icon { opacity: 1; }
.season-cell--peak .season-desc { color: rgba(255,255,255,.75); }

.season-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  line-height: 1;
  opacity: .8;
}

.season-month {
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 4px;
}

.season-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.season-desc {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* --- WILDLIFE GRID --- */
.wildlife-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.wildlife-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.wildlife-card__icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
}

.wildlife-card__body h4 {
  font-size: .9rem;
  margin-bottom: 4px;
  color: var(--color-navy);
}

.wildlife-card__body p {
  font-size: .82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* --- FAQ --- */
.faq-section { margin-bottom: 28px; }
.faq-section h2 { margin-bottom: 1.25rem; }

details.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}

details.faq-item[open] {
  border-color: var(--color-mid-blue);
  box-shadow: 0 2px 8px rgba(30,77,140,.08);
}

details.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .01em;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  user-select: none;
  transition: background .12s;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--color-cta);
  line-height: 1;
  flex-shrink: 0;
  font-family: var(--font-body);
}

details.faq-item[open] summary::after { content: '−'; }
details.faq-item summary:hover { background: var(--color-ice-bg); }

.faq-body {
  padding: 0 20px 20px;
  font-size: .9rem;
  color: #2A3A4E;
  line-height: 1.72;
}

.faq-body p { margin-bottom: .75rem; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ul { margin-bottom: .75rem; }

/* --- CTA BANNER --- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-mid-blue) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}

.cta-banner h2 {
  font-family: var(--font-head);
  color: #fff;
  margin-bottom: .5rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: .03em;
}

.cta-banner p {
  color: rgba(255,255,255,.78);
  font-size: .95rem;
  margin-bottom: 1.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn { font-size: .95rem; padding: 13px 30px; }

/* --- RESPONSIVE OVERRIDES --- */
@media (max-width: 900px) {
  .voyage-grid { grid-template-columns: 1fr; }
  .season-grid { grid-template-columns: repeat(3, 1fr); }
  .wildlife-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ranking-layout { grid-template-columns: 1fr; }
  .ranking-sidebar { display: none; }

  .operator-card { padding: 20px 16px; }
  .operator-card__image { margin: -20px -16px 16px -16px; }
  .operator-card__header { flex-direction: column; gap: 10px; }
  .operator-specs { grid-template-columns: 1fr 1fr; }

  .hero-stats__list { flex-direction: row; flex-wrap: wrap; }
  .hero-stats__item { min-width: 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); }
  .hero-stats__item:last-child { border-bottom: none; }

  .season-grid { grid-template-columns: 1fr; }
  .season-cell { border-right: none; border-bottom: 1px solid var(--color-border); }
  .season-cell:last-child { border-bottom: none; }

  .wildlife-grid { grid-template-columns: 1fr; }
  .voyage-grid { grid-template-columns: 1fr; }

  .cta-banner { padding: 32px 22px; }
  .ranking-hero { padding: 48px 0 40px; min-height: auto; }
  .ranking-hero h1 { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .ranking-hero { padding: 32px 0 28px; }
  .ranking-hero h1 { font-size: 1.45rem; }
  .ranking-hero__subtitle { font-size: .9rem; }
  .meta-chip { font-size: .72rem; padding: 4px 9px; }

  .operator-card { padding: 16px 14px; margin-bottom: 20px; }
  .operator-card__image { margin: -16px -14px 14px -14px; }
  .operator-rank-num { font-size: 1.9rem; min-width: 38px; }
  .operator-card__rank-wrap { gap: 10px; }
  .operator-card__title-block h2 { font-size: 1rem; }
  .operator-specs { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }

  .cta-banner { padding: 24px 16px; }
  .ranking-layout-wrap { padding-top: 28px; padding-bottom: 44px; }
  .table-section h2 { font-size: 1.1rem; }
}
