/* News Section */
.news-section {
    padding: 4rem 0;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.news-main {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.news-sidebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Make entire news item clickable */
.news-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    color: inherit;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.6s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.news-item:hover::before {
    left: 100%;
}

.news-item.featured {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    grid-column: 1 / -1;
    position: relative;
}

.news-item.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item.featured:hover::after {
    opacity: 1;
}

.news-item.featured:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.news-item time {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: block;
}

.news-item.featured time {
    color: rgba(255, 255, 255, 0.8);
}

.news-item h3,
.news-item h4 {
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.news-item:hover h3,
.news-item:hover h4 {
    color: var(--primary-color);
}

.news-item.featured h3,
.news-item.featured h4,
.news-item.featured p {
    color: white;
    position: relative;
    z-index: 2;
}

/* Remove individual links since entire card is clickable */
.news-link {
    display: none;
}

/* Add arrow indicator for clickable cards */
.news-item::after {
    content: '→';
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.news-item:hover::after {
    color: var(--primary-color);
    transform: translateX(5px);
    opacity: 1;
}

.news-item.featured::after {
    color: rgba(255, 255, 255, 0.8);
}

.news-item.featured:hover::after {
    color: white;
    transform: translateX(8px);
}

/* Sidebar news items specific styles */
.news-sidebar .news-item {
    padding: 1.25rem;
}

.news-sidebar .news-item:hover {
    transform: translateY(-3px);
}

/* Quick Start Section */
.quick-start-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.quick-start-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.quick-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.quick-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.quick-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Floating cards */

.hero-visual {
    position: relative;
    padding: 2rem 0;
    perspective: 900px;
}

.floating-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.card-item {
    text-decoration: none;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.4rem 1rem;
    min-height: 90px;
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, .12));
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition:
        box-shadow .35s ease,
        filter .35s ease;
}

.card-item:hover,
.card-item:focus-visible {
    box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
    filter: brightness(1.08) saturate(1.1);
    z-index: 5;
    outline: none;
}

.floating-cards:hover .card-item:not(:hover) {
    filter: brightness(.96) blur(.3px);
}

.card-item.grammar {
    background: linear-gradient(135deg, #f2994a, #eb5757);
}

/* оранжевый → красный */
.card-item.reading {
    background: linear-gradient(135deg, #f2c94c, #f2994a);
}

/* жёлтый → оранжевый */
.card-item.tests {
    background: linear-gradient(135deg, #a8d84a, #4caf50);
}

/* лайм → зелёный */
.card-item.phonetics {
    background: linear-gradient(135deg, #56ccf2, #2d9cdb);
}

/* голубой → синий */
.card-item.vocabulary {
    background: linear-gradient(135deg, #b06ab3, #7b2ff7);
}

/* сиреневый → фиолетовый */
.card-item.speaking {
    background: linear-gradient(135deg, #ee5a6f, #c0392b);
}

/* розово-красный → терракота */
.card-item.games {
    background: linear-gradient(135deg, #6dd5a3, #219653);
}

/* мятный → изумруд */
.card-item.listening {
    background: linear-gradient(135deg, #5b8def, #2f4b9b);
}

/* синий → индиго */
.card-item.phrasebook {
    background: linear-gradient(135deg, #c084fc, #7e22ce);
}

/* лаванда → пурпур */

/* ===== Мобильная версия ===== */
@media (hover: none) and (pointer: coarse) {
    .floating-cards:hover .card-item:not(:hover) {
        filter: none;
    }
}

@media (max-width: 768px) {
    .floating-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }

    .card-item {
        padding: 1.1rem .75rem;
        min-height: 80px;
        font-size: .9rem;
    }
}

@media (max-width: 480px) {
    .floating-cards {
        grid-template-columns: 1fr;
    }

    .card-item {
        padding: 1rem;
        min-height: auto;
    }
}

/* Features Grid */
.features-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.feature-link:hover {
    color: var(--primary-dark);
}

/* Responsive Design for News Section */
@media (max-width: 768px) {
    .news-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-sidebar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-item.featured {
        grid-column: 1;
    }

    .news-item::after {
        top: 1rem;
        right: 1rem;
    }
}