/* worldGrand → MODX design layer (bag-travels.ru)
   Inspired by Joomla worldGrand layout. Compatible with Bootstrap 3 + PHP 5.3 era assets.
*/

:root {
  --wg-bg: #f5f7fa;
  --wg-surface: #ffffff;
  --wg-text: #1c2430;
  --wg-muted: #5c6b7a;
  --wg-primary: #0e7c86;
  --wg-primary-dark: #0a5f67;
  --wg-accent: #f0a202;
  --wg-accent-hover: #d89000;
  --wg-line: #e2e8ef;
  --wg-hero: #0b3d4a;
  --wg-radius: 12px;
  --wg-shadow: 0 8px 28px rgba(15, 40, 55, 0.08);
  --wg-font: "Manrope", "Segoe UI", sans-serif;
  --wg-display: "Literata", Georgia, serif;
}

html { scroll-behavior: smooth; }
body.wg-body {
  font-family: var(--wg-font);
  color: var(--wg-text);
  background: var(--wg-bg);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--wg-primary); }
a:hover { color: var(--wg-primary-dark); }

h1, h2, h3, .wg-display {
  font-family: var(--wg-display);
  font-weight: 600;
  color: var(--wg-text);
}

.wg-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* —— Top bar —— */
.wg-topbar {
  background: var(--wg-hero);
  color: #d7e8ec;
  font-size: 13px;
  padding: 8px 0;
}
.wg-topbar a { color: #fff; text-decoration: none; }
.wg-topbar .wg-topbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  align-items: center;
}
.wg-topbar i { margin-right: 6px; opacity: .85; }

/* —— Krym strip (keep links to bagtravels.ru) —— */
.krym-nav-wrapper {
  background: #e8f4f5;
  border: none !important;
  font-family: var(--wg-font) !important;
}
.krym-nav-wrapper nav ul {
  justify-content: flex-start !important;
  flex-wrap: wrap;
  gap: 0;
}
.krym-nav-wrapper nav ul li {
  border: none !important;
  flex: none !important;
}
.krym-nav-wrapper nav ul li a {
  color: var(--wg-primary-dark) !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
  font-weight: 600;
}
.krym-nav-wrapper nav ul li a:hover {
  background: rgba(14, 124, 134, .1) !important;
  color: var(--wg-primary) !important;
}

/* —— Brand bar (Joomla-like) —— */
.wg-brand-bar {
  background: var(--wg-surface);
  padding: 14px 0;
  border-bottom: 1px solid var(--wg-line);
}
.wg-brand-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.wg-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: var(--wg-text) !important;
}
.wg-logo img {
  max-height: 56px;
  width: auto;
}
.wg-logo-eyebrow {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--wg-muted);
}
.wg-logo-title {
  display: block;
  font-family: var(--wg-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--wg-primary);
  line-height: 1.2;
}
.wg-brand-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.wg-phone-lg {
  font-size: 20px;
  font-weight: 700;
  color: var(--wg-primary) !important;
  text-decoration: none !important;
}
.wg-btn {
  display: inline-block;
  background: var(--wg-primary);
  color: #fff !important;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none !important;
}
.wg-btn--accent {
  background: var(--wg-accent);
  color: #1c2430 !important;
}
.wg-btn--accent:hover { background: var(--wg-accent-hover); color: #fff !important; }

.krym-label {
  display: inline-block;
  padding: 10px 8px 10px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--wg-primary);
}

.main-nav-wrapper {
  background: var(--wg-surface);
  border: none !important;
  border-bottom: 1px solid var(--wg-line) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  font-family: var(--wg-font) !important;
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-nav-wrapper .wg-menu,
.main-nav-wrapper nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.main-nav-wrapper nav ul li {
  border: none !important;
  flex: none !important;
  position: relative;
}
.main-nav-wrapper nav ul li a {
  color: var(--wg-text) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 14px 14px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  border-bottom: 2px solid transparent;
  display: block;
}
.main-nav-wrapper nav ul li a:hover,
.main-nav-wrapper nav ul li.active a {
  background: transparent !important;
  color: var(--wg-primary) !important;
  border-bottom-color: var(--wg-primary);
}
.main-nav-wrapper .dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: var(--wg-shadow);
  padding: 8px 0;
  margin-top: 0;
}
.main-nav-wrapper .dropdown-menu > li > a {
  padding: 8px 18px !important;
  border-bottom: none !important;
  font-weight: 500 !important;
}
.navbar-toggle .icon-bar { background: var(--wg-primary); }

