/* HEADER */
.headerAlmaty {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: #0b486b; /* header background */
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-family: 'Montserrat', sans-serif;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.main-nav a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateY(-1px);
}

.brend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brend i {
  font-size: 20px;
}

/* ======= PAGE GRID ======= */
body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
}

.page-grid {
  padding-top: 70px; /* compensate fixed header */
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header  header"
    "sidebar main"
    "footer  footer";
  gap: 16px;
  min-height: 100dvh;
}

.headerAlmaty { grid-area: header; }
.page-sidebar { grid-area: sidebar; }
.page-main { grid-area: main; }
.footer02 { grid-area: footer; }

/* SIDEBAR */
.page-sidebar {
  background: #fff;
  border: 1px solid #e9eef3;
  border-radius: 12px;
  padding: 16px;
}
.side-nav ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.side-nav a {
  display: block;
  text-decoration: none;
  color: #0b486b;
  background: #f6fbff;
  padding: 8px 10px;
  border-radius: 8px;
}
.side-nav a:hover {
  background: #e9f5ff;
}

/* MAIN CONTENT */
.page-main {
  background: #fff;
  border: 1px solid #e9eef3;
  border-radius: 12px;
  padding: 16px;
}

.InfoContainer {
  display: flex;
  justify-content: center;
  gap: 40px;
  background: linear-gradient(180deg, #F2EEE9 0%, #C9D6DF 100%);
  padding: 40px 20px;
  text-align: center;

   margin-left: -16px;   
  margin-right: -16px;
  margin-top: -16px;    /* remove gaps */
  border-radius: 12px 12px 0 0; 
  text-align: center;
}

.InfoContainer div {
  flex: 1;
  max-width: 200px;
}

.InfoContainer i {
  font-size: 40px;
  color: #4682B4;
  margin-bottom: 10px;
}
.InfoContainer h2 {
  font-size: 18px;
  margin: 10px 0;
  color: #222;
}
.InfoContainer p {
  font-size: 14px;
  color: #555;
}

.Description {
  max-width: 800px;
  margin: 0 auto;
  font-size: 19px;
  color: #66686b;
  line-height: 1.6;
}

#top-banner {
  text-align: left;
  font-size: 26px;
  color: #0b486b;
  margin: 40px auto 10px;
  font-weight: bold;
  max-width: 800px;
}

#top-banner::after,
.AttractionsTitle::after {
  content: "";
  display: block;
  width: 80px; height: 4px;
  background: linear-gradient(90deg,#0b486b,#16222A);
  border-radius: 2px;
  margin-top: 8px;
}

.AttractionsTitle {
  text-align: left;
  font-size: 26px;
  color: #0b486b;
  margin: 40px auto 10px;
  font-weight: bold;
  max-width: 800px;
}

.LeftBank, .RightBank, .Culture, .Events {
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 19px;
  color: #687c99;
  line-height: 1.6;
}

.LeftBankDescription, .RightBankDescription,
.CultureDescription, .EventsDescription {
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 21px;
  color: #435164;
  line-height: 1.6;
}

/* GALLERY (CARDS) */
.Gallery, .GalleryItem, .GalleryItem * { box-sizing: border-box; }

.GalleryTitle {
  text-align: left;
  font-size: 26px;
  color: #0b486b;
  margin: 40px auto 10px;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  max-width: 800px;
}

.Gallery {
  display: flex !important;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 24px 32px;
  max-width: 1000px;
  margin: 0 auto;
  justify-content: center;
}

.GalleryItem {
  flex: 0 1 calc((100% - 40px)/3);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.GalleryItem:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
}
.GalleryItem img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.GalleryItem .card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.GalleryItem .card-body h3 {
  margin: 4px 0 2px;
  font-size: 20px;
  color: #0b486b;
}
.GalleryItem .card-body p {
  margin: 0;
  color: #333;
  line-height: 1.5;
  font-size: 15px;
}
.GalleryItem .btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0b486b;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.GalleryItem .btn:hover {
  background: #0e5c89;
  transform: translateY(-2px);
}

/* GRID GALLERY */
.gallery-grid-section { padding: 10px 0 30px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  background: #eef4f8;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-item::after {
  content: attr(data-caption);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; text-align: center;
  color: #fff; background: rgba(0,0,0,.45);
  opacity: 0; transition: opacity .25s ease;
  font-weight: 600; letter-spacing: .2px; backdrop-filter: blur(1px);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: 1; }

/* Map */
.MapTitle {
  text-align: left;
  font-size: 26px;
  color: #0b486b;
  margin: 40px auto 10px;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  max-width: 800px;
}

.MapContainer {
  width: 100%;
  margin: 30px 0;
  border-radius: 0;
  overflow: hidden;
}
.MapContainer iframe {
  width: 100%;
  height: 500px;
  border: none;
}

/* FORM */
.FormTitle {
  text-align: center;
  font-size: 28px;
  color: #0b486b;
  margin: 40px 0 10px;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto 40px;
  display: grid;
  gap: 12px;
  padding: 0 20px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: #0b486b;
  box-shadow: 0 0 0 3px rgba(11,72,107,.15);
}
.contact-form button {
  padding: 12px 16px;
  background: #0b486b;
  color: #fff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s, transform .2s;
}
.contact-form button:hover {
  background: #16222A;
  transform: translateY(-2px);
}

/* FOOTER */
.footer02 {
  text-align: center;
  padding: 15px;
  background: #0b3a5b;
  color: white;
  margin-top: 30px;
}
#github02 {
  display: inline-block;
  color: #f8f9fa;
  text-decoration: none;
  margin-top: 10px;
}
#github02:hover {
  color: blue;
}

