/* ================================================================
   WIKI-TECH — Home templates 6–15
   Layout "Design Wikipedia" con miglioramenti moderni.
   Caricato dopo style.css; tutte le classi usano il prefisso .wt-
   ================================================================ */

.wt-home { animation: wtFadeIn .35s ease both; }
@keyframes wtFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wt-hero {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--mw-border);
    border-radius: 10px;
    padding: 34px 26px 28px;
    text-align: center;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.wt-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #3366cc, #8ab4f8, #d33);
}
.wt-hero h1 {
    font-family: var(--mw-serif);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}
.wt-hero h1 em { font-style: normal; color: var(--mw-primary); }
.wt-hero .wt-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mw-primary);
    background: #e8f1fd;
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 12px;
}
.wt-hero p { color: var(--mw-text-secondary); max-width: 680px; margin: 0 auto; }

.wt-search-form {
    display: flex;
    max-width: 620px;
    margin: 20px auto 0;
    border: 2px solid var(--mw-border-dark);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.wt-search-form input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px 16px;
    font-size: 16px;
    min-width: 0;
    background: #fff;
}
.wt-search-form button {
    border: none;
    background: var(--mw-primary);
    color: #fff;
    font-weight: 700;
    padding: 0 22px;
    cursor: pointer;
}
.wt-search-form button:hover { background: var(--mw-primary-hover); }

