/* ============================================
   HOT ELEMENTAL — БЛОК «НАВЫКИ» НА ГЛАВНОЙ
   Карточки отраслей и окно «Что нового» (assets/js/skills.js,
   данные — /data/skills_updates.json). Оформление v2: панели и
   шрифт берутся из theme-v2.css (--v2-*), здесь только своё.
   ============================================ */

.skills-section {
    max-width: 1100px;
    margin: 50px auto;
    text-align: center;
}
.skills-section > h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0;
}
.skills-sub {
    color: #b9c4e0;
    margin: 0 auto 22px;
    max-width: 620px;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}
.skills-empty {
    grid-column: 1 / -1;
    padding: 30px;
    color: #b9c4e0;
}

/* Карточка отрасли — кнопка, чтобы открывалась и с клавиатуры */
.skill-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 20px 14px 16px;
    font: inherit;
    color: #e8eefc;
    text-align: center;
    cursor: pointer;
    background: var(--v2-panel, rgba(12, 22, 52, 0.88));
    border: 1px solid rgba(78, 205, 196, 0.35);
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px rgba(242, 194, 48, 0.12), 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.skill-card:hover, .skill-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--v2-gold, #f2c230);
    box-shadow: inset 0 0 0 1px rgba(242, 194, 48, 0.3), 0 0 22px rgba(242, 194, 48, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
    outline: none;
}
.skill-card img {
    width: 76px;
    height: 76px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
    transition: transform 0.25s;
}
.skill-card:hover img { transform: scale(1.08) rotate(-4deg); }
.skill-name {
    font-family: var(--v2-head, sans-serif);
    font-weight: 700;
    font-size: 1.25rem;
    color: #ffe08a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.skill-about {
    font-size: 0.88rem;
    color: #b9c4e0;
    line-height: 1.35;
}
.skill-meta {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.8rem;
    color: var(--v2-teal, #4ecdc4);
}
.skill-new {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2a1500;
    background: linear-gradient(180deg, #ffe08a, #f2a630);
    box-shadow: 0 0 10px rgba(242, 194, 48, 0.5);
}

/* Окно «Что нового» — поверх .modal / .modal-content из theme-v2.css */
.skill-modal .modal-content {
    max-width: 640px;
    width: 94%;
    text-align: left;
}
.skill-modal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 26px 6px 0;
}
.skill-modal-head img {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
html body .skill-modal .skill-modal-head h2 {
    margin: 0;
    text-align: left;
    font-size: 1.6rem;
    color: #ffe08a;
}
.skill-modal-head p {
    margin: 2px 0 0;
    color: #b9c4e0;
    font-size: 0.92rem;
}
.skill-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #e8eefc;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.skill-close:hover { color: var(--v2-gold, #f2c230); }
.skill-modal-title {
    margin: 10px 0 4px;
    font-family: var(--v2-head, sans-serif);
    color: var(--v2-teal, #4ecdc4);
    font-size: 1.05rem;
}
.skill-day {
    margin-top: 12px;
}
.skill-day-date {
    color: var(--v2-gold, #f2c230);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.skill-day ul {
    margin: 0;
    padding-left: 20px;
}
.skill-day li {
    margin: 5px 0;
    line-height: 1.5;
    color: #e8eefc;
}

/* Ссылка на страницу истории сайта под блоком */
.updates-link-row {
    text-align: center;
    margin: 26px 0 10px;
}

@media (max-width: 600px) {
    .skills-section > h2 { font-size: 1.6rem; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .skill-card { padding: 16px 8px 12px; border-radius: 18px; }
    .skill-card img { width: 58px; height: 58px; }
    .skill-name { font-size: 1.05rem; }
    .skill-about { font-size: 0.8rem; }
    .skill-modal-head img { width: 48px; height: 48px; flex-basis: 48px; }
    html body .skill-modal .skill-modal-head h2 { font-size: 1.3rem; }
}
