/* ===== Основной стиль ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
:root{
    --header-height: 88px;
}
body {
  font-family: 'Montserrat', sans-serif;
  background-color: #1F2937;
  color: #E5E7EB;
  margin: 0;
  padding-top: var(--header-height);
  overflow-x: hidden;

}
@media (max-width: 768px){
    :root{
        --header-height: 72px;
    }
    .section{
             padding-top: 3.5rem;
             padding-bottom: 3.5rem;
         }
}

/* Links */

a {
  transition: 0.3s;
}

a:hover {
  color: #FACC15;
}

/* ===== Buttons ===== */

.btn {
  background: #22C55E;
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #16A34A;
  transform: scale(1.05);
}

/* ===== Animations ===== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 1.2s ease forwards;
}

/* Pulse animation */

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.animate-pulse {
  animation: pulse 2s infinite ease-in-out;
}

.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }

/* ===== Inputs (важно — без глобального ломания Tailwind) ===== */

#contactModal input,
#contactModal textarea,
#orderModal input,
#orderModal textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: #374151;
  border: 1px solid #4B5563;
  color: #E5E7EB;
  outline: none;
  transition: 0.3s;
}

#contactModal input:focus,
#contactModal textarea:focus,
#orderModal input:focus,
#orderModal textarea:focus {
  border-color: #FACC15;
}

#contactModal input::placeholder,
#contactModal textarea::placeholder,
#orderModal input::placeholder,
#orderModal textarea::placeholder {
  color: #9CA3AF;
}

/* ===== Sections ===== */

section{
    padding: clamp(3rem,8vw,6rem) 1.5rem;
}