/* —— Full-bleed hero (Joomla) —— */
.wg-hero {
  position: relative;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  background-color: var(--wg-hero);
  display: flex;
  align-items: center;
}
.wg-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11,61,74,.88) 0%, rgba(11,61,74,.45) 55%, rgba(11,61,74,.2) 100%);
}
.wg-hero__inner {
  position: relative;
  z-index: 2;
  padding: 72px 16px;
  color: #fff;
  max-width: 720px;
}
.wg-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 700;
  opacity: .9;
  margin: 0 0 10px;
}
.wg-hero__title {
  font-family: var(--wg-display);
  font-size: 44px;
  line-height: 1.15;
  color: #fff !important;
  margin: 0 0 12px;
  font-weight: 700;
}
.wg-hero__lead {
  font-size: 18px;
  margin: 0;
  opacity: .95;
}
.wg-section--search {
  padding-top: 0;
  margin-top: -40px;
  position: relative;
  z-index: 3;
}
.wg-tv-wrap--lift {
  box-shadow: 0 16px 40px rgba(15,40,55,.14);
}

/* —— Hero / flexslider —— */
.flexslider {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: var(--wg-hero) !important;
  min-height: 380px;
}
.flexslider .slides .img {
  min-height: 420px;
  background-size: cover !important;
  background-position: center !important;
  position: relative;
}
.flexslider .slides .img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,61,74,.82) 0%, rgba(11,61,74,.35) 55%, rgba(11,61,74,.15) 100%);
}
.flexslider .slide-header,
.flexslider .slide-description,
.flexslider .btn-more {
  position: relative;
  z-index: 2;
  left: 8% !important;
  max-width: 520px;
}
.flexslider .slide-header {
  font-family: var(--wg-display);
  font-size: 42px !important;
  font-weight: 600;
  margin-top: 120px !important;
  text-shadow: none !important;
}
.flexslider .slide-description {
  font-size: 18px !important;
  opacity: .95;
}
.flexslider .btn-more {
  display: inline-block;
  background: var(--wg-accent) !important;
  color: #1c2430 !important;
  border-radius: 999px;
  padding: 10px 22px !important;
  font-weight: 700;
  margin-top: 16px;
}
.flexslider .btn-more:hover { background: #fff !important; }
.slide-panel {
  background: rgba(255,255,255,.95) !important;
  border-radius: var(--wg-radius);
  box-shadow: var(--wg-shadow);
  bottom: 24px !important;
  padding: 10px !important;
}
.slide-panel .btn {
  background: var(--wg-primary) !important;
  border-radius: 8px !important;
  margin: 4px !important;
  padding: 10px 16px !important;
}
.slide-panel .btn:hover { background: var(--wg-accent) !important; color: #1c2430 !important; }

/* —— Sections —— */
.wg-section {
  padding: 56px 0;
}
.wg-section--alt { background: var(--wg-surface); }
.wg-section__title {
  text-align: center;
  font-size: 32px;
  margin: 0 0 12px;
}
.wg-section__lead {
  text-align: center;
  color: var(--wg-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

.wg-card {
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  box-shadow: var(--wg-shadow);
  padding: 24px;
  height: 100%;
}

/* How to book */
.wg-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  counter-reset: step;
}
.wg-step {
  flex: 1 1 160px;
  max-width: 200px;
  text-align: center;
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  padding: 22px 14px;
  box-shadow: var(--wg-shadow);
  position: relative;
}
.wg-step::before {
  counter-increment: step;
  content: counter(step);
  display: none;
}
.wg-step__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: block;
}
.wg-step p {
  margin: 0;
  font-size: 14px;
  color: var(--wg-muted);
  font-weight: 600;
}

/* Reviews */
.wg-reviews {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.wg-review {
  flex: 1 1 260px;
  max-width: 360px;
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  box-shadow: var(--wg-shadow);
  padding: 24px;
}
.wg-review__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}
.wg-review__text {
  color: var(--wg-muted);
  font-size: 15px;
  margin: 0 0 14px;
}
.wg-review__author {
  color: var(--wg-primary);
  font-size: 14px;
}

.wg-stat__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  display: block;
}
.wg-telegram__icon {
  flex: 0 0 auto;
}
.wg-telegram__icon svg,
.wg-telegram__icon img {
  width: 64px;
  height: 64px;
}
.wg-telegram--compact {
  background: linear-gradient(120deg, #0e7c86 0%, #0b3d4a 100%);
}

/* Why us */
.wg-why-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 720px;
  margin: 0 auto;
}
.wg-why-list li {
  background: var(--wg-surface);
  border-radius: 10px;
  padding: 14px 18px 14px 48px;
  margin-bottom: 10px;
  box-shadow: var(--wg-shadow);
  position: relative;
  font-weight: 500;
}
.wg-why-list li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--wg-primary);
  font-weight: 700;
}

