﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* Базовые настройки */
body {
  font-family: 'GT Eesti Pro Display', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f2f8fc;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/*Настройка логотипа*/
.logo img {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
  transition: transform 0.2s, box-shadow 0.2s;
}

.logo img:hover{
  transform: scale(1.04);
}

/* менюшка */
.nav-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #5494cf;
  width: 100%;
  padding: 0 3%;
  position: sticky;
  top: 0;
  z-index: 1000;
  cursor: pointer;
}

.nav-menu .dropdown ul li a {
  display: block;
  font-family: 'GT Eesti Pro Display', sans-serif;
  color: #1A3055;
  text-decoration: none;
  font-size: calc(12px + (18+12)*((100vw-350px)/(1600-300)));
  padding: 5% 0 5% 10%;
  border-radius: 15px;
}

.nav-menu .dropdown ul li a:hover {
  background-color: #cde3f7;

}

.nav-menu .dropdown ul li ul {
  flex-direction: column;
  position: absolute;
  right: 0;
  width: 18rem;
  background-color: #e8f3fc;
  opacity: 0;
  border-radius: 15px;
  transition: 0.3s;
  margin-top: 45%;
  visibility: hidden;
}

/* Активное меню (открытое по клику) */
.nav-menu .dropdown ul li ul.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-menu .dropdown ul li {
  position: relative;
  list-style: none;
}



.nav-brand {
  gap: 10px;
  display: flex;
  align-items: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  margin-left: 4px;
  font-size: calc(20px + (35+20)*((100vw-350px)/(1600-300)));
}

.menu-item {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  text-decoration: none;
  color: #f8f3e7;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-weight: bold;
  font-size: 18px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-name {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #f8f3e7;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-weight: bold;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.brand-subtitle {
  color: #f8f3e7;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  margin-left: -4px;
  border: 0;
  border-radius: 50%;
  background-color: #858b94;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle::before {
  content: "☾";
  font-size: 18px;
  line-height: 1;
}

.theme-toggle:hover {
  background-color: #6e747c;
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(248, 243, 231, 0.85);
  outline-offset: 3px;
}

body.theme-dark {
  background-color: #121923;
  color: #e7edf5;
}

body.theme-dark .nav-menu,
body.theme-dark .site-footer {
  background-color: #243140;
}

body.theme-dark .nav-menu .dropdown ul li ul {
  background-color: #1b2430;
}

body.theme-dark .nav-menu .dropdown ul li a,
body.theme-dark .brand-name,
body.theme-dark .brand-subtitle,
body.theme-dark .menu-item,
body.theme-dark .mail,
body.theme-dark .footer-nav a,
body.theme-dark .footer-contact a,
body.theme-dark .footer-brand-block h3,
body.theme-dark .footer-brand-block p,
body.theme-dark .footer-bottom p,
body.theme-dark .stolovaya-card-link,
body.theme-dark .card p {
  color: #e7edf5;
}

body.theme-dark .nav-menu .dropdown ul li a:hover {
  background-color: #334254;
}

body.theme-dark .stolovaya-list,
body.theme-dark .card,
body.theme-dark .mail {
  background-color: #1b2430;
}

body.theme-dark .stolovaya-card-header,
body.theme-dark .card p {
  border-color: #3a4858;
}

body.theme-dark .back-to-top {
  background-color: #334254;
}

body.theme-dark .back-to-top:hover {
  background-color: #415164;
}

body.theme-dark .theme-toggle {
  background-color: #a0a6ae;
  color: #1b2430;
}

body.theme-dark .theme-toggle::before {
  content: "☀";
}

body.theme-dark iframe {
  filter: saturate(0.9) brightness(0.88);
}

.image-container {
  position: relative;
  width: 100%;
  height: clamp(300px, 42vw, 500px);
  margin: 0 auto 5%;
  overflow: hidden;
}

.photo-shape {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(40%);
}

.text-overlay {
  position: absolute;
  top: 5%;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4%;
  flex-direction: column;
}

.text-overlay h1 {
  color: #f2f8fc;
  font-family: 'GT Eesti Pro Display', Arial, sans-serif;
  font-size: 75pt;
  font-weight: 600;
  margin: 0;
  max-width: 80%;
  text-align: center;
}

.canteens-list {
  background-color: #f8f3e7;
  border-radius: 30px;
  padding: 4%;
  margin: 6% auto 2.5%;
  width: 90%;
  max-width: 56.25rem;
  height: auto;
}

@media (max-width: 1200px) {
  .nav-menu {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-brand,
  .nav-links,
  .mail {
    justify-content: center;
  }
}

.site-footer {
  margin-top: 56px;
  padding: 32px 40px 24px;
  background-color: #5494cf;
  color: #f8f3e7;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow-x: clip;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-brand-block h3 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1;
}

.footer-brand-block p,
.footer-contact p,
.footer-bottom p {
  font-size: 16px;
  line-height: 1.6;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.footer-nav a,
.footer-contact a {
  color: #f8f3e7;
  text-decoration: none;
}

.footer-nav a {
  font-size: 17px;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s ease;
}

.footer-nav a:hover {
  transform: scale(1.08);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(248, 243, 231, 0.28);
}

.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background-color: #5494cf;
  color: transparent;
  text-decoration: none;
  border-radius: 50%;
  font-family: 'GT Eesti Pro Display', sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  z-index: 1000;
}

.back-to-top::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 14px;
  height: 14px;
  border-top: 10px solid #f8f3e7;
  border-left: 10px solid #f8f3e7;
  transform: rotate(45deg);
}

.back-to-top::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 4px;
  height: 18px;
  background-color: #f8f3e7;
  border-radius: 999px;
}