.reveal{
    opacity:0;
    transform:translateY(45px);
    transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.visible{
    opacity:1;
    transform:translateY(0);
}

section:nth-child(even) {
  background-color: #111827;
}

/* ===== Header ===== */

header {
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  z-index: 1000;
  transition: 0.3s ease;
}
header h1{
    font-size: clamp(1.4rem,2vw,2.25rem);
}

header h1 span {
  color: #FACC15;
}

/* Mobile menu */

#mobileMenu{
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ===== Service cards ===== */

.service-card {
  background: rgba(55, 65, 81, 0.6);
  backdrop-filter: blur(12px);
  padding: clamp(1.2rem,2vw,1.8rem);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0;
  color: #FACC15;
}

.service-card p {
  color: #D1D5DB;
  font-size: 14px;
  line-height: 1.5;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Gradient glow */

.service-card::before {
  content: "";
  position: absolute;
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  background: radial-gradient(circle at top left,
      rgba(250,204,21,0.15),
      transparent 70%);
  opacity: 0;
  transition: 0.4s ease;
}

.service-card:hover::before {
  opacity: 1;
}

  .service-grid{
      display:grid;
      grid-template-columns:1fr;
      gap:1.5rem;
      margin-top:2.5rem;
  }
  .service-dropdown{
      background: linear-gradient(145deg, rgba(15,23,42,0.9), rgba(17,24,39,0.9));
      border:1px solid rgba(250,204,21,0.4);
      border-radius:28px;
      position:relative;
      overflow:hidden;
      box-shadow:
          0 35px 80px rgba(0,0,0,0.55),
          inset 0 0 25px rgba(255,255,255,0.03);
      transition: transform 0.4s ease, border-color 0.3s ease;
  }
  .service-dropdown__header{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:1rem;
      padding:1.5rem 1.5rem 1.25rem;
      cursor:pointer;
      background:rgba(255,255,255,0.015);
  }
  .service-dropdown__head h4{
      margin:0;
      color:#fff;
      font-size:1.6rem;
  }
  .service-dropdown__head p{
      margin:0;
      color:#cbd5f5;
      font-size:0.9rem;
      max-width:32ch;
  }
  .service-details__label{
      font-size:0.75rem;
      letter-spacing:0.3em;
      text-transform:uppercase;
      color:#14B8A6;
      background: rgba(20,184,166,0.12);
      padding:0.35rem 0.7rem;
      border-radius:999px;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      margin-bottom:0.5rem;
  }
  .service-dropdown__indicator{
      width:36px;
      height:36px;
      border-radius:12px;
      border:1px solid rgba(250,204,21,0.8);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      transition: transform 0.35s ease;
  }
  .service-dropdown__indicator::after{
      content:"";
      width:12px;
      height:12px;
      border-right:2px solid rgba(250,204,21,0.9);
      border-bottom:2px solid rgba(250,204,21,0.9);
      transform: rotate(45deg);
  }
  .service-dropdown:hover,
  .service-dropdown.open{
      transform: translateY(-6px);
      border-color: rgba(250,204,21,0.8);
      box-shadow:
          0 35px 90px rgba(0,0,0,0.55),
          inset 0 0 25px rgba(250,204,21,0.1);
  }
  .service-dropdown__list{
      list-style:none;
      padding:0;
      margin:0;
      max-height:0;
      overflow:hidden;
      transition:max-height 0.8s ease;
  }
  .service-dropdown.open .service-dropdown__list{
      max-height: 9999px;
  }
  .service-dropdown__list li{
      padding:1rem 1.5rem;
      border-top:1px solid rgba(250,204,21,0.25);
      color:#e5e7eb;
      background:rgba(250,204,21,0.03);
      opacity:0;
      transform: translateY(-12px);
      transition: opacity 0.4s ease, transform 0.4s ease;
      display:flex;
      flex-direction:column;
      gap:0.5rem;
  }
  .service-dropdown.open .service-dropdown__list li{
      opacity:1;
      transform: translateY(0);
  }
  .service-dropdown__list li strong{
      color:#fff;
  }
  .service-dropdown__list li p{
      margin:0;
      color:#cbd5f5;
      font-size:0.85rem;
  }
  .service-dropdown__list li button{
      align-self:flex-start;
      background: transparent;
      border:1px solid rgba(250,204,21,0.9);
      color:#facc15;
      border-radius:999px;
      padding:0.4rem 1rem;
      font-weight:600;
      cursor:pointer;
      transition: background 0.3s ease, color 0.3s ease;
  }
  .service-dropdown__list li button:hover{
      background:rgba(34,197,94,0.14);
      color:#22c55e;
  }
  .service-dropdown.open .service-dropdown__indicator{
      transform: rotate(180deg);
  }
@media (max-width: 1024px){
    .service-dropdown__header{
        flex-direction: column;
        align-items: flex-start;
    }
    .service-dropdown__indicator{
        align-self: flex-end;
    }
    .service-dropdown__list li{
        padding: 0.95rem 1.25rem;
    }
}
@media (max-width: 768px){
    .service-dropdown__header{
        padding: 1.2rem 1rem 1rem;
    }
    .service-dropdown__head h4{
        font-size: 1.4rem;
    }
    .service-dropdown__indicator{
        width: 30px;
        height: 30px;
    }
    .service-dropdown__list li button{
        width: 100%;
    }
    .service-dropdown{
        border-radius: 22px;
    }
}
@media (max-width:768px){
    .service-grid{
        grid-template-columns:1fr;
    }
    .service-dropdown{
        padding:0;
    }
}
/* ===== Modal Animation ===== */

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.modal-show {
  animation: modalFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    filter: blur(6px);
  }
}

.modal-hide {
  animation: modalFadeOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.premium-card {
  background: linear-gradient(
    145deg,
    rgba(31, 41, 55, 0.95),
    rgba(17, 24, 39, 0.95)
  );
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
          0 25px 60px rgba(0,0,0,0.35),
          inset 0 1px 1px rgba(255,255,255,0.03);
  border-radius: 28px;
  padding: clamp(1.5rem,2.5vw,2.5rem);
}

.premium-input {
  background: rgba(55, 65, 81, 0.6);
  border: 1px solid rgba(75, 85, 99, 0.4);
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}

.premium-input:focus {
  border-color: #FACC15;
  box-shadow: 0 0 0 4px rgba(250,204,21,0.08);
  transform: translateY(-2px);
}
/* ===============================
   PREMIUM MOBILE ADAPTATION
   Ultra modern responsive tuning
================================ */


.mobile-panel{
    position: absolute;
    top: 0;
    right: 0;

    height: 100%;
    width: min(85vw, 340px);

    background: rgba(30, 41, 59, 0.85);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    transform: translateX(100%);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;

    will-change: transform;
}

@keyframes mobileSlideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes mobileSlideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}


img, iframe{
    max-width: 100%;
    height: auto;
}

.grid{
    display:grid;
    gap:2rem;
}
/* ===== Mini widget ===== */
/* ===== Chat widget ===== */
.chat-widget{
    position:fixed;
    bottom:32px;
    right:32px;
    z-index:1200;
    font-family:'Montserrat',sans-serif;
}
.chat-widget__toggle{
    background:linear-gradient(135deg,#2563EB,#4F46E5);
    color:#fff;
    border:none;
    border-radius:50%;
    width:48px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.4rem;
    box-shadow:0 18px 36px rgba(15,23,42,0.45);
    cursor:pointer;
    position:relative;
    z-index:2;
}
.chat-widget__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.chat-widget__card{
    width:320px;
    background:#0F172A;
    border-radius:22px;
    border:1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 30px 60px rgba(0,0,0,0.55),
        inset 0 0 35px rgba(15,23,42,0.9);
    opacity:0;
    transform:translateY(20px);
    pointer-events:none;
    transition:0.3s ease;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    position:absolute;
    bottom: 58px;
    right: 0;
}
.chat-widget.active .chat-widget__card{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}
.chat-widget.active .chat-widget__toggle{
    opacity:0;
    pointer-events:none;
    visibility:hidden;
}
.chat-widget__header{
    background:#2563EB;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0.9rem 1rem;
}
.chat-widget__status-title{
    margin:0;
    font-size:1rem;
    font-weight:700;
}
.chat-widget__status{
    margin:0;
    font-size:0.8rem;
    opacity:0.9;
}
.chat-widget__close{
    border:none;
    background:rgba(255,255,255,0.2);
    color:#fff;
    width:28px;
    height:28px;
    border-radius:50%;
    font-size:1.2rem;
    line-height:1;
    cursor:pointer;
}
.chat-widget__body{
    padding:1rem;
    display:flex;
    flex-direction:column;
    gap:0.5rem;
    max-height:240px;
    overflow-y:auto;
}
.chat-widget__bubble{
    background:#1F2937;
    color:#F9FAFB;
    padding:0.65rem 0.9rem;
    border-radius:14px;
    position:relative;
    align-self:flex-start;
    max-width:90%;
    font-size:0.85rem;
}
.chat-widget__bubble span{
    display:block;
    text-align:right;
    font-size:0.7rem;
    opacity:0.5;
    margin-top:0.35rem;
}
.chat-widget__bubble--client{
    background:#22C55E;
    color:#0F172A;
    align-self:flex-end;
}
.chat-widget__bubble--bot{
    background:#E5E7EB;
    color:#0F172A;
}
.chat-widget__footer{
    display:flex;
    flex-wrap:wrap;
    gap:0.5rem;
    padding:0.8rem;
    background:rgba(15,23,42,0.8);
    border-top:1px solid rgba(255,255,255,0.05);
}
.chat-widget__quick-btn{
    flex:1 1 48%;
    min-width:120px;
    padding:0.6rem 0.75rem;
    border-radius:14px;
    border:1px solid rgba(255,255,255,0.2);
    background:rgba(15,23,42,0.6);
    color:#fff;
    font-size:0.8rem;
    cursor:pointer;
    text-align:left;
    transition:0.3s;
}
.chat-widget__quick-btn:hover{
    background:rgba(37,99,235,0.15);
    border-color:#2563eb;
}
@media (max-width:768px){
    .chat-widget{
        bottom:16px;
        right:16px;
    }
    .chat-widget__toggle{
        width:44px;
        height:44px;
        font-size:1.2rem;
    }
    .chat-widget__card{
        width:90vw;
        max-width:320px;
        bottom:50px;
    }
}
/* ===== iPad Air Fix ===== */

@media (min-width: 768px) and (max-width: 1180px){

    section.relative{
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;

        padding-top: 6rem;
        padding-bottom: 5rem;
    }

    section.relative .flex-1{
        width: 100% !important;
        max-width: 650px;
        margin: auto;
    }

    section.relative h2{
        font-size: clamp(2.2rem,4vw,3.2rem) !important;
        text-align: center !important;
    }

    section.relative p{
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    section.relative .justify-center{
        justify-content: center !important;
    }

    section.relative .premium-card{
        margin-top: 2rem;
    }

    /* Фоновые картинки — убрать на планшете */
    section.relative img{
        display:none !important;
    }
}

@media (max-width: 768px) {
  #contactModal .premium-card,
  #orderModal .premium-card {
    width: min(90vw, 340px);
    padding: 1.5rem;
    margin: auto;
    border-radius: 20px;
  }

  #contactModal .premium-card form,
  #orderModal .premium-card form {
    gap: 0.9rem;
  }

  #contactModal .btn,
  #orderModal .btn {
    font-size: 0.95rem;
    padding: 0.9rem 1rem;
  }
}
  .service-group__content{
      max-height:0;
      overflow:hidden;
      transition: max-height 0.8s ease;
  }
  .service-group[open] .service-group__content{
      max-height: 1200px;
  }
  .service-group[open] .service-group__chevron{
      transform: rotate(180deg);
  }
