/* Country Cards — progressive-disclosure destination grid
   Scope: .cf-cc-* only. No global selectors. Safe to load anywhere.
   Brand orange #E8622A, neutral border #e3e8ef, radius 14px.
   Animation: relies on .cf-rev / .cf-rev-in pattern in cosmos-interactivity.js
*/

.cf-cc-section {
  background: #ffffff;
  padding: 72px 0 80px;
  position: relative;
}

.cf-cc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.cf-cc-head {
  text-align: center;
  margin: 0 0 44px;
}

.cf-cc-h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  line-height: 1.15;
  color: #0a2540;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cf-cc-sub {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #4a5a6e;
  max-width: 720px;
  margin: 0 auto;
}

.cf-cc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.cf-cc-card {
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04), 0 2px 8px rgba(10, 37, 64, 0.03);
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 280ms cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 220ms ease;
  will-change: transform;
}

.cf-cc-card:hover,
.cf-cc-card:focus-within {
  transform: translateY(-3px);
  border-color: #E8622A;
  box-shadow: 0 6px 14px rgba(10, 37, 64, 0.08), 0 12px 28px rgba(232, 98, 42, 0.10);
}

.cf-cc-map-link {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  outline-offset: 4px;
  margin: 0 0 16px;
}

.cf-cc-map-link:focus-visible {
  outline: 2px solid #E8622A;
}

.cf-cc-map {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 300ms ease;
  filter: saturate(0.95);
}

.cf-cc-card:hover .cf-cc-map,
.cf-cc-card:focus-within .cf-cc-map {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.cf-cc-name {
  font-size: 1.25rem;
  line-height: 1.2;
  color: #0a2540;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.cf-cc-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #E8622A;
  text-decoration: none;
  margin: 0 0 14px;
  transition: gap 200ms ease, color 200ms ease;
}

.cf-cc-primary:hover,
.cf-cc-primary:focus-visible {
  gap: 10px;
  color: #c84e1c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cf-cc-primary span {
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cf-cc-primary:hover span,
.cf-cc-primary:focus-visible span {
  transform: translateX(3px);
}

.cf-cc-links {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid #eef1f6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cf-cc-links li {
  margin: 0;
  padding: 0;
}

.cf-cc-links a {
  display: block;
  font-size: 0.9125rem;
  line-height: 1.4;
  color: #4a5a6e;
  text-decoration: none;
  padding: 4px 0 4px 12px;
  position: relative;
  transition: color 180ms ease, padding-left 220ms ease;
}

.cf-cc-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9d1dc;
  transition: background 200ms ease, transform 220ms ease;
}

.cf-cc-links a:hover,
.cf-cc-links a:focus-visible {
  color: #E8622A;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-left: 14px;
}

.cf-cc-card:hover .cf-cc-links a {
  color: #2c3e54;
}

.cf-cc-card:hover .cf-cc-links a:hover,
.cf-cc-card:hover .cf-cc-links a:focus-visible {
  color: #E8622A;
}

.cf-cc-links a:hover::before,
.cf-cc-links a:focus-visible::before {
  background: #E8622A;
  transform: translateY(-50%) scale(1.4);
}

/* Scroll-reveal — entrance state set by .cf-rev (assigned via the section wrapper).
   cosmos-interactivity.js IntersectionObserver adds .cf-rev-in when in view.
   Cards stagger via nth-child delay. Reduced-motion respected. */
.cf-cc-section.cf-rev .cf-cc-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 540ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 540ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cf-cc-section.cf-rev-in .cf-cc-card {
  opacity: 1;
  transform: translateY(0);
}

.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(1) { transition-delay: 0ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(2) { transition-delay: 70ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(3) { transition-delay: 140ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(4) { transition-delay: 210ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(5) { transition-delay: 280ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(6) { transition-delay: 350ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(7) { transition-delay: 420ms; }
.cf-cc-section.cf-rev-in .cf-cc-card:nth-child(8) { transition-delay: 490ms; }

@media (prefers-reduced-motion: reduce) {
  .cf-cc-section.cf-rev .cf-cc-card,
  .cf-cc-section.cf-rev-in .cf-cc-card,
  .cf-cc-card,
  .cf-cc-map,
  .cf-cc-primary,
  .cf-cc-primary span,
  .cf-cc-links a {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Tablet — 2 columns */
@media (max-width: 1024px) {
  .cf-cc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .cf-cc-section {
    padding: 60px 0 64px;
  }
}

/* Mobile — single column */
@media (max-width: 600px) {
  .cf-cc-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cf-cc-section {
    padding: 48px 0 52px;
  }
  .cf-cc-container {
    padding: 0 16px;
  }
  .cf-cc-card {
    padding: 18px 18px 20px;
  }
  .cf-cc-map {
    height: 110px;
  }
  .cf-cc-h2 {
    font-size: 1.625rem;
  }
  .cf-cc-sub {
    font-size: 1rem;
  }
  .cf-cc-head {
    margin: 0 0 28px;
  }
}
