/* Event Country global optimization and header cleanup
   Add after style.css and ecx-social-header.css on every page. */
:root {
  --ecx-orange: #ff6f00;
  --ecx-orange-dark: #e85f00;
  --ecx-ink: #111827;
  --ecx-muted: #64748b;
  --ecx-line: rgba(15, 23, 42, 0.10);
  --ecx-soft: #f8fafc;
  --ecx-card: #ffffff;
  --ecx-radius: 6px;
  --ecx-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
a { text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }

.ecx-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--ecx-line);
  backdrop-filter: blur(16px);
}

.ecx-header-inner,
.ecx-header-shell {
  width: min(1280px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ecx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ecx-ink);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.ecx-brand img {
  width: 42px;
  height: 42px;
  border-radius: var(--ecx-radius);
  object-fit: contain;
}

.ecx-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.ecx-nav a {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: var(--ecx-radius);
  white-space: nowrap;
}

.ecx-nav a:hover,
.ecx-nav a.is-active,
.ecx-nav a.active,
.ecx-nav a[aria-current="page"] {
  color: var(--ecx-orange-dark);
  background: rgba(255, 111, 0, 0.09);
}

.ecx-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
}

/* Hide old text-only social blocks when both old and new social components exist. */
.ecx-header-actions > .ecx-header-social,
.ecx-mobile-menu > .ecx-mobile-social {
  display: none !important;
}

.ecx-social-header {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
}

.ecx-social-header a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ecx-line);
  border-radius: var(--ecx-radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  text-decoration: none;
}

.ecx-social-header a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 111, 0, 0.35);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.11);
}

.ecx-social-header img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.ecx-header-icon,
.ecx-search-icon,
.ecx-menu-btn {
  flex: 0 0 auto;
}

.ecx-header-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ecx-radius);
  border: 1px solid var(--ecx-line);
  background: #fff;
  color: var(--ecx-ink);
  text-decoration: none;
}

.ecx-download-logo,
.ecx-store-badge {
  height: 38px !important;
  width: 122px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 122px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  overflow: hidden;
  text-decoration: none;
}

.ecx-download-logo img,
.ecx-store-badge img {
  width: 122px !important;
  height: 38px !important;
  object-fit: contain !important;
  display: block;
}

.ecx-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--ecx-radius);
  border: 1px solid var(--ecx-line);
  background: #fff;
  color: var(--ecx-ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ecx-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background: currentColor;
  border-radius: 99px;
}

.ecx-mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--ecx-line);
  border-radius: var(--ecx-radius);
  background: #fff;
  box-shadow: var(--ecx-shadow);
}

.ecx-mobile-menu.active,
.ecx-mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.ecx-mobile-menu a {
  color: var(--ecx-ink);
  text-decoration: none;
  font-weight: 800;
  padding: 11px 12px;
  border-radius: var(--ecx-radius);
}

.ecx-mobile-menu a:hover { background: rgba(255, 111, 0, 0.08); color: var(--ecx-orange-dark); }
.ecx-social-header-mobile { justify-content: flex-start; padding: 8px 10px; }

/* Event/media card improvements */
.ecx-event-grid,
.ecx-trip-grid,
.ecx-results-grid {
  gap: 22px;
}

.ecx-trip-card,
.ecx-event-card,
.ecx-destination-card,
.ecx-category-card,
.ecx-policy-card {
  border-radius: var(--ecx-radius) !important;
}

.ecx-trip-image-wrap,
.ecx-event-media,
.ecx-card-media {
  border-radius: var(--ecx-radius) var(--ecx-radius) 0 0 !important;
  overflow: hidden;
  background: #e8edf3;
}

.ecx-trip-img,
.ecx-trip-video {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

.ecx-card-arrow {
  border-radius: var(--ecx-radius) !important;
}

/* Footer consistency */
.ecx-footer {
  border-top: 1px solid var(--ecx-line);
}
.ecx-footer a { color: inherit; text-decoration: none; }
.ecx-footer a:hover { color: var(--ecx-orange-dark); text-decoration: underline; }

/* Accessibility and performance */
:focus-visible {
  outline: 3px solid rgba(255, 111, 0, 0.42);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .ecx-nav { display: none; }
  .ecx-menu-btn { display: inline-flex; }
  .ecx-header-inner,
  .ecx-header-shell { min-height: 68px; }
}

@media (max-width: 760px) {
  .ecx-header-inner,
  .ecx-header-shell {
    width: min(100% - 20px, 1280px);
    gap: 10px;
  }
  .ecx-brand span { display: none; }
  .ecx-brand img { width: 38px; height: 38px; }
  .ecx-social-header { gap: 5px; }
  .ecx-social-header a { width: 31px; height: 31px; }
  .ecx-social-header img { width: 18px; height: 18px; }
  .ecx-header-icon { display: none; }
  .ecx-download-logo,
  .ecx-store-badge { display: none !important; }
  .ecx-mobile-menu { width: min(100% - 20px, 1280px); }
}
