:root {
  --bg: #000;
  --fg: #fff;
  --muted: #bfbfbf;
  --panel-glow: rgba(255,255,255,0.03);
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

.panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(3px);
  transition: all 0.4s ease;
}

.lead {
  color: var(--muted);
}

a {
  color: inherit;
}

.hero-bg {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  background-size: cover;
  filter: blur(3px);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.fade-in {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.4s ease, transform 2s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: scale(1);
}

.slide-left, .slide-right, .slide-up {
  opacity: 0;
  transition: all 1s ease;
}

.slide-left {
  transform: translateX(-40px);
}

.slide-right {
  transform: translateX(40px);
}

.slide-up {
  transform: translateY(40px);
}

.slide-left.visible, .slide-right.visible, .slide-up.visible {
  opacity: 1;
  transform: translate(0, 0);
}

.mt-10 a {
  transition: all 0.3s ease;
  min-width: 160px;
  text-align: center;
}

.mt-10 a:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.refit-btn {
  position: relative;
}

.refit-btn:hover {
  background: linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1));
}

@media (max-width: 768px) {
  .mt-10 .flex-wrap {
    gap: 10px;
  }
  
  .mt-10 a {
    min-width: 140px;
    padding: 12px 16px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .mt-10 a {
    min-width: 120px;
    padding: 10px 12px;
    font-size: 0.7rem;
  }
}

main, header, footer {
  transition: filter 0.4s ease-out;
}

#contact .text-xl {
  position: relative;
  display: inline-block;
}

#contact a.group {
  position: relative;
}

#contact a.group::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: width 0.4s ease;
}

#contact a.group:hover::after {
  width: 100%;
}

#contact svg {
  transition: transform 0.3s ease;
}

#contact .w-12.h-12 {
  opacity: 0.9;
  animation: iconFloat 6s ease-in-out infinite;
}

#contact .flex.items-start:hover .w-12.h-12 {
  opacity: 1;
}

#contact .flex.items-start:hover svg {
  transform: scale(1.1);
}

#contact .flex-shrink-0 {
  transition: all 0.3s ease;
  position: relative;
}

#contact .flex-shrink-0::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#contact .flex.items-start:hover .flex-shrink-0 {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

#contact .flex.items-start:hover .flex-shrink-0::before {
  opacity: 1;
}

#contact a.group span {
  transition: all 0.3s ease;
  transform: translateX(-4px);
}

#contact a.group:hover span {
  transform: translateX(0);
}

#contact .panel {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact .panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transition: left 0.7s ease;
}

#contact .panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--panel-glow);
}

#contact .panel:hover::before {
  left: 100%;
}

footer {
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

footer .text-xl.font-bold {
  position: relative;
  padding-bottom: 8px;
}

footer .text-xl.font-bold::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

footer a:hover {
  position: relative;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

footer a:hover svg {
  animation: emailPulse 1.5s ease infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes emailPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
  #contact .grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  #contact .panel {
    padding: 1.25rem;
  }
  
  #contact h2 {
    font-size: 1.75rem;
  }
  
  #contact .text-xl {
    font-size: 1rem;
  }
  
  footer .flex-col.md\:flex-row {
    gap: 1.5rem;
  }
  
  footer .text-xl.font-bold {
    text-align: center;
    padding-bottom: 0;
  }
  
  footer .text-xl.font-bold::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  footer a {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
   .modal-image {
        max-height: 200px;
    }
    
    #contact .flex.items-start {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    #contact .w-12.h-12 {
        width: 3rem;
        height: 3rem;
    }
    
    #contact svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

html {
    scrollbar-gutter: stable;
}

