/* ========================================
   public-base.css — Общие стили публичных страниц.
   Header, footer, hero, FAQ, формы.
   Загружается через base_public.html.
   ======================================== */

/* Header */
header {
    --header-height: 70px;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.2);
    z-index: 1000;
    padding: 12px 0;
}

header + * {
    margin-top: var(--header-height);
}

nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-teal);
}

.cta-button {
    background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-teal) 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-teal);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-only {
    display: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 60px;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(52, 211, 153, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-teal);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-tertiary);
}

.form-group select option {
    background: #1e293b;
    color: #ffffff;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(var(--color-primary-rgb, 99, 102, 241), 0.2);
    margin-top: 0;
    padding: 40px 0 20px;
}

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

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.footer-brand .logo-icon {
    border-radius: 10px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.5;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-section h4 {
    font-size: 15px;
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
}

/* FAQ */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--color-teal);
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-content {
    padding: 0 25px 20px 25px;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 10px 0 10px;
        order: 3;
        overflow: visible;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid rgba(52, 211, 153, 0.1);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-auth-buttons {
        display: none;
    }

    .mobile-only {
        display: list-item;
    }

    .mobile-auth-divider {
        padding: 0;
        margin-top: 4px;
        border-top: 1px solid rgba(52, 211, 153, 0.2);
    }

    /* Убираем nav-border у пункта перед разделителем */
    li:has(+ .mobile-auth-divider) a {
        border-bottom: none;
    }

    .mobile-auth-divider + .mobile-auth-item {
        padding-top: 12px;
    }

    .mobile-auth-item {
        padding: 6px 0;
    }

    .mobile-auth-item a {
        display: inline-block !important;
        padding: 8px 20px !important;
    }

    .mobile-auth-item .btn-nav-outline {
        border: 1px solid var(--color-teal);
    }

    h1 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-section {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 12px 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .container {
        padding: 20px 12px;
    }

    footer {
        padding: 30px 0 15px;
    }
}