/* Stats */
.wg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.wg-stat {
  flex: 1 1 160px;
  max-width: 220px;
  text-align: center;
  background: var(--wg-hero);
  color: #fff;
  border-radius: var(--wg-radius);
  padding: 28px 16px;
}
.wg-stat__num {
  font-family: var(--wg-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--wg-accent);
}
.wg-stat__label {
  margin-top: 8px;
  font-size: 14px;
  opacity: .9;
}

/* Telegram CTA */
.wg-telegram {
  background: linear-gradient(120deg, #1c92d2 0%, #0e7c86 100%);
  color: #fff;
  border-radius: var(--wg-radius);
  padding: 36px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--wg-shadow);
}
.wg-telegram h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 26px;
}
.wg-telegram p { margin: 0; opacity: .92; max-width: 480px; }
.wg-telegram .wg-btn {
  background: #fff;
  color: #0e7c86;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
}
.wg-telegram .wg-btn:hover { background: var(--wg-accent); color: #1c2430; }

/* Contacts block */
.wg-contacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.wg-contact-card {
  flex: 1 1 220px;
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  padding: 22px;
  box-shadow: var(--wg-shadow);
  text-align: center;
}
.wg-contact-card .fa {
  font-size: 28px;
  color: var(--wg-primary);
  margin-bottom: 10px;
}
.wg-contact-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}
.wg-contact-card span {
  color: var(--wg-muted);
  font-size: 13px;
}

/* Tourvisor wrappers */
.wg-tv-wrap {
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  box-shadow: var(--wg-shadow);
  padding: 20px;
  margin-bottom: 28px;
}
.hot-tours, .tv-search-form, .tv-min-price { margin-bottom: 8px; }
.wg-body h3, .wg-body .h3 {
  color: var(--wg-text) !important;
  text-align: center;
  font-family: var(--wg-display);
  font-size: 28px;
  margin: 36px 0 20px;
}

/* About / content */
.o-nas {
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  padding: 28px;
  box-shadow: var(--wg-shadow);
}
.o-nas p { color: var(--wg-muted); }

.icons-cf { display: none !important; } /* hide unused rest types on home */

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  padding: 24px;
  box-shadow: var(--wg-shadow);
}
.partner-logo {
  max-height: 48px;
  width: auto;
  opacity: .75;
  filter: grayscale(1);
  transition: .2s;
}
.partner-logo:hover { opacity: 1; filter: none; }