@media (min-width: 768px) {
    body::after {
        content: '';
        position: fixed;
        top: 0;
        right: 0;
        width: 15px;
        height: 100vh;
        background: transparent;
        pointer-events: none;
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    body.modal-open::after {
        opacity: 1;
        background: var(--bg);
    }
}

html {
    overflow-y: scroll;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.fullscreen-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fullscreen-modal.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fullscreen-modal.active .fullscreen-modal-overlay {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.fullscreen-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95), rgba(5, 5, 5, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.fullscreen-modal.active .fullscreen-modal-content {
    opacity: 1;
}

.fullscreen-modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.95), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.fullscreen-modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: white;
    line-height: 1.3;
}

.fullscreen-modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.fullscreen-modal-body::-webkit-scrollbar {
    width: 6px;
}

.fullscreen-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.fullscreen-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.fullscreen-modal-body h3,
.fullscreen-modal-body .text-2xl.font-serif.font-semibold,
.fullscreen-modal .text-2xl.font-serif.font-semibold {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.fullscreen-modal-body .modal-content-title {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.fullscreen-modal-body .font-serif {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

.fullscreen-modal-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(to top, rgba(20, 20, 20, 0.95), transparent);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.fullscreen-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.fullscreen-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.fullscreen-modal-body img {
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.fullscreen-modal.active .fullscreen-modal-body img {
    opacity: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fullscreen-modal.active .fullscreen-modal-body > * {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.fullscreen-modal.active .fullscreen-modal-body > *:nth-child(1) { animation-delay: 0.1s; }
.fullscreen-modal.active .fullscreen-modal-body > *:nth-child(2) { animation-delay: 0.2s; }
.fullscreen-modal.active .fullscreen-modal-body > *:nth-child(3) { animation-delay: 0.3s; }

.main-content-blur {
    filter: blur(8px) brightness(0.7);
    pointer-events: none;
    user-select: none;
    transition: filter 0.5s ease;
}

@supports (-webkit-touch-callout: none) {
    .fullscreen-modal {
        position: fixed;
        height: -webkit-fill-available;
    }
    
    .fullscreen-modal-content {
        max-height: -webkit-fill-available;
    }
}

header, footer {
    transition: all 0.5s ease;
}

body.modal-open header,
body.modal-open footer {
    opacity: 0;
    pointer-events: none;
}

footer .text-xl.font-bold::after {
    display: none;
}

@media (min-width: 769px) {
    .fullscreen-modal {
        align-items: center;
        justify-content: center;
    }
    
    .fullscreen-modal-content {
        width: 90%;
        max-width: 1200px;
        max-height: 90vh;
        margin: auto;
        border-radius: 16px;
    }
    
    .fullscreen-modal.active .fullscreen-modal-content {
        transform: scale(1) translateY(0);
    }
    
    .fullscreen-modal-body {
        max-height: 60vh;
    }
    
    @media (max-width: 1024px) {
        .fullscreen-modal-content {
            width: 95%;
            max-height: 95vh;
        }
        
        .fullscreen-modal-header,
        .fullscreen-modal-body,
        .fullscreen-modal-footer {
            padding: 1.25rem 1.5rem;
        }
        
        .fullscreen-modal-title {
            font-size: 1.5rem;
        }
        
        .fullscreen-modal-body h3,
        .fullscreen-modal-body .text-2xl.font-serif.font-semibold,
        .fullscreen-modal .text-2xl.font-serif.font-semibold,
        .fullscreen-modal-body .modal-content-title {
            font-size: 1.3rem;
        }
    }
}

@media (max-width: 768px) {
    .fullscreen-modal {
        align-items: flex-end;
        justify-content: flex-end;
    }
    
    .fullscreen-modal-content {
        width: 100%;
        max-height: calc(100vh - env(safe-area-inset-top));
        margin: 0;
        border-radius: 16px 16px 0 0;
        min-height: calc(80vh - env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .fullscreen-modal.active .fullscreen-modal-content {
        transform: translateY(0);
    }
    
    .fullscreen-modal-body {
        max-height: calc(60vh - env(safe-area-inset-top));
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom);
        scroll-padding-bottom: 100px;
    }
    
    .fullscreen-modal-footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
    
    .fullscreen-modal-header,
    .fullscreen-modal-body,
    .fullscreen-modal-footer {
        padding: 1rem 1.25rem;
    }
    
    .fullscreen-modal-title {
        font-size: 1.3rem;
    }
    
    .fullscreen-modal-body h3,
    .fullscreen-modal-body .text-2xl.font-serif.font-semibold,
    .fullscreen-modal .text-2xl.font-serif.font-semibold,
    .fullscreen-modal-body .modal-content-title {
        font-size: 1.2rem;
        margin-bottom: 0.875rem;
    }
    
    .fullscreen-modal-body .grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Дополнительный отступ снизу для кнопок в футере */
    .fullscreen-modal-footer {
        position: sticky;
        bottom: 0;
        background: linear-gradient(to top, rgba(20, 20, 20, 1), rgba(20, 20, 20, 0.95));
        z-index: 10;
    }
    
    @supports (padding: max(0px)) {
        .fullscreen-modal-content {
            padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        }
        
        .fullscreen-modal-footer {
            padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        }
    }
}

@supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 768px) {
        .fullscreen-modal {
            padding-top: env(safe-area-inset-top);
        }
        
        .fullscreen-modal-content {
            margin-top: env(safe-area-inset-top);
        }
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .fullscreen-modal-content {
        height: calc(100vh - env(safe-area-inset-bottom) - 60px);
    }
    
    .fullscreen-modal-footer {
        position: relative;
        margin-top: auto;
    }
}

.fullscreen-modal-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* ========== УПРОЩЕННЫЕ СТИЛИ ДЛЯ КНОПОК-КАРТОЧЕК ========== */
.mt-10 .flex-wrap {
    gap: 1.5rem;
    justify-content: center;
}

.mt-10 a {
    min-width: 200px;
    padding: 1.25rem 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Эффект при наведении (сохраняем существующую анимацию) */
.mt-10 a:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Акцент для Refit кнопки */
.refit-btn:hover {
    background: linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1));
}

/* ========== АДАПТИВНЫЕ СТИЛИ ========== */
@media (max-width: 768px) {
    .mt-10 .flex-wrap {
        gap: 1rem;
    }
    
    .mt-10 a {
        min-width: 140px;
        padding: 12px 16px;
        font-size: 0.75rem;
        border-radius: 10px;
    }
}

@media (max-width: 640px) {
    .mt-10 .flex-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .mt-10 a {
        min-width: 100%;
        padding: 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .mt-10 .flex-wrap {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mt-10 a {
        min-width: 120px;
        padding: 10px 12px;
        font-size: 0.7rem;
    }
}