/* style.css - Основные стили для Business Flow */

/* Базовые стили */
body {
    box-sizing: border-box;
    padding-top: 80px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main, #content-wrapper {
    flex: 1 0 auto;
}

html, body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Растягиваем на всю высоту экрана */
    margin: 0;
}

footer {
    flex-shrink: 0; /* Футер не должен сжиматься */
}

/* Фиксированное меню */
body {
    padding-top: 0 !important; /* Убираем фиксированный padding-top */
}

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Первая секция получает автоматический отступ */
#hero-section {
    padding-top: 120px; /* Большой отступ для десктопа */
    margin-top: 0;
}

/* Медиа-запросы для адаптивности */
@media (min-width: 768px) {
    #hero-section {
        padding-top: 100px; /* Меньше для планшетов */
    }
}

@media (min-width: 1024px) {
    #hero-section {
        padding-top: 90px; /* Еще меньше для десктопа */
    }
}

@media (max-width: 640px) {
    #hero-section {
        padding-top: 140px; /* Больше для мобильных */
    }
}

/* Для всех якорных целей */
[id] {
    scroll-margin-top: 100px;
}

/* Карточки */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

/* Фокус для клавиатурной навигации */
.focus-outline:focus-visible {
    outline: 3px solid rgba(30, 64, 175, 0.9);
    outline-offset: 2px;
}

/* Горизонтальная прокрутка для ленты проектов */
.projects-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.projects-scroll::-webkit-scrollbar {
    height: 8px;
}

.projects-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.projects-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.projects-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.project-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}


/* Кнопки */
.btn-primary {
    background-color: #1f3b7b;
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #172b5c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: #1f3b7b;
    border: 2px solid #1f3b7b;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #1f3b7b;
    color: white;
}

/* Типографика */
.section-title {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.body-text {
    font-size: 1rem;
    line-height: 1.6;
}

.small-text {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-base-color {
    color: #111827;
}

/* Карточки поверхностей */
.surface-card {
    background-color: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.accent-color {
    background-color: #eab308;
}

/* Формы */
input, textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #1f3b7b;
    box-shadow: 0 0 0 2px rgba(31, 59, 123, 0.1);
}

/* Навигационные ссылки */
.nav-link {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #111827;
}

/* Отзывчивость */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .projects-scroll {
        padding-bottom: 1rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
}
/* cases.html - специальные стили */

/* Для главного контейнера cases.html */
main.max-w-6xl {
    padding-top: 120px !important;
}

/* Для заголовка страницы cases.html */
#page-top {
    scroll-margin-top: 100px;
}

/* Для всех статей-кейсов */
article[id] {
    scroll-margin-top: 100px;
}

/* Адаптивность для cases.html */
@media (min-width: 768px) {
    main.max-w-6xl {
        padding-top: 100px !important;
    }
    article[id] {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 640px) {
    main.max-w-6xl {
        padding-top: 140px !important;
    }
    article[id] {
        scroll-margin-top: 120px;
    }
}
.back-to-top {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      z-index: 999;
      background: #1e40af;
      color: white;
      width: 3rem;
      height: 3rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
      transition: all 0.3s ease;
    }
    
    .back-to-top:hover {
      background: #1e3a8a;
      transform: translateY(-2px);
    }
	#mobile-menu-dropdown {
  display: none;
}

#mobile-menu-button:focus + #mobile-menu-dropdown,
#mobile-menu-dropdown:hover {
  display: block;
}
/* Для очень маленьких экранов */
@media (max-width: 360px) {
  .mobile-contacts {
    font-size: 0.75rem;
  }
  .mobile-contacts a {
    padding: 0.25rem;
  }
}

/* Плавная анимация меню */
#mobile-menu-dropdown {
  transition: opacity 0.2s, transform 0.2s;
}
#mobile-menu-dropdown:not(.hidden) {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    padding: 16px 24px;
    border-radius: 12px;
    background: #fff;
    color: #333;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