.back-to-top:hover {
  background-color: #467fb2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 3px solid #EAF0F8;
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .image-container {
    height: clamp(240px, 52vw, 360px);
  }

  .text-overlay {
    padding-left: 0;
  }

  .text-overlay h1 {
    font-size: 48pt;
  }

  .back-to-top {
    right: 16px;
    width: 52px;
    height: 52px;
  }

  .back-to-top::before {
    top: 16px;
    width: 12px;
    height: 12px;
    border-top-width: 3px;
    border-left-width: 3px;
  }

  .back-to-top::after {
    top: 23px;
    width: 3px;
    height: 16px;
  }

  .site-footer {
    padding: 28px 20px 20px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

.stolovaya-list {
  background-color: #cde3f7;
  border-radius: 30px;
  padding: 48px 40px;
  margin: 5%;
  height: auto;
}

.stolovaya-card-link {
  text-decoration: none;
  color: #6b7fa7;
  font-size: 24px;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-weight: bold;
}

.c_stolovaya {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  width: 31%;
  margin-bottom: 20px;
  background-color: #fffaf7;
  border-radius: 26px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;

}

.stolovaya-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e7ddd3;
  padding-bottom: 16px;
  margin-bottom: 14px;
}

.stolovaya-card-header a {
  display: block;
  margin-top: 0;
}

  .card p {
    margin-top: 8px;
    font-size: 14pt;
    color: #2c3e4e;
    line-height: 1.4;
    text-align: left;
    border-top: 1px dashed #bdd4e8;
    padding-top: 8px;
    margin-bottom: 4px;
  }

  .card p1 {
    margin-top: 8px;
    font-size: 14pt;
    color: #2c3e4e;
    line-height: 1.4;
    text-align: left;
  }

.stolovaya-list iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: clamp(320px, 42vw, 460px);
  margin: 20px auto 0;
  border: 0;
  border-radius: 24px;
}

