/* ===========================
   Every Mile Story — Styles
   =========================== */

/* --- Global resets --- */
.site-header, .ct-header, .ct-header-sticky, .ct-header-main,
.post-type-archive-trip .site-header, .post-type-archive-trip .ct-header,
.post-type-archive-trip .ct-header-sticky, .post-type-archive-trip .ct-header-main {
  display: none !important;
}

.site-content,
.post-type-archive-trip .site-content,
.page-id-13 .site-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

footer.site-footer,
.ct-footer,
.blocksy-footer {
  display: none !important;
}

.text-muted {
  color: #6b7280;
}

/* --- Map / main page --- */
.page .entry-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 5px;
}
.page .entry-content h1 {
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.1;
  margin: .2em 0;
  text-align: center;
}
.page .entry-content p:first-of-type {
  color: #6b7280;
  text-align: center;
  margin: 0 0 20px;
}
.leaflet-container {
  border-radius: 12px;
}

/* --- Modula hover --- */
.modula-item-content img {
  transition: transform .35s ease;
}
.modula-item-content:hover img {
  transform: scale(1.1);
}

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  align-items: stretch;
}

.trip-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  height: 100%;
}

.trip-thumb {
  display: block;
}

.trip-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 18px;
}

.trip-body-inner {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.trip-excerpt {
  flex-grow: 1; /* делает отступ динамичным */
  margin-bottom: 0;
}

.trip-footer {
  margin-top: auto;
  padding-top: 16px;
}

.trip-btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 24px;
  text-decoration: none;
  transition: 0.2s ease;
}

.trip-btn:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}


/* --- Single Trip --- */
.back-to-map {
  text-decoration: none;
  display: inline-block;
  margin: 0 0 8px;
  color: #111;
  background: #f3f4f6;
  padding: .4em .8em;
  border-radius: 8px;
}
.back-to-map:hover {
  background: #e5e7eb;
}

.single-trip .trip-cover img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

.single-trip .entry-meta,
.single-trip .ct-post-meta {
  display: none !important;
}

/* --- Hide “Map” page title --- */
.page-id-13 .entry-header,
.page-id-13 .page-title,
.page-id-13 .ct-page-title,
.page-id-13 .hero-section {
  display: none !important;
}

/* --- Footer --- */
.ems-footer {
  text-align: center;
  color: #777;
  font-size: 14px;
  padding: 24px 20px 40px;
  border-top: 1px solid #eee;
  margin-top: 24px;
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: 0.3px;
}
.ems-footer p {
  margin: 0;
}
.ems-footer-logo {
  height: 90px;
  width: auto;
  margin-bottom: 6px;
  opacity: 0.95;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.06));
}

/* ==============================
   EMS — Unified Button Styling
   ============================== */

/* Base */
a.button,
button.button,
.trip-btn,
.wp-block-button__link,
a.wp-block-button__link {
  display: inline-block !important;
  background: #fff !important;
  color: #111 !important;
  border: 1px solid #ccc !important;
  border-radius: 999px !important;
  padding: 0.75em 1.6em !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
  text-decoration: none !important;
  text-transform: none !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Hover */
a.button:hover,
button.button:hover,
.trip-btn:hover,
.wp-block-button__link:hover {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px) !important;
}

/* Fade-in lift */
a.button,
.trip-btn,
.wp-block-button__link {
  opacity: 0;
  transform: translateY(12px);
  animation: ems-fade-lift 0.8s ease-out forwards;
}

@keyframes ems-fade-lift {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Fade-in for trip cards --- */
@keyframes ems-card-fade {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============================
   /Trips/ Page Redesign
   ============================== */

.trips-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 600;
  margin-bottom: 40px;
  color: #111;
  letter-spacing: -0.3px;
  font-family: "Inter", system-ui, sans-serif;
}

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
  padding: 0 20px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Card --- */
.trip-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInCard 0.8s ease-out forwards;
}

@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.trip-thumb img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.trip-thumb:hover img {
  transform: scale(1.05);
}

.trip-body {
  padding: 20px 22px 28px;
}

.trip-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #111;
  font-family: "Inter", system-ui, sans-serif;
}