.wt-section { margin-top: 18px; }
.wt-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.wt-section-head h2 {
    font-family: var(--mw-serif);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wt-section-head h2 i { color: var(--mw-primary); font-size: 18px; }
.wt-section-head .wt-more { font-size: 13px; font-weight: 600; }

.wt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wt-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.wt-grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

.wt-card {
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-radius: 8px;
    padding: 16px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.wt-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #c8ccd1; }
.wt-card h3, .wt-card h4 { font-size: 16px; line-height: 1.35; margin-bottom: 6px; }
.wt-card h3 a, .wt-card h4 a { color: var(--mw-text); }
.wt-card h3 a:hover, .wt-card h4 a:hover { color: var(--mw-primary); text-decoration: none; }
.wt-card p { font-size: 13px; color: var(--mw-text-secondary); margin: 4px 0 10px; }
.wt-card .wt-meta { margin-top: auto; font-size: 11px; color: var(--mw-text-secondary); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wt-card .wt-card-icon { font-size: 20px; color: var(--mw-primary); margin-bottom: 8px; }

.wt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wt-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mw-text);
    transition: var(--transition);
}
.wt-chip:hover { background: #e8f1fd; border-color: var(--mw-primary); text-decoration: none; }
.wt-chip .wt-count { color: var(--mw-text-secondary); font-weight: 400; }

.wt-feature-large {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid var(--mw-border);
    border-left: 5px solid var(--mw-primary);
    border-radius: 8px;
    padding: 22px;
}
.wt-feature-large h2 { font-family: var(--mw-serif); font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.wt-feature-large p { color: var(--mw-text-secondary); font-size: 14px; }

.wt-portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.wt-portal-card {
    text-align: center;
    background: #fff;
    border: 1px solid var(--mw-border);
    border-radius: 10px;
    padding: 18px 12px;
    transition: var(--transition);
}
.wt-portal-card i { font-size: 26px; color: var(--mw-primary); margin-bottom: 8px; }
.wt-portal-card a { display: block; font-weight: 700; color: var(--mw-text); font-size: 14px; }
.wt-portal-card small { color: var(--mw-text-secondary); font-size: 11px; }
.wt-portal-card:hover { border-color: var(--mw-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.wt-stats-bar {
    display: flex;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-radius: 8px;
    margin-top: 14px;
}
.wt-stats-bar .wt-stat { text-align: center; }
.wt-stats-bar .wt-stat strong { display: block; font-size: 22px; color: var(--mw-primary); line-height: 1.1; }
.wt-stats-bar .wt-stat span { font-size: 12px; color: var(--mw-text-secondary); }

.wt-list { list-style: none; }
.wt-list li { padding: 8px 0; border-bottom: 1px dashed #eaecf0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.wt-list li:last-child { border-bottom: none; }
.wt-list a { font-weight: 600; }

.wt-timeline { position: relative; padding-left: 24px; }
.wt-timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--mw-border); }
.wt-timeline-item { position: relative; padding: 0 0 16px 4px; }
.wt-timeline-item::before { content: ""; position: absolute; left: -22px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--mw-primary); }
.wt-timeline-item time { font-size: 11px; color: var(--mw-text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.wt-timeline-item h4 { font-size: 15px; margin: 2px 0; }

.wt-dark {
    background: #101418;
    color: #e8eaed;
    border-radius: 12px;
    padding: 22px;
}
.wt-dark .wt-card, .wt-dark .wt-portal-card, .wt-dark .wt-feature-large {
    background: #1b2026;
    border-color: #343b44;
    color: #e8eaed;
}
.wt-dark .wt-card h3 a, .wt-dark .wt-card h4 a, .wt-dark .wt-portal-card a { color: #e8eaed; }
.wt-dark .wt-card p, .wt-dark .wt-hero p, .wt-dark .wt-meta, .wt-dark .wt-portal-card small { color: #aab4bf; }
.wt-dark .wt-hero { background: linear-gradient(180deg, #171c22, #101418); border-color: #343b44; }
.wt-dark .wt-hero h1 { color: #fff; }
.wt-dark .wt-search-form { border-color: #3d4650; background: #1b2026; }
.wt-dark .wt-search-form input[type="search"] { background: #1b2026; color: #fff; }
.wt-dark .wt-section-head h2 { color: #fff; }
.wt-dark .wt-list li { border-color: #2a3038; }
.wt-dark .wt-chip { background: #1b2026; border-color: #343b44; color: #e8eaed; }
.wt-dark .wt-chip:hover { background: #26303a; }

.wt-magazine { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.wt-magazine-main { min-width: 0; }
.wt-magazine-side { min-width: 0; }
.wt-magazine .wt-feature-large { min-height: 100%; }
.wt-editorial { font-family: var(--mw-serif); }

.wt-classic-box {
    background: #fff;
    border: 1px solid var(--mw-border);
    border-radius: 3px;
    padding: 14px;
    margin-bottom: 12px;
}
.wt-classic-box h3 {
    font-family: var(--mw-serif);
    font-size: 16px;
    border-bottom: 1px solid var(--mw-border);
    padding-bottom: 6px;
    margin-bottom: 8px;
    color: #3366cc;
}
.wt-classic-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wt-classic-serif { font-family: var(--mw-serif); font-size: 15px; line-height: 1.75; }

.wt-focus-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.wt-toc { background: #f8f9fa; border: 1px solid var(--mw-border-dark); border-radius: 6px; padding: 14px; font-size: 13px; }
.wt-toc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.wt-toc a { display: block; padding: 4px 0; }

.wt-ai-answer {
    background: linear-gradient(120deg, #eef4ff, #ffffff);
    border: 1px solid #c9d9f5;
    border-radius: 10px;
    padding: 18px;
    font-size: 14px;
}
.wt-ai-answer strong { color: var(--mw-primary); }

.wt-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a5a1d;
    background: #fdf3e7;
    border-radius: 20px;
    padding: 4px 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .wt-magazine, .wt-focus-grid, .wt-classic-columns { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .wt-hero { padding: 24px 16px 20px; border-radius: 8px; }
    .wt-hero h1 { font-size: 28px; }
    .wt-search-form { flex-direction: column; border-radius: 8px; }
    .wt-search-form input[type="search"] { padding: 12px 14px; }
    .wt-search-form button { padding: 12px 14px; }
    .wt-grid, .wt-grid-4 { grid-template-columns: 1fr; }
    .wt-stats-bar { gap: 20px; }
    .wt-portal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
