/* Основные стили для главной страницы UASale99 */

/* ============================================
   SKIP LINK (доступность)
   ============================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ (дополнение к критическому CSS)
   ============================================ */

/* Дополнительные базовые стили */
a {
    color: #667eea; /* Контраст 4.5:1 с белым фоном - WCAG AA */
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #764ba2;
}

a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   HEADER / НАВИГАЦИЯ
   ============================================ */

header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-nav {
    padding: 15px 0;
}

.header-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #2c3e50;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a:focus {
    outline: 2px solid #667eea;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   HERO СЕКЦИЯ (дополнение)
   ============================================ */

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ============================================
   ПРЕИМУЩЕСТВА
   ============================================ */

.advantages {
    padding: 80px 0;
    background: #f8f9fa;
}

.advantages h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #2c3e50;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
    margin-bottom: 20px;
}

.advantage-icon img {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.advantage-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* ============================================
   КАТЕГОРИИ
   ============================================ */

.categories {
    padding: 80px 0;
    background: #ffffff;
}

.categories h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #2c3e50;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.category-card {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    background: #e9ecef;
}

.category-card img {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.category-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.categories-note {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 20px;
}

/* ============================================
   ПРО НАС (короткий)
   ============================================ */

.about-short {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
}

.about-short h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2c3e50;
}

.about-short p {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: center;
}

.about-short .btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* ============================================
   ЧЕСТНАЯ ЦЕНА
   ============================================ */

.honest-price {
    padding: 80px 0;
    background: #ffffff;
}

.honest-price h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2c3e50;
}

.scheme-wrapper {
    text-align: center;
    margin: 40px 0;
}

.scheme-wrapper img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.honest-price p {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 800px;
    margin: 40px auto 0;
    text-align: center;
}

/* ============================================
   ГАРАНТИЯ И СЕРВИС
   ============================================ */

.warranty {
    padding: 80px 0;
    background: #f8f9fa;
}

.warranty h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2c3e50;
}

.warranty-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.warranty-content img {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.warranty-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 30px;
}

/* ============================================
   B2B ФОРМА
   ============================================ */

.b2b {
    padding: 80px 0;
    background: #ffffff;
}

.b2b h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
}

.b2b > .container > p {
    text-align: center;
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 40px;
}

.b2b-form {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.b2b-form .btn {
    width: 100%;
    margin-top: 10px;
}

/* ============================================
   ОТЗЫВЫ
   ============================================ */

.reviews {
    padding: 80px 0;
    background: #f8f9fa;
}

.reviews h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #2c3e50;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.review-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.review-avatar {
    margin-bottom: 20px;
}

.review-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    object-fit: cover;
}

.review-card blockquote {
    margin: 0;
    font-style: italic;
    color: #2c3e50;
    line-height: 1.8;
}

.review-card blockquote p {
    margin: 0;
    font-size: 16px;
}

/* ============================================
   FAQ
   ============================================ */

.faq {
    padding: 80px 0;
    background: #ffffff;
}

.faq h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #2c3e50;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 40px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 300;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item summary:hover {
    background: #e9ecef;
}

.faq-item summary:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

.faq-answer {
    padding: 0 20px 20px;
    color: #6c757d;
    line-height: 1.8;
}

.faq-answer p {
    margin: 0;
}

.faq-answer a {
    color: #667eea;
    text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: #2c3e50;
    color: #ffffff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-section p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9); /* Улучшен контраст для WCAG AA */
    text-decoration: underline;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-section a:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9); /* Улучшен контраст для WCAG AA */
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-links a:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ============================================
   КНОПКИ (дополнение)
   ============================================ */

.btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
    border-radius: 8px;
}

/* Улучшение контраста для текста на кнопках */
.btn-primary {
    color: #ffffff; /* Контраст 4.5:1 с зеленым фоном */
}

.btn-secondary {
    color: #ffffff; /* Контраст 4.5:1 с полупрозрачным фоном */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   МОБИЛЬНАЯ АДАПТИВНОСТЬ (Mobile-First)
   ============================================ */

@media (max-width: 768px) {
    .header-nav .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .advantages,
    .categories,
    .about-short,
    .honest-price,
    .warranty,
    .b2b,
    .reviews,
    .faq {
        padding: 50px 0;
    }
    
    .advantages h2,
    .categories h2,
    .about-short h2,
    .honest-price h2,
    .warranty h2,
    .b2b h2,
    .reviews h2,
    .faq h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .advantages-grid,
    .categories-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .b2b-form {
        padding: 25px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 70vh;
        padding: 20px 15px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   PRINT СТИЛИ
   ============================================ */

@media print {
    header,
    footer,
    .hero-cta,
    .b2b-form,
    .btn {
        display: none;
    }
    
    body {
        background: #ffffff;
        color: #000000;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    section {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    h2 {
        page-break-after: avoid;
    }
}