.trip-meta {
  color: #6b7280;
  font-size: 13px;
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

.trip-excerpt {
  margin: 0 0 16px;
  color: #444;
  font-size: 15px;
  line-height: 1.5;
}

/* --- Button inside cards --- */
.trip-btn {
  display: inline-block;
  background: #fff !important;
  color: #111 !important;
  border: 1px solid #ccc !important;
  border-radius: 999px !important;
  padding: 0.6em 1.4em !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.trip-btn:hover {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1) !important;
}

/* --- Responsive tweaks --- */
@media (max-width: 980px) {
  .trip-thumb img { height: 220px; }
}
@media (max-width: 620px) {
  .trips-grid { gap: 24px; }
  .trip-body { padding: 18px 20px 24px; }
}


/* ==============================
   Single Trip Page
   ============================== */

.single-trip {
  width: 100%;
  font-family: "Inter", system-ui, sans-serif;
}

.single-trip .back-to-map,
.trips-archive .back-to-map,
.backbtn .back-to-map {
  display: inline-block;
  margin-bottom: 20px;
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.4em 0.8em;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
}
.single-trip .back-to-map:hover,
.trips-archive .back-to-map:hover,
.backbtn .back-to-map:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.trip-main-title {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.4em;
  color: #111;
  text-align: left;
}

.trip-meta {
  color: #6b7280;
  margin: 0 0 1.5rem;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.trip-cover img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.single-trip .entry-content {
  font-size: 16.5px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 40px;
}

.single-trip .entry-content p {
  margin-bottom: 1.2em;
}

.single-trip .entry-content,
.single-trip .trip-main-title,
.single-trip .trip-meta {
  max-width: 900px;
  margin: 0 auto;
}

/* Галерея (Modula) */
.single-trip .modula-gallery {
  margin-top: 40px;
}
.single-trip .modula-item img {
  border-radius: 10px;
  transition: transform 0.35s ease;
}
.single-trip .modula-item:hover img {
  transform: scale(1.05);
}

.trip-card.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===== Temporary basic header styles ===== */
.ems-header-basic {
  width: 100%;
  padding: 20px;
  background: #ffffff;
  border-bottom: 1px solid #eee;
}

/* --- EMS Logo with map pin icon --- */
.ems-logo-text {
  position: relative;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: #111;
  text-decoration: none;
  padding-left: 26px; /* место для пина */
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.ems-logo-text:hover {
  opacity: 0.75;
  color: #555;
}

/* Пин слева */
.ems-logo-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-55%);
  width: 11px;
  height: 11px;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 1 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

/* Menu basic list */
.ems-menu-basic {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.ems-menu-basic li a {
  text-decoration: none;
  color: #111;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: 0.3s;
}

.ems-menu-basic li a:hover {
  background: #f3f3f3;
}

/* ===== Final EMS Header Styling ===== */
.ems-header-basic {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  z-index: 9999;
  padding: 16px 0;
}

.ems-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo – elegant serif like main site title */
.ems-logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: #111;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ems-logo-text:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}


/* Menu (desktop) */
.ems-menu-basic {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.ems-menu-basic li a {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: #111;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.ems-menu-basic li a:hover,
.ems-menu-basic li.current-menu-item > a {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Make sure content isn't hidden under sticky header */
body {
  scroll-padding-top: 80px;
}

/* Inline auto gallery (fallback if no [gallery]) */
.trip-inline-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.trip-inline-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  display: block;
}
@media (max-width: 640px) {
  .trip-inline-photo img { height: 180px; }
}

/* Все картинки внутри trip — красиво и одинаково */
.single-trip .entry-content img {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: transform .2s ease, box-shadow .2s ease;
  margin: 8px;
  max-width: 100%;
  height: auto;
}

.single-trip .entry-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Не заставляем <p> быть flex (это ломало Венецию!) */
.single-trip .entry-content p {
  display: block;
}

.trip-image img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform .2s;
    margin: 8px;
}

.trip-image img:hover {
    transform: scale(1.03);
}

/* Featured Image стили */

/* Контейнер для Featured Image */

.trip-featured-image {
    max-width: 1200px;  /* совпадает с шириной текста и основного контента */
    margin: 0 auto 30px; /* центр + отступ снизу */
}

.trip-featured-image img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    transition: transform .2s ease;
}
.trip-featured-image img:hover {
    transform: scale(1.03);
}

.trip-date {
  color: #777;
  font-style: italic;
}

/* ====== ГАЛЕРЕЯ: 3 изображения ровно в ряд ====== */

.single-trip .trip-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* расстояние между картинками */
}

.single-trip .trip-content .trip-img {
  width: calc(33.333% - 14px); /* три в ряд + отступы */
  display: block;
}

/* Чтобы изображения не вылазили */
.single-trip .trip-content .trip-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform .2s ease;
}

.single-trip .trip-content .trip-img img:hover {
  transform: scale(1.03);
}

/* 📱 Адаптив: на телефоне — 1, на планшете — 2 */
@media (max-width: 900px) {
  .single-trip .trip-content .trip-img {
    width: calc(33% - 12px);
  }
}
@media (max-width: 600px) {
  .single-trip .trip-content .trip-img {
    width: 100%;
  }
}

.trip-content a {
  color: #555;
  text-decoration: none;
}

.trip-content a:hover {
  color: #000;
}

/* ✅ Визуальное выравнивание Featured Image и галереи */
.trip-featured-image {
    max-width: calc(1200px - 16px); /* учитывать margin 8px у галереи */
    margin: 0 auto 30px auto;
}

.trip-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 8px 0 8px 0; /* одинаковый отступ, как у галереи */
    transition: transform .2s ease;
}

