/* Index page styles - Task 25_13 */
/* Note: Hero section styles added in Task 25_7 to make component functional */

/* ========================= */
/* Hero Section              */
/* ========================= */

.index-hero-section {
    background: var(--secondary-bg, #1a2332);
    border-radius: var(--border-radius, 16px);
    padding: 48px;
    margin-bottom: 24px;
}

.index-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.index-hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary, #ffffff);
}

.index-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Hero Search Box */
.index-hero-search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.index-hero-search-input-wrapper {
    flex: 1;
    position: relative;
}

.index-hero-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #64748b);
    font-size: 1rem;
}

.index-hero-search-box input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--input-border, #2d3748);
    border-radius: 10px;
    font-size: 16px;
    background: var(--input-bg, #1e2a3a);
    color: var(--text-primary, #ffffff);
    transition: border-color 0.2s ease;
}

.index-hero-search-box input:focus {
    outline: none;
    border-color: var(--accent-orange, #ff6b35);
}

.index-hero-search-box input::placeholder {
    color: var(--text-muted, #64748b);
}

.index-hero-search-box .cta-button {
    padding: 16px 24px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hero Search Hints */
.index-hero-search-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.index-hero-hints-label {
    color: var(--text-muted, #64748b);
    font-size: 14px;
}

.index-hero-hint-chip {
    background: var(--primary-bg, #0a0f1c);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    border: 1px solid var(--input-border, #2d3748);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.index-hero-hint-chip:hover {
    border-color: var(--accent-orange, #ff6b35);
    color: var(--accent-orange, #ff6b35);
    text-decoration: none;
}

/* Hero Stats Row */
.index-hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.index-hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.index-hero-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
}

.index-hero-stat-value.accent {
    color: var(--accent-orange, #ff6b35);
}

.index-hero-stat-label {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .index-hero-section {
        padding: 24px 16px;
    }

    .index-hero-section h1 {
        font-size: 1.75rem;
    }

    .index-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .index-hero-search-box {
        flex-direction: column;
    }

    .index-hero-search-box .cta-button {
        width: 100%;
        justify-content: center;
    }

    .index-hero-stats-row {
        flex-wrap: wrap;
        gap: 24px;
    }

    .index-hero-stat-item {
        flex: 0 0 45%;
    }
}

/* ========================= */
/* Section Common            */
/* ========================= */

.index-section {
    background: var(--secondary-bg, #1a2332);
    border-radius: var(--border-radius, 16px);
    padding: 32px;
    margin-bottom: 24px;
}

.index-page > .index-section:last-child {
    margin-bottom: 0;
}

.index-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.index-section h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0;
}

/* ========================= */
/* Grades Table              */
/* ========================= */

.index-table-wrapper {
    overflow-x: auto;
}

.index-grades-table {
    width: 100%;
    border-collapse: collapse;
}

.index-grades-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #64748b);
    background: var(--primary-bg, #0a0f1c);
}

.index-grades-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.index-grades-table th:last-child {
    border-radius: 0 8px 8px 0;
}

.index-grades-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
}

.index-grades-table tbody tr:last-child td {
    border-bottom: none;
}

.index-grades-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.index-grade-name {
    font-weight: 600;
    font-size: 16px;
}

.index-grade-name a {
    color: var(--text-primary, #ffffff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.index-grade-name a:hover {
    color: var(--accent-orange, #ff6b35);
}

.index-grade-type {
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
}

.index-grade-gost {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-muted, #64748b);
    background: var(--primary-bg, #0a0f1c);
    padding: 4px 8px;
    border-radius: 4px;
}

.index-grade-offers {
    font-weight: 500;
    color: var(--accent-orange, #ff6b35);
}

.index-action-col {
    text-align: right;
    white-space: nowrap;
}

.index-grade-link {
    color: var(--accent-blue, #3b82f6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.index-grade-link:hover {
    color: var(--accent-orange, #ff6b35);
}

.index-grade-link i {
    font-size: 12px;
}

.index-empty-state {
    color: var(--text-muted, #64748b);
    text-align: center;
    padding: 32px;
}

/* Section Mobile */
@media (max-width: 768px) {
    .index-section {
        padding: 20px 16px;
    }

    .index-grades-table th,
    .index-grades-table td {
        padding: 12px 8px;
    }

    .hide-mobile {
        display: none;
    }

    .index-grade-type {
        font-size: 12px;
    }
}

/* ========================= */
/* Alphabet Navigation       */
/* ========================= */

.index-alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.index-alphabet-letter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--primary-bg, #0a0f1c);
    color: var(--text-primary, #ffffff);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.index-alphabet-letter-link:hover:not(.disabled),
.index-alphabet-letter-link.active {
    background: var(--accent-orange, #ff6b35);
    color: white;
}

.index-alphabet-letter-link.disabled {
    color: var(--text-muted, #64748b);
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button reset for filter buttons */
button.index-alphabet-letter-link {
    font-family: inherit;
    border: none;
}

/* Letter Groups */
.index-alphabet-grades {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.index-letter-group {
    /* For filter animation */
}

/* Letter Sections (legacy) */
.index-alphabet-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.index-alphabet-letter-section {
    scroll-margin-top: 100px;
}

.index-letter-header {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-orange, #ff6b35);
    display: inline-block;
}

/* Grade Chips */
.index-grades-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.index-grade-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-bg, #0a0f1c);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary, #ffffff);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.index-grade-chip:hover {
    background: transparent;
    border-color: var(--accent-orange, #ff6b35);
    color: var(--accent-orange, #ff6b35);
}

.index-chip-offers-count {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.index-grade-chip:hover .index-chip-offers-count {
    color: var(--accent-orange, #ff6b35);
    opacity: 0.8;
}

/* Show More Button */
.index-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.index-show-more-btn:hover {
    border-color: var(--accent-orange, #ff6b35);
    color: var(--accent-orange, #ff6b35);
}

.index-show-more-btn i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.index-show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Alphabet Mobile Responsive */
@media (max-width: 768px) {
    .index-alphabet-letter-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .index-grade-chip {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ========================= */
/* How It Works Section      */
/* ========================= */

.index-how-it-works-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.index-about-block p {
    color: var(--text-secondary, #94a3b8);
    font-size: 16px;
    line-height: 1.8;
}

.index-about-block strong {
    color: var(--accent-orange, #ff6b35);
}

/* Steps Block */
.index-steps-block h3,
.index-benefits-block h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary, #ffffff);
    display: flex;
    align-items: center;
    gap: 10px;
}

.index-steps-block h3 i,
.index-benefits-block h3 i {
    color: var(--accent-orange, #ff6b35);
}

.index-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.index-how-it-works-section .index-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary-bg, #0a0f1c);
    border-radius: 12px;
}

.index-how-it-works-section .index-step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-orange, #ff6b35);
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    margin: 0;
    box-shadow: none;
    position: static;
}

.index-how-it-works-section .index-step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 4px;
}

.index-how-it-works-section .index-step-content p {
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
}

/* Benefits Block */
.index-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.index-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary-bg, #0a0f1c);
    border-radius: 12px;
}

.index-how-it-works-section .index-benefit-icon {
    font-size: 20px;
    color: var(--accent-orange, #ff6b35);
    flex-shrink: 0;
    width: 24px;
    height: auto;
    background: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    text-align: center;
    position: static;
}

.index-how-it-works-section .index-benefit-icon::before {
    position: static;
    background: none;
    border-radius: 0;
    opacity: 1;
}

.index-benefit-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 4px;
}

.index-benefit-content p {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
}

/* How It Works Mobile */
@media (max-width: 768px) {
    .index-benefits-grid {
        grid-template-columns: 1fr;
    }

    .index-step-item {
        padding: 12px;
    }

    .index-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ========================= */
/* FAQ Section               */
/* ========================= */

.index-faq-section {
    scroll-margin-top: 80px; /* For anchor link from footer */
}

.index-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.index-faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.index-faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.index-faq-item.active {
    border-color: var(--accent-orange, #ff6b35);
}

.index-faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    color: var(--text-primary, #ffffff);
    transition: background 0.2s ease;
}

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

.index-faq-question:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.02);
}

.index-faq-question:focus-visible {
    outline: 2px solid var(--accent-orange, #ff6b35);
    outline-offset: -2px;
}

.index-faq-question-text {
    flex: 1;
}

.index-faq-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-bg, #0a0f1c);
    color: var(--text-muted, #64748b);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.index-faq-item.active .index-faq-icon {
    background: var(--accent-orange, #ff6b35);
    color: white;
    transform: rotate(180deg);
}

.index-faq-answer {
    padding: 0 24px 20px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
    font-size: 15px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.index-faq-answer p {
    margin-bottom: 12px;
}

.index-faq-answer p:last-child {
    margin-bottom: 0;
}

.index-faq-answer ul {
    margin: 12px 0;
    padding-left: 20px;
}

.index-faq-answer li {
    margin-bottom: 8px;
}

.index-faq-answer li:last-child {
    margin-bottom: 0;
}

.index-faq-item:not(.active) .index-faq-answer {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

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

/* FAQ Mobile */
@media (max-width: 768px) {
    .index-faq-question {
        padding: 16px;
        font-size: 15px;
    }

    .index-faq-answer {
        padding: 0 16px 16px;
        font-size: 14px;
    }

    .index-faq-icon {
        width: 24px;
        height: 24px;
    }

    .index-faq-icon i {
        font-size: 12px;
    }
}
