:root {
    --primary: #0062ff; /* Яркий синий */
    --primary-hover: #004ecc;
    --bg: #f8faff; /* Светло-голубоватый фон */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent-green: #10b981;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 22px; font-weight: 800; color: var(--text-main); text-decoration: none;}
.logo span { color: var(--primary); }

.header_burger-btn{
  z-index: 2;
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  border-color: white;
  background-color: #f8faff;;
}

.header_burger-btn span {
  position: absolute;
  width: 30px;
  height: 3px;
  background-color: black;
  left: 5px;
  transition: transform .5s, opacity .5s, backround-color .5s;
}

.header.open .header_burger-btn span:nth-child(2) {
  opacity: 0;
}


.header.open .header_burger-btn span:nth-child(3) {
  transform: translateY(0);
  rotate: 45deg;
}

.header.open .header_burger-btn span:nth-child(1) {
  transform: translateY(0);
  rotate: -45deg;
}

.header_burger-btn span:nth-child(3) {
  transform: translateY(+10px);
}



.header_burger-btn span:nth-child(1) {
  transform: translateY(-10px);
}

.nav-links { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 15px; }

.menu{
    margin-right: 120px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    margin-top: 0px;
    font-weight: 500;
}

.btn-primary-profile {
  width: 100%;
  margin-top: 10px;
  font-weight: 500;
  color: white;
  padding: 9px 17px;
  border-radius: 8px;
  background-color: #2563eb;
  cursor: pointer;
  border: 1px solid #cbd5e1
}

.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* Catalog */
.hero { text-align: center; padding: 40px 0; }
.hero h1 { font-size: 32px; color: #0f172a; margin-bottom: 10px; }
.hero p { color: var(--text-muted); }

.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.section-title{
  text-align: center;
}

.card {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.card:hover { border-color: var(--primary); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04); }

.price { font-size: 26px; font-weight: 700; color: var(--text-main); margin: 10px 0; }
.speed { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* === АДАПТИВНОСТЬ (768px и ниже: ВКЛЮЧАЕМ БУРГЕР) === */
@media (max-width: 768px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Скрываем горизонтальные ссылки в шапке */
    .nav-links {
        display: none;
    }

    /* Показываем кнопку бургера на планшетах и телефонах */
    .header_burger-btn {
      display: block;
      z-index: 1001;
      position: relative;
    }


    /* Настройки выплывающего меню (теперь работают от 768px) */
    .menu {
      overflow: hidden;
      position: absolute;
      left: 0;
      top: 150px;
      flex-direction: column;
      width: 100%;
      max-height: 0;
      background-color: var(--bg);
      transition: max-height 0.5s;
      display: flex;
      align-items: center;
      z-index: 1000;
      margin-left: 0px;
    }

    .header.open .menu {
      max-height: 200px;
    }

    .menu-list {
      text-align: center;
      display: block;
      padding: 0;
    }

    /* Ссылки ВНУТРИ выплывающего меню */
    .menu .nav-links {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 30px;
      padding: 0;
      margin-right: 90px;
    }

    .menu .nav-links a {
      display: block;
      color: var(--text-main);
      font-weight: bold;
      text-decoration: none;
      font-size: 20px;
    }

    .hero h1 { font-size: 26px; }
    .sub-item { flex-direction: column; gap: 15px; align-items: flex-start; }
    .btn-outline { width: 100%; text-align: center; }
}

/* Оверлей */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #fff;
    width: 100%;
    max-width: 450px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
}

.modal-header h2 { margin: 0 0 10px 0; font-size: 22px; }
#modalSubtitle span { color: var(--primary); font-weight: 600; }

/* Способы оплаты */
.payment-methods { margin: 25px 0; }
.payment-methods h4 { font-size: 14px; color: var(--text-muted); margin-bottom: 15px; }

.payment-option { cursor: pointer; display: block; margin-bottom: 10px; }
.payment-option input { display: none; }

.payment-box {
    padding: 15px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    transition: 0.2s;
    font-weight: 500;
}

.payment-option input:checked + .payment-box {
    border-color: var(--primary);
    background: #f0f7ff;
    color: var(--primary);
}

.total-price { font-size: 18px; font-weight: 700; text-align: center; }
.total-price span { color: var(--primary); font-size: 24px; }


.yoomoney-img {
  padding-top: 5px;
  width: 100px;
}

/* Настройки для ТЕЛЕФОНОВ (480px) */
@media (max-width: 480px) {
    .modal-overlay {
        align-items: flex-start;
        padding: 0;
    }

    .btn-primary {
      margin-left: 10px;
      width: 125px;
      margin-top: 0px;
      margin-right: 5px;
    }

    .sub-actions{
      justify-content: center;
      width: 100%;
      text-align: center;
    }

    .btn-primary-profile{
      width: 120px;
      margin-left: 10px;
      height: 50px;
      margin-top: 17px;
      border: 1px solid #cbd5e1
    }

    .modal {
        overflow: hidden;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 25px 20px 300px 20px;
        animation: slideFromBottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }

    @keyframes slideFromBottom {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

     .modal-close {
        top: 15px;
        right: 15px;
        background: #f1f5f9;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }

    .payment-box {
        padding: 12px; /* Чуть компактнее на мобилках */
        font-size: 14px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    /* Увеличиваем область нажатия для кнопок оплаты */
    .payment-option {
        margin-bottom: 8px;
    }
}

/* FOOTER */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 60px 0 30px 0;
    margin-top: 50px;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 300px;
    line-height: 1.6;
}

.footer-links h4 {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Нижняя полоса */
.footer-bottom {
    border-top: 1px solid #f1f5f9;
    padding-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;

}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
}


/* Мобильная адаптация футера */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
}


body.modal-active .header_burger-btn {
    display: none !important;
}