/* Trip meta links */
.trip-meta {
  font-size: 13px;
  color: #555;
}

.trip-meta .trip-meta-link,
h2.trip-title a,
p.country-more a,
p.trip-meta-links a {
  color: #555;
  text-decoration: none;
  transition: color .2s ease;
}

.trip-meta .trip-meta-link:hover,
h2.trip-title a:hover,
p.country-more a:hover,
p.trip-meta-links a:hover {
  color: #000;
}

/* === Align Trips page title with homepage h1 === */
.post-type-archive-trip .page-title,
.post-type-archive-trip .entry-title,
.post-type-archive-trip h1,
.page-about h1 {
    font-family: 'Playfair Display', serif !important;
    font-size: clamp(28px, 4vw, 56px) !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    margin: 20px auto 20px !important; /* как на главной */
    color: #111 !important;
}

/* Убираем лишние обертки Blocksy, если они дают отступы */
.post-type-archive-trip .entry-header,
.post-type-archive-trip .ct-page-title,
.post-type-archive-trip .hero-section {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ===== ABOUT PAGE CONTACT FORM STYLING ===== */
.about-contact-form {
  margin-top: 60px;
  text-align: left;
}

.about-contact-form h2 {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  margin-bottom: 30px;
}

.ems-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ems-form label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  color: #333;
}

.ems-form input,
.ems-form textarea {
  width: 100%;
  padding: 12px 16px;
  margin-top: 6px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  color: #111;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.ems-form input:focus,
.ems-form textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
}

.ems-form-btn {
  align-self: center;
  padding: 0.8em 2.2em;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #f7f7f7; /* чуть серый, чтобы отличалась от фона */
  color: #111;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.ems-form-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}


.form-success {
  text-align: center;
  color: green;
  margin-bottom: 20px;
}

.form-error {
  text-align: center;
  color: red;
  margin-bottom: 20px;
}

.ems-footer-slogan {
  margin-bottom: 20px;
  color: #666;
}

.ems-footer-menu {
  margin-top: 10px;
  margin-bottom: 18px;
}

.ems-footer-menu a {
  margin: 0 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: opacity .2s ease;
}

.ems-footer-menu a:hover {
  opacity: 0.6;
}

.ems-footer-copy {
  font-size: 13px;
  color: #888;
}

.trip-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.trip-content .trip-img-wrapper {
  width: calc(33.333% - 20px);
}

.trip-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform .2s ease;
}

.trip-content img:hover {
  transform: scale(1.03);
}

@media (max-width: 900px) {
  .trip-content .trip-img-wrapper {
    width: calc(50% - 20px);
  }
}
@media (max-width: 600px) {
  .trip-content .trip-img-wrapper {
    width: 100%;
  }
}