@media (max-width: 1200px) {
  .card {
    width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .stolovaya-list {
    padding: 28px 20px;
  }

  .image-container {
    height: clamp(240px, 52vw, 360px);
  }

  .text-overlay {
    padding-left: 0;
  }

  .text-overlay h1 {
    font-size: 48pt;
  }

  .card {
    width: 100%;
    margin-bottom: 0;
  }

  .stolovaya-list iframe {
    width: 100%;
    height: 320px;
    border-radius: 20px;
  }
}

@media (max-width: 650px) {
  .image-container {
    height: 240px;
  }

  .text-overlay h1 {
    font-size: 36pt;
  }
}


/*калькулятор*/

.canteen-menu-calculator {
  margin: 0 5% 36px;
  padding: 36px 40px;
  border-radius: 30px;
  background: linear-gradient(180deg, #dcebf8 0%, #cde3f7 100%);
  box-shadow: 0 14px 30px rgba(26, 48, 85, 0.08);
  border: 1px solid rgba(84, 148, 207, 0.18);
  text-align: center;
}

.canteen-menu-calculator__title {
  margin: 0;
  color: #1a3055;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
}

.canteen-menu-calculator__subtitle {
  margin: 2% auto 0;
  max-width: 84%;
  color: #48627e;
  font-size: 18px;
}

.canteen-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.canteen-menu-card {
  border: 1px solid #bdd4e8;
  border-radius: 22px;
  padding: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 20px rgba(84, 148, 207, 0.08);
}

.canteen-menu-card.selected {
  border-color: #5494cf;
  background: #edf6ff;
  box-shadow: 0 12px 24px rgba(84, 148, 207, 0.16);
}

.canteen-menu-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 16px;
}

.canteen-menu-card h3 {
  font-size: 20px;
  margin: 14px 0 8px;
  color: #1a3055;
}

.canteen-menu-card__price {
  color: #373d49;
  font-weight: 700;
  font-size: 20px;
  font-family: 'GT Eesti Pro Display', sans-serif;
}

.canteen-menu-card__controls {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.canteen-menu-card__button {
  min-width: 128px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  font-family: 'GT Eesti Pro Display', sans-serif;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.canteen-menu-card__button:hover {
  transform: translateY(-1px);
}

.canteen-menu-card__button--add {
  background: #5494cf;
  color: #ffffff;
}

.canteen-menu-card__button--remove {
  background: #ff8d5c;
  color: #ffffff;
}

.canteen-menu-card__button--add:disabled {
  background: #b5bfca;
  cursor: not-allowed;
  transform: none;
}

.canteen-menu-calculator__result {
  margin-top: 32px;
  padding: 24px;
  background: #fffaf7;
  border-radius: 22px;
  border: 1px solid #bdd4e8;
  animation: fadeIn 0.5s;
}

.canteen-menu-calculator__result h2 {
  margin: 0;
  color: #1a3055;
  font-size: clamp(22px, 2.4vw, 30px);
}

.hidden { display: none; }

.canteen-menu-calculator__reset {
    margin-top: 15px;
  padding: 10px 18px;
  border: none;
  border-radius: 14px;
  background: #1a3055;
    color: white;
  cursor: pointer;
  font-weight: 700;
  font-family: 'GT Eesti Pro Display', sans-serif;
}

body.theme-dark .canteen-menu-calculator {
  background: linear-gradient(180deg, #243140 0%, #1b2430 100%);
  border-color: #3a4858;
}

body.theme-dark .canteen-menu-calculator__title,
body.theme-dark .canteen-menu-calculator__subtitle,
body.theme-dark .canteen-menu-card h3,
body.theme-dark .canteen-menu-calculator__result h2 {
  color: #e7edf5;
}

body.theme-dark .canteen-menu-card {
  background: linear-gradient(180deg, #243140 0%, #1b2430 100%);
  border-color: #3a4858;
}

body.theme-dark .canteen-menu-card.selected {
  background: #2a3a4b;
  border-color: #5494cf;
}

body.theme-dark .canteen-menu-card__price {
  color: #9fc0e4;
}

body.theme-dark .canteen-menu-calculator__result {
  background: #1b2430;
  border-color: #3a4858;
}

@media (max-width: 1200px) {
  .canteen-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .canteen-menu-calculator {
    margin: 0 20px 28px;
    padding: 24px 20px;
  }

  .canteen-menu-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 900px) {
  .nav-menu {
    padding: 10px 12px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .brand-text {
    min-width: 0;
    margin-left: 0;
  }

  .brand-name,
  .brand-subtitle {
    white-space: normal;
  }

  .brand-name {
    font-size: clamp(18px, 5vw, 24px);
  }

  .brand-subtitle {
    font-size: clamp(12px, 3vw, 14px);
  }

  .nav-menu .dropdown ul li ul {
    width: min(280px, calc(100vw - 24px));
    margin-top: 12px;
  }

  .stolovaya-list,
  .canteen-menu-calculator {
    margin-left: 12px;
    margin-right: 12px;
  }
}

@media (max-width: 600px) {
  .logo img {
    width: 52px;
    height: 52px;
  }

  .text-overlay h1 {
    font-size: clamp(28px, 10vw, 52px);
  }

  .canteen-menu-calculator,
  .stolovaya-list {
    padding: 20px 14px;
  }

  .canteen-menu-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    padding: 8px 10px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .text-overlay h1 {
    font-size: 24px;
  }

  .canteen-menu-calculator,
  .stolovaya-list {
    margin-left: 8px;
    margin-right: 8px;
    padding: 16px 10px;
  }

  .canteen-menu-card {
    padding: 14px;
  }

  .canteen-menu-card__button {
    min-width: 100%;
  }

  .canteen-menu-card__controls {
    flex-direction: column;
  }
}

@media (max-width: 375px) {
  .brand-name {
    font-size: 16px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .canteen-menu-calculator,
  .stolovaya-list {
    margin-left: 6px;
    margin-right: 6px;
    padding: 14px 8px;
  }

  .canteen-menu-card__button,
  .canteen-menu-calculator__reset {
    font-size: 14px;
    padding: 10px 14px;
  }
}