/* ===============================
   Custom Alert / Toast System
=============================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 48px);
}

.toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.toast.toast--hide {
    animation: toastSlideOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Цветная полоска слева */
.toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
}

.toast--success::before { background: linear-gradient(180deg, #22c55e, #16a34a); }
.toast--error::before   { background: linear-gradient(180deg, #ef4444, #dc2626); }
.toast--info::before    { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.toast--warning::before { background: linear-gradient(180deg, #f59e0b, #d97706); }

/* Прогресс-бар */
.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
    animation: toastProgress linear forwards;
}

.toast--success .toast__progress { background: linear-gradient(90deg, #22c55e, #16a34a); }
.toast--error   .toast__progress { background: linear-gradient(90deg, #ef4444, #dc2626); }
.toast--info    .toast__progress { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.toast--warning .toast__progress { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* Иконка */
.toast__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast--success .toast__icon { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.toast--error   .toast__icon { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.toast--info    .toast__icon { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.toast--warning .toast__icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Текст */
.toast__content {
    flex: 1;
    min-width: 0;
}

.toast__title {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.4;
    margin-bottom: 3px;
    font-family: 'Montserrat', sans-serif;
}

.toast__message {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    font-family: 'Montserrat', sans-serif;
}

/* Кнопка закрытия */
.toast__close {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    padding: 2px;
    flex-shrink: 0;
    transition: color 0.2s;
    margin-top: -2px;
}

.toast__close:hover {
    color: #f1f5f9;
}

/* Анимации */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 24px));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 120px;
        margin-bottom: 0;
    }
    to {
        opacity: 0;
        transform: translateX(calc(100% + 24px));
        max-height: 0;
        margin-bottom: -12px;
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ===============================
   Мобильные устройства
=============================== */
@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 24px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: 100%;
    }

    .toast {
        padding: 16px 16px;
    }

    @keyframes toastSlideIn {
        from {
            opacity: 0;
            transform: translateY(calc(100% + 24px));
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes toastSlideOut {
        from {
            opacity: 1;
            transform: translateY(0);
            max-height: 120px;
        }
        to {
            opacity: 0;
            transform: translateY(calc(100% + 24px));
            max-height: 0;
        }
    }
}