/* Базовые стили публичной части сайта */

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

html, body {
    height: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--p-text-700);
    background-color: var(--p-bg-alt);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Навигация */
nav {
    background: linear-gradient(135deg, var(--p-brand) 0%, var(--p-brand-2) 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* Логотип */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}

/* Диод */
.logo-icon {
    height: 30px;
    width: 23px;
    margin-right: 0.15rem;
    filter:
        drop-shadow(0 0 1px rgba(255, 247, 185, .95))
        drop-shadow(0 0 6px rgba(255, 247, 185, .75))
        drop-shadow(0 0 14px rgba(255, 230, 120, .55));
    transition: filter .25s ease, transform .25s ease;
    animation: ledPulse 2.4s ease-in-out infinite;
}

/* Текст логотипа */
.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    color: #fff;
    text-shadow: 6px 0 10px rgba(0, 0, 0, .58);
    animation: textPulse 2.4s ease-in-out infinite;
}

.logo:hover .logo-icon {
    filter:
        drop-shadow(0 0 2px rgba(255, 247, 185, 1))
        drop-shadow(0 0 10px rgba(255, 247, 185, .95))
        drop-shadow(0 0 22px rgba(255, 230, 120, .85));
    transform: translateY(-1px) scale(1.04);
    animation-duration: 1.4s;
}

.logo:hover .logo-text {
    text-shadow: 10px 0 20px rgba(0, 0, 0, .8);
    animation-duration: 1.4s;
}

/* Анимации */
@keyframes ledPulse {
    0%, 100% {
        filter:
        drop-shadow(0 0 1px rgba(255, 247, 185, .9))
        drop-shadow(0 0 6px rgba(255, 247, 185, .7))
        drop-shadow(0 0 14px rgba(255, 230, 120, .5));
        transform: translateY(0) scale(1);
    }
    50% {
        filter:
        drop-shadow(0 0 3px rgba(255, 247, 185, 1))
        drop-shadow(0 0 12px rgba(255, 247, 185, .95))
        drop-shadow(0 0 26px rgba(255, 230, 120, .9));
        transform: translateY(-0.5px) scale(1.03);
    }
}

@keyframes textPulse {
    0%, 100% { text-shadow: 6px 0 10px rgba(0, 0, 0, .58); }
    50%      { text-shadow: 9px 0 18px rgba(0, 0, 0, .78); }
}

/* Навигационные ссылки */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}

.nav-links a:hover{
    opacity: 1;
    text-shadow: 0 0 6px rgba(255,255,255,.35);
}

.nav-links a.active {
    opacity: 1;
    font-weight: bold;
}

/* Контент */
.main-content {
    margin-top: 80px;
    padding: 0;
    flex: 1 0 auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* Заголовки секций */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h1 {
    font-size: 2.5rem;
    color: var(--p-text-700);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--p-text-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Footer */
footer { flex-shrink: 0; }

/* Кнопки */
.btn {
    display: inline-block;
    background: var(--p-brand);
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color .2s ease, transform .1s ease;
    border: none;
    cursor: pointer;
}

.btn:active{ transform: translateY(1px); }
.btn:hover { background: #5567d7; }
.btn-primary { background: var(--p-brand); }
.btn-secondary { background: #6c757d; }
.btn-success { background: var(--p-success); }
.btn-danger { background: #dc3545; }

.btn-hero { 
    background: #ff6b6b; 
    font-size: 20px;
    padding: 1rem 2rem;
}
.btn-hero:hover { background: #ee5a5a; }

/* Убираем outline при клике мышкой, но оставляем при навигации клавиатурой (Tab) */
.btn:focus,
.nav-links a:focus {
    outline: none;
}

/* Показываем outline только при навигации клавиатурой для доступности */
.btn:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid var(--p-brand);
    outline-offset: 2px;
}

/* Кнопка отправки: второй спан скрыт по умолчанию */
button[type="submit"] .btn-loading { display: none; }
button[type="submit"].is-loading .btn-text { display: none; }
button[type="submit"].is-loading .btn-loading { display: inline; }

/* Utilities */
.hidden { display: none !important; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}