/* Чистим мусор внутри trip-content */
.single-trip .trip-content br {
  display: none;
}

.single-trip .trip-content p:empty {
  display: none;
}

/* Текстовые абзацы занимают всю ширину ряда,
   чтобы не смешивались с колонками картинок */
.single-trip .trip-content > p {
  width: 100%;
  margin: 0 0 16px;
}

.ems-footer-menu .separator {
  color: #ccc;
  margin: 0 12px;
}

.ems-footer-menu .instagram-link {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  margin-left: 12px;
  background: #fff;
  transition: 0.25s;
}

.ems-footer-menu .instagram-link:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.trip-apply-btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 14px;
  height: 36px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #111;           /* ← вот этого не хватало */
  cursor: pointer;
  transition: all 0.25s ease;
}

.trip-apply-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.trip-reset-btn {
  margin-left: 5px;
  font-size: 14px;
  color: #888;
  text-decoration: underline;
  border: none;
  background: none;
}
.trip-reset-btn:hover { color: #333; }

.trip-lang-switcher {
    display: flex;
    gap: 8px;
}

.trip-lang-switcher .lang-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 14px;
}

.trip-lang-switcher .lang-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Общий стиль для блоков контента */

.trip-content {
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

/* Скрываем только визуально — исчезновение */
.trip-content.hidden {
  opacity: 0;
}

/* Полностью убрать из документа после fade (через класс collapsed) */
.trip-content.collapsed {
  height: 0;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

/* Trip images styles */
.trip-img img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 8px 0;
    transition: transform .2s ease;
}
.trip-img img:hover { transform: scale(1.03); }

/* === Recommended Places === */
.trip-recommendations {
  margin-top: 20px;
  padding: 20px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

.trip-recommendations h3 {
  margin-bottom: 15px;
 font-size: clamp(22px, 3vw, 28px);
}

.rec-item {
  display: flex;
  margin-bottom: 15px;
}

.rec-icon {
  font-size: 1.8em;
  margin-right: 12px;
}

.rec-title {
  margin: 0;
}

.rec-link {
  font-size: 0.9em;
  margin-left: 8px;
  opacity: 0.8;
  text-decoration: none;
}

.rec-link:hover {
  opacity: 1;
}

.rec-comment {
  margin: 5px 0 0;
  color: #555;
}

/* Контейнер */
.trip-top-meta {
  margin: 10px 0 15px;
}

/* Левая часть (дата, страна, теги) */
.byline.trip-meta {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* Ссылка Tips справа */
.trip-meta-links a,
.tips-link {
  font-size: 14px;
  color: #b15a2b;
  text-decoration: none;
}

.ct-container-full {
  padding-bottom:  0;
}

/* разделитель между рекомендациями */
.trip-recommendations .rec-item {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee; /* светло-серый разделитель */
}

/* чтобы у последнего элемента линии не было */
.trip-recommendations .rec-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.country-info-box {
  margin: 20px 0;
  padding: 20px;
  border-radius: 12px;
  background: #f9f9f9;
  border: 1px solid #eee;
}

.country-info-box h3 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 15px;
}

.country-info-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.country-info-inner .country-flag {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.country-info-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.country-info-inner li {
  margin-bottom: 6px;
}

.country-more {
  margin-top: 10px;
}

/* Контейнер — 2 колонки (текст слева, карта справа) */
.country-info-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

/* Левая часть — занимает фиксированную ширину */
.country-left {
  flex: 0 0 auto;
  max-width: 45%;
}

/* Правая часть — карта растягивается на всё свободное */
.country-map {
  flex: 1 1 auto;
  height: 220px;
  min-width: 250px;
}

/* Сама карта */
#trip-map {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

/* ✅ Responsive fix: stack flag/text/map vertically on small screens */
@media (max-width: 768px) {
  .country-info-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .country-left {
    max-width: 100%;
  }

  .country-map {
    width: 100%;
    min-width: auto;
    height: 200px; /* можно увеличить до 240px, если хочется повыше */
    margin-top: 10px;
  }

  #trip-map {
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }
}

/* ✅ Anchor offset fix (so section titles aren't hidden under header) */
#about-country {
  scroll-margin-top: 100px; /* подстрой под высоту твоего header */
}

.ui-state-highlight {
  height: 50px;
  background: #f7f7f7;
  border: 2px dashed #ccc;
}

#trip-recommendations-rows tr {
  cursor: move;
}