/* For tablet and phones */

/* Phones */
@media (max-width: 560px) {
  .headerAlmaty {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
  }

  .main-nav a {
    background: none;
    padding: 6px 8px;
    font-size: 14px;
  }

  .page-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main"
      "footer";
  }

  .InfoContainer {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 24px 12px;
  }

  .Description,
  .LeftBankDescription, .RightBankDescription,
  .CultureDescription, .EventsDescription {
    font-size: 16px;
    padding: 0 10px;
  }

  #top-banner, .AttractionsTitle {
    font-size: 22px;
    text-align: center;
  }

  .GalleryItem {
    flex: 0 1 100%;
    min-height: auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .MapContainer iframe { height: 350px; }

  .contact-form { padding: 0 10px; }
  .footer02 { font-size: 14px; padding: 10px; }
}

/* Tablet */
@media (min-width: 561px) and (max-width: 1100px) {
  .headerAlmaty { flex-wrap: wrap; padding: 14px 20px; }
  .main-nav { flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
  .InfoContainer { flex-wrap: wrap; gap: 30px; padding: 30px 16px; }
  .InfoContainer div { max-width: 45%; }
  .GalleryItem { flex: 0 1 calc((100% - 20px)/2); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .MapContainer iframe { height: 420px; }
  .contact-form { max-width: 90%; }
}

/*  Desktop */
@media (min-width: 1101px) {
  .GalleryItem { flex: 0 1 calc((100% - 40px)/3); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* TOGGLE BUTTON Dark/Light Mode */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #ffffff66;
  border-radius: 8px;
  background: #ffffff1a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s, color .2s;
  height: 36px;              
  margin: 0;                
}

.theme-btn:hover {
  background: #ffffff2a;
  transform: translateY(-2px);
}

/* ===== DARK MODE ===== */
body.dark-mode {
  background: #0f172a;
  color: #f1f5f9;
  font-family: 'Montserrat', sans-serif;
}

/* Header */
body.dark-mode .headerAlmaty {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
body.dark-mode .main-nav a {
  color: #f1f5f9;
}
body.dark-mode .main-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #bfdbfe;
}

/* Sidebar */
body.dark-mode .page-sidebar {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .side-nav a {
  background: #334155;
  color: #e2e8f0;
}
body.dark-mode .side-nav a:hover {
  background: #475569;
  color: #fff;
}

/* Main */
body.dark-mode .page-main {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

/* Info section */
body.dark-mode .InfoContainer {
  background: #0f172a;
}
body.dark-mode .InfoContainer div {
  background: transparent;
  box-shadow: none;
}
body.dark-mode .InfoContainer i {
  color: #60a5fa;
}
body.dark-mode .InfoContainer h2 {
  color: #bfdbfe;
}
body.dark-mode .InfoContainer p {
  color: #e2e8f0;
}

/* Text sections */
body.dark-mode #top-banner,
body.dark-mode .AttractionsTitle,
body.dark-mode .GalleryTitle,
body.dark-mode .MapTitle {
  color: #93c5fd;
}
body.dark-mode .Description,
body.dark-mode .LeftBank,
body.dark-mode .RightBank,
body.dark-mode .Culture,
body.dark-mode .Events,
body.dark-mode .LeftBankDescription,
body.dark-mode .RightBankDescription,
body.dark-mode .CultureDescription,
body.dark-mode .EventsDescription {
  color: #e2e8f0;
}

/* Gallery */
body.dark-mode .GalleryItem {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.dark-mode .GalleryItem .card-body h3 {
  color: #93c5fd;
}
body.dark-mode .GalleryItem .card-body p {
  color: #f1f5f9;
}
body.dark-mode .GalleryItem .btn {
  background: #2563eb;
}
body.dark-mode .GalleryItem .btn:hover {
  background: #1d4ed8;
}

/* Gallery grid */
body.dark-mode .gallery-item {
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.dark-mode .gallery-item::after {
  background: rgba(0,0,0,0.5);
}

/* Map */
body.dark-mode .MapContainer {
  background: #1e293b;
}

/* Contact form */
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
body.dark-mode .contact-form button {
  background: #2563eb;
}
body.dark-mode .contact-form button:hover {
  background: #1d4ed8;
}

/* Footer */
body.dark-mode .footer02 {
  background: #1e293b;
  color: #f1f5f9;
}
body.dark-mode #github02 {
  color: #60a5fa;
}
body.dark-mode #github02:hover {
  color: #93c5fd;
}

* {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}