/* Buttons */
a.btn, .btn.btn-primary, input.btn-primary {
  background-color: var(--wg-primary) !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600;
}
a.btn:hover, .btn.btn-primary:hover {
  background-color: var(--wg-accent) !important;
  color: #1c2430 !important;
}
a.btn.btn-green {
  background-color: var(--wg-primary) !important;
}
.green { color: var(--wg-primary) !important; }
.green-bg { background-color: var(--wg-primary) !important; color: #fff !important; }
.orange { color: var(--wg-accent) !important; }
.orange-bg { background-color: var(--wg-accent) !important; }

/* Fixed side buttons */
.fix-btn a.green-bg {
  border-radius: 8px 0 0 8px !important;
  box-shadow: var(--wg-shadow);
}

/* Modals */
.modal-content {
  border-radius: var(--wg-radius);
  border: none;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
}
.modal-header {
  background: var(--wg-hero);
  color: #fff;
  border-radius: var(--wg-radius) var(--wg-radius) 0 0;
}
.modal-header .close { color: #fff; opacity: .85; text-shadow: none; }
.modal-title { font-family: var(--wg-display); }
.modal-footer .btn-primary {
  background: var(--wg-primary) !important;
  border: none;
}

/* Footer */
footer {
  background: var(--wg-hero) !important;
  color: #c9dde2 !important;
  padding-top: 48px !important;
  margin-top: 0 !important;
}
footer a { color: #fff !important; }
footer h4 {
  color: #fff !important;
  font-family: var(--wg-display);
  font-size: 18px;
  margin-bottom: 16px;
}
footer .hotToursList {
  list-style: none;
  padding: 0;
}
footer .hotToursList li { margin-bottom: 8px; }
footer .hotToursList a {
  color: #c9dde2 !important;
  text-decoration: none;
  font-size: 14px;
}
footer .hotToursList a:hover { color: var(--wg-accent) !important; }
footer .copyright {
  background: rgba(0,0,0,.25) !important;
  margin-top: 36px;
  padding: 16px 0;
  font-size: 13px;
  color: #9bb5bc;
}
footer .phone { color: #fff; font-weight: 700; }

/* Inner pages */
.wg-inner-main {
  padding: 32px 0 56px;
}
.wg-inner-main .breadcrumb,
.wg-breadcrumbs {
  font-size: 13px;
  color: var(--wg-muted);
  margin-bottom: 16px;
}
.wg-inner-content {
  background: var(--wg-surface);
  border-radius: var(--wg-radius);
  box-shadow: var(--wg-shadow);
  padding: 28px;
}
.wg-inner-content h1 {
  margin-top: 0;
  font-size: 30px;
}

/* Map */
.wg-map {
  border-radius: var(--wg-radius);
  overflow: hidden;
  box-shadow: var(--wg-shadow);
  min-height: 320px;
  background: #d9e4ea;
}
.wg-map iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

/* Hero search (как на Joomla — форма в баннере) */
.wg-hero__inner { max-width: 960px; }
.wg-hero__lead { margin-bottom: 22px; }
.wg-tv-wrap--hero {
  background: rgba(255,255,255,.96);
  border-radius: var(--wg-radius);
  padding: 12px;
  box-shadow: var(--wg-shadow);
  color: var(--wg-text);
}
.wg-section--tight { padding-top: 24px; padding-bottom: 8px; }

/* Guide icons from Joomla */
.wg-steps--guide .wg-step__img {
  display: block;
  margin: 0 auto 12px;
  height: 40px;
  width: auto;
}
.wg-steps--guide .wg-step__icon { display: none; }

/* Match-tour блок «Почему мы» */
.wg-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px 48px;
  align-items: center;
}
.wg-match__media img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
}
.wg-match__body .wg-section__title { text-align: left; margin-top: 0; }
.wg-tv-wrap--btn { margin-top: 18px; min-height: 44px; }
.wg-tv-wrap--header { display: inline-block; vertical-align: middle; min-width: 140px; }

/* Яндекс-отзывы как на Joomla */
.wg-yandex-reviews {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  width: 100%;
  height: 700px;
  overflow: hidden;
}
.wg-yandex-reviews__link {
  box-sizing: border-box;
  text-decoration: none;
  color: #b3b3b3;
  font-size: 10px;
  font-family: YS Text, sans-serif;
  padding: 0 16px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
  left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-height: 14px;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 991px) {
  .wg-brand-inner { justify-content: center; text-align: center; }
  .wg-logo { flex-direction: column; }
  .wg-brand-actions { justify-content: center; }
  .wg-hero { min-height: 320px; }
  .wg-hero__title { font-size: 30px; }
  .wg-hero__inner { padding: 48px 16px; text-align: center; margin: 0 auto; }
  .main-nav-wrapper { position: relative; }
  .main-nav-wrapper .wg-menu,
  .main-nav-wrapper nav ul { display: block; }
  .flexslider .slides .img { min-height: 320px; }
  .flexslider .slide-header { font-size: 28px !important; margin-top: 80px !important; left: 5% !important; }
  .slide-panel { position: relative !important; bottom: auto !important; margin: 12px; }
  .wg-match { grid-template-columns: 1fr; }
  .wg-match__body .wg-section__title { text-align: center; }
}
@media (max-width: 767px) {
  .wg-section { padding: 36px 0; }
  .wg-section__title { font-size: 24px; }
  .wg-topbar { font-size: 12px; }
  .form-btn { display: none; }
  .wg-section--search { margin-top: -24px; }
  .wg-yandex-reviews { height: 560px; }
}