#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 25px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 30px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
}

#back-to-top:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

#back-to-top.show {
  opacity: 1;
}

.trip-lang-switcher {
  display: flex;
  gap: 8px;
}

.lang-btn {
  border: 1px solid #ddd;
  background: #fff;
  color: #000;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Активная кнопка */
.lang-btn.active {
  background: #000;
  color: #fff;
}

/* Ховер и фокус */
.lang-btn:hover:not(.active),
.lang-btn:focus:not(.active) {
  background: #f5f5f5;
  color: #000;
}

/* Убираем стандартное iOS-синее выделение */
.lang-btn:focus,
.lang-btn:active {
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  background: inherit;
}

#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 25px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 30px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
  color: #000; /* 👈 жёстко фиксируем чёрный */
  -webkit-tap-highlight-color: transparent; /* убирает синюю вспышку */
  -webkit-text-fill-color: #000; /* Safari-specific fix */
  -webkit-user-select: none;
}

/* hover / active / focus */
#back-to-top:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

#back-to-top:focus,
#back-to-top:active {
  outline: none;
  box-shadow: none;
  background: #fff;
  color: #000 !important; /* 👈 жёсткий override для iOS */
  -webkit-text-fill-color: #000 !important;
}

/* показ кнопки */
#back-to-top.show {
  opacity: 1;
}

.trip-pagination ul {
  display: inline-flex;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.trip-pagination a,
.trip-pagination span {
  display: block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #000;
  text-decoration: none;
  transition: all 0.2s ease;
}

.trip-pagination a:hover {
  background: #f5f5f5;
}

.trip-pagination .current {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* single-trip title size tuning */
#trip-title {
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

/* === Footer logo hover effect (fixed layout) === */
.ems-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}

.ems-footer-logo {
  width: 80px;
  height: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  margin-bottom: 8px;
}

.ems-footer-brand:hover {
  transform: translateY(-4px);
}

.ems-footer-brand:hover .ems-footer-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

/* Подгоняем слоган под центр и убираем лишние отступы */
.ems-footer-slogan {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  color: #555;
  max-width: 500px;
}

.ems-footer-menu a.instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.25s ease, transform 0.25s ease;
  margin-left: 6px;
}
.ems-footer-menu a.instagram-link:hover {
  color: #e4405f;
  transform: scale(1.08);
}
.ems-instagram-icon {
  vertical-align: middle;
  width: 10px;
  height: 10px;
}

.ems-ukraine-note {
  text-align: center;
  font-size: 15px;
  color: #444;
  margin: 40px 0;
  opacity: 0.85;
  letter-spacing: 0.2px;
}

.ems-ukraine-note span {
  background: linear-gradient(90deg, #005BBB, #FFD500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

/* По умолчанию (десктоп) */
.trip-filters input[type="text"] {
  flex: 1; /* занимает свободное пространство */
  padding: 14px 10px; 
  border-radius: 8px; 
  border: 1px solid #ddd; 
  min-width: 160px; 
  height: 50px;
  font-size: 15px;
  box-sizing: border-box;
}

.trip-lookup-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  z-index: 999;
  overflow: hidden;
  animation: fadeIn 0.15s ease-in-out;
}

.trip-lookup-item {
  display: block;
  padding: 10px 14px;
  color: #222;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  transition: background 0.15s ease;
}

.trip-lookup-item:hover {
  background: #f8f8f8;
}

.trip-lookup-empty {
  padding: 10px 14px;
  color: #999;
  font-size: 14px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Чтобы контейнер фильтров мог позиционировать список */
.trip-filters {
  position: relative;
}

.trip-lookup-results:empty {
  display: none;
}

.trip-lookup-item.note {
  background: #fff;
  color: #888;
  font-style: italic;
  font-size: 14px;
  padding: 8px 12px;
  cursor: default;
  pointer-events: none; /* ✅ делает некликабельным */
}

.trip-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.trip-filters .field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 25%; /* базовая ширина для селектов */
  min-width: 200px; /* чтобы не схлопывались */
}

.trip-filters .field-wrapper:last-child {
  flex: 1; /* поиск занимает остаток */
}

.trip-filters select,
.trip-filters input[type="text"] {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 15px;
}

.trip-filters .clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
  display: none;
}
.trip-filters .clear-btn:hover {
  opacity: 1;
  color: #333;
}

/* Скрываем стрелку, если в wrapper добавлен класс has-value */
.trip-filters .field-wrapper.has-value select {
  background-image: none !important;
  padding-right: 30px; /* чтобы крестик не сливался с текстом */
}

/* Мобильные и планшеты — всё в одну колонку */
@media (max-width: 1024px) {
  .trip-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .trip-filters .field-wrapper {
    flex: 1 1 100%;
    width: 100%;
    min-width: auto;
  }
}

.trip-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.trip-flag {
  position: absolute;
  bottom: 39px;
  right: 22px;
  width: 32px;
  height: 24px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 1024px) {

  .trip-flag {
    bottom: 33px;
  }

}

.trip-card:hover .trip-flag {
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.trip-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.1em;
  color: inherit;
}

.trip-like-btn .heart {
  transition: color 0.3s ease, transform 0.2s ease;
}

.trip-like-btn.liked .heart {
  color: #aaa !important;
  fill: #aaa !important;
  filter: grayscale(100%) brightness(0.8);
  transform: scale(0.95);
}

.trip-like-count {
  transition: opacity 0.3s ease;
  color: inherit; /* остаётся прежнего цвета */
}

.trip-like-count {
  opacity: 0;
}
.trip-like-count.ready {
  opacity: 1;
}

/* Контейнер логотипа */
.ems-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px; /* добавляем отступ справа от логотипа+снежинки */
}

.ems-snowflake {
  font-size: 18px;
  line-height: 1;
  margin-left: 6px;
  transform: translateY(-0.05em); /* немного опускаем */
  opacity: 0.9;
  animation: ems-snow-twinkle 4s ease-in-out infinite;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .ems-snowflake {
    font-size: 16px;
    transform: translateY(-0.03em); /* на мобильных чуть ниже */
  }
}

.ems-komoot {
  margin: 20px 0;
  padding: 30px;
  border-radius: 12px;
  background: #fafafa;
  text-align: left;
  border: 1px solid #e5e5e5;
}
.ems-komoot h3 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 10px;
}
.ems-komoot p {
  color: #6b7280;
  margin-bottom: 20px;
}
.ems-komoot-links {
  list-style: none;
  padding-left: 0;
  margin: 0 0 20px;
}
.ems-komoot-links li {
  margin-bottom: 15px;
  padding-bottom: 15px;
  font-size: 17px;
  border-bottom: 1px solid #eee;
}
.ems-komoot-links li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.ems-komoot-links a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}
.ems-komoot-links a:hover {
  text-decoration: none;
  color: #000;
}

.komoot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #222;
  opacity: 0.8;
  transition: opacity .2s ease;
}

.komoot-badge:hover {
  opacity: 1;
}

.komoot-icon {
  width: 16px !important;
  height: 16px !important;
  display: inline-block;
  flex-shrink: 0;
}

/* container */
.komoot-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* название маршрута */
.komoot-title {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3; /* фиксируем стабильную высоту строки */
}


/* параметры маршрута */
.komoot-details {
  font-size: 14px;
  opacity: .8;
  display: block;
}

/* Komoot badge (иконка) */
.komoot-icon {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

/* мобильная адаптация */
@media (max-width: 600px) {

  .komoot-details {
    font-size: 13px;
    opacity: .75;
  }

  .komoot-title {
    font-size: 15px;
  }

}

/* EMS Travel Stats */
.ems-stats-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.ems-stat-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    padding: 20px 28px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform .25s ease, box-shadow .25s ease;
}

.ems-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.ems-stat-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.ems-stat-number {
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
    color: #222;
}

.ems-stat-label {
    font-size: 14px;
    color: #666;
}

/* Mobile */
@media (max-width: 600px) {
    .ems-stat-card {
        padding: 18px 24px;
    }
    .ems-stats-wrapper {
        gap: 16px;
    }
}


