/*
Theme Name: NotiziaLive News Pro
Theme URI: https://example.com/notizialive-news-pro
Author: ChatGPT
Description: Tema magazine per testate online, con modalità chiara/scura e meteo in top bar.
Version: 1.0
Text Domain: notizialive
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background-color: #0b1120;
    color: #e5e7eb;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at top, #1d4ed8 0, #020617 55%); }
.site-main { flex: 1; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.top-bar { background: rgba(15, 23, 42, 0.95); border-bottom: 1px solid rgba(148, 163, 184, 0.2); color: #9ca3af; font-size: 0.85rem; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.35rem 0; gap: 0.5rem; flex-wrap: wrap; }
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.top-bar-highlight { font-weight: 600; color: #bfdbfe; text-transform: uppercase; letter-spacing: 0.04em; }
.top-bar-tag { padding: 0.1rem 0.6rem; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.4); font-size: 0.7rem; text-transform: uppercase; }
.top-bar-link { opacity: 0.85; }
.top-bar-link:hover { opacity: 1; }

.top-bar-weather {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}
.top-bar-weather-icon { font-size: 0.9rem; }
.top-bar-weather-label { font-size: 0.8rem; }

.site-header { background: rgba(15, 23, 42, 0.98); border-bottom: 1px solid rgba(148, 163, 184, 0.28); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(18px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0.9rem 0; }
.site-branding { display: flex; align-items: center; gap: 0.8rem; }
.site-logo-circle { width: 40px; height: 40px; border-radius: 999px; background: conic-gradient(from 220deg, #1d4ed8, #22c55e, #eab308, #1d4ed8); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(56, 189, 248, 0.45); }
.site-logo-circle span { background: #020617; width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; color: #e5e7eb; }
.site-title-group { display: flex; flex-direction: column; gap: 0.1rem; }
.site-title { font-size: 1.35rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.site-description { font-size: 0.8rem; color: #9ca3af; }

.main-navigation { display: flex; align-items: center; gap: 1.5rem; }
.main-navigation ul { display: flex; align-items: center; gap: 1.3rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; }
.main-navigation li a { padding-bottom: 0.4rem; border-bottom: 2px solid transparent; opacity: 0.85; }
.main-navigation li a:hover, .main-navigation .current-menu-item > a { border-color: #3b82f6; opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.search-toggle { border: none; background: transparent; cursor: pointer; font-size: 1.1rem; opacity: 0.8; }
.search-toggle:hover { opacity: 1; }

.theme-toggle {
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.theme-toggle span { font-size: 1rem; }

.btn-subscribe {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.8);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    color: #e5e7eb;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.menu-toggle { display: none; border: 1px solid rgba(148, 163, 184, 0.6); background: rgba(15, 23, 42, 0.9); border-radius: 999px; padding: 0.35rem 0.7rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.09em; }
.menu-toggle span { margin-left: 0.4rem; font-size: 1rem; }
.main-navigation-mobile { display: none; border-top: 1px solid rgba(148, 163, 184, 0.25); background: rgba(15, 23, 42, 0.98); }
.main-navigation-mobile ul { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.75rem 0; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.07em; }
.main-navigation-mobile li a { display: block; padding: 0.2rem 0; opacity: 0.9; }
.main-navigation-mobile li a:hover { color: #bfdbfe; }
.main-navigation-mobile.is-open { display: block; }

.breaking-bar { background: linear-gradient(90deg, rgba(220, 38, 38, 0.96), rgba(248, 113, 113, 0.95)); color: #fef2f2; font-size: 0.85rem; border-bottom: 1px solid rgba(248, 250, 252, 0.12); overflow: hidden; }
.breaking-inner { display: flex; align-items: center; gap: 1rem; padding: 0.35rem 0; }
.breaking-label { font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; white-space: nowrap; }
.breaking-label::before { content: "●"; margin-right: 0.45rem; font-size: 0.7rem; }
.breaking-track { overflow: hidden; flex: 1; }
.breaking-list { display: inline-flex; gap: 1.8rem; white-space: nowrap; animation: breaking-scroll 40s linear infinite; }
.breaking-item a { opacity: 0.92; }
.breaking-item a:hover { opacity: 1; text-decoration: underline; }
@keyframes breaking-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.content-area { padding: 1.5rem 0 2rem; }
.hero { padding: 1.5rem 0 0.5rem; }
.hero-grid { display: grid; grid-template-columns: 2fr 1.1fr; gap: 1.5rem; align-items: stretch; }

.hero-main { position: relative; border-radius: 1.25rem; overflow: hidden; background: radial-gradient(circle at top, rgba(37, 99, 235, 0.3), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(148, 163, 184, 0.3); box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9); }
.hero-main-inner { display: grid; grid-template-columns: 1.5fr 1.3fr; height: 100%; }
.hero-media { position: relative; min-height: 220px; overflow: hidden; }
.hero-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(15, 23, 42, 0.85)); z-index: 1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
.hero-category { position: absolute; left: 1.1rem; top: 1.1rem; z-index: 2; padding: 0.25rem 0.75rem; border-radius: 999px; background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(148, 163, 184, 0.6); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: #bfdbfe; }
.hero-meta-chip { position: absolute; left: 1.1rem; bottom: 1.1rem; z-index: 2; padding: 0.2rem 0.7rem; border-radius: 999px; background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(148, 163, 184, 0.5); font-size: 0.7rem; display: flex; align-items: center; gap: 0.45rem; color: #e5e7eb; }
.hero-meta-dot { width: 4px; height: 4px; border-radius: 999px; background: #22c55e; }

.hero-content { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; justify-content: space-between; }
.hero-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: #93c5fd; font-weight: 700; }
.hero-title { font-size: 1.45rem; line-height: 1.25; font-weight: 800; }
.hero-excerpt { font-size: 0.9rem; color: #cbd5f5; margin-top: 0.2rem; }
.hero-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.3rem; font-size: 0.8rem; color: #9ca3af; flex-wrap: wrap; }
.hero-meta-left { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.hero-author { display: flex; align-items: center; gap: 0.4rem; }
.hero-author-avatar { width: 22px; height: 22px; border-radius: 999px; background: radial-gradient(circle at 30% 0, #22c55e, #1d4ed8); display: inline-flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: #e5e7eb; }
.hero-cta { margin-top: 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.hero-cta a { padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; border: 1px solid rgba(148, 163, 184, 0.6); background: rgba(15, 23, 42, 0.9); }

.hero-secondary-list { display: flex; flex-direction: column; gap: 0.75rem; }
.hero-secondary-card { border-radius: 0.9rem; padding: 0.8rem 0.9rem; background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(148, 163, 184, 0.25); display: grid; grid-template-columns: 1.6fr 1fr; gap: 0.7rem; align-items: center; }

.content-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.95fr); gap: 1.75rem; align-items: flex-start; }

.section-title { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.18em; color: #9ca3af; margin-bottom: 0.6rem; }

.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.posts-grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-card { border-radius: 1rem; overflow: hidden; background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(148, 163, 184, 0.25); display: flex; flex-direction: column; min-height: 100%; }
.post-card-thumb { position: relative; min-height: 150px; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); }
.post-card-body { padding: 0.85rem 0.95rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.post-card-category { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: #93c5fd; }
.post-card-title { font-size: 1rem; font-weight: 700; }
.post-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.15rem; font-size: 0.75rem; color: #6b7280; flex-wrap: wrap; }
.post-card-meta .reading-time { font-style: italic; }
.post-card-excerpt { margin-top: 0.25rem; font-size: 0.85rem; color: #9ca3af; }
.post-card-footer { margin-top: 0.5rem; display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: #6b7280; }
.post-card-readmore { text-transform: uppercase; letter-spacing: 0.13em; font-weight: 600; font-size: 0.75rem; color: #bfdbfe; }
.post-card-badge { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid rgba(234, 179, 8, 0.8); color: #facc15; }

.highlight-sections { margin-top: 1.6rem; margin-bottom: 0.3rem; }
.highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.highlight-block { border-radius: 1rem; background: rgba(15, 23, 42, 0.96); border: 1px solid rgba(148, 163, 184, 0.32); padding: 0.85rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.highlight-header { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin-bottom: 0.1rem; }
.highlight-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em; color: #9ca3af; }
.highlight-viewall { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; }

.sidebar { position: sticky; top: 4.5rem; }
.widget { border-radius: 1rem; background: rgba(15, 23, 42, 0.92); border: 1px solid rgba(148, 163, 184, 0.3); padding: 0.9rem 1rem; margin-bottom: 0.9rem; }
.widget-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.16em; color: #9ca3af; margin-bottom: 0.6rem; }
.widget-highlight { background: radial-gradient(circle at top, rgba(34, 197, 94, 0.2), rgba(15, 23, 42, 0.98)); border-color: rgba(34, 197, 94, 0.6); }

.single-hero { padding: 1.7rem 0 0; }
.single-category { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; color: #93c5fd; margin-bottom: 0.3rem; }
.single-title { font-size: 1.9rem; line-height: 1.2; font-weight: 800; margin-bottom: 0.5rem; }
.single-meta { font-size: 0.85rem; color: #9ca3af; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.single-meta-dot { width: 3px; height: 3px; border-radius: 999px; background: #4b5563; }
.single-meta-reading { font-style: italic; }
.single-cover { margin-top: 1.2rem; border-radius: 1.2rem; overflow: hidden; border: 1px solid rgba(148, 163, 184, 0.4); box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95); }

.single-content-wrapper { margin-top: 1.35rem; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: flex-start; }
.single-content { font-size: 1rem; color: #e5e7eb; }
.single-content p + p { margin-top: 0.75rem; }

.single-meta-box { border-radius: 1rem; padding: 0.9rem 1rem; background: rgba(15, 23, 42, 0.95); border: 1px solid rgba(148, 163, 184, 0.4); font-size: 0.9rem; color: #9ca3af; }

.related-posts { margin-top: 1.6rem; }

.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 1.2rem; font-size: 0.85rem; }
.pagination a, .pagination span { padding: 0.3rem 0.65rem; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.5); }
.pagination .current { background: linear-gradient(135deg, #2563eb, #0ea5e9); border-color: transparent; color: #e5e7eb; }

.site-footer { margin-top: auto; border-top: 1px solid rgba(148, 163, 184, 0.4); background: rgba(15, 23, 42, 0.98); padding: 1.3rem 0 1.2rem; font-size: 0.85rem; color: #9ca3af; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; justify-content: space-between; }

.header-search-panel { display: none; background: rgba(15, 23, 42, 0.97); border-top: 1px solid rgba(148, 163, 184, 0.3); }
.header-search-panel-inner { padding: 0.7rem 0; }
.header-search-form { display: flex; gap: 0.7rem; align-items: center; }
.header-search-form input[type="search"] { flex: 1; padding: 0.45rem 0.7rem; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.6); background: #020617; color: #e5e7eb; }
.header-search-form button { padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid rgba(59, 130, 246, 0.8); background: linear-gradient(135deg, #1d4ed8, #0ea5e9); color: #e5e7eb; }

.archive-header { padding: 1.4rem 0 0.8rem; }
.archive-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.15rem; }

/* LIGHT THEME */
body.theme-light {
    background-color: #f3f4f6;
    color: #111827;
}
body.theme-light .site-wrapper {
    background: linear-gradient(to bottom, #e5e7eb, #f9fafb);
}
body.theme-light .top-bar {
    background: #f9fafb;
    color: #4b5563;
    border-bottom-color: #e5e7eb;
}
body.theme-light .site-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: #e5e7eb;
}
body.theme-light .site-title { color: #111827; }
body.theme-light .site-description { color: #6b7280; }
body.theme-light .main-navigation li a { color: #111827; }
body.theme-light .header-actions .search-toggle { color: #4b5563; }
body.theme-light .theme-toggle { background: #f9fafb; border-color: #e5e7eb; color: #111827; }
body.theme-light .btn-subscribe { background: linear-gradient(135deg, #2563eb, #3b82f6); }
body.theme-light .main-navigation-mobile { background: #ffffff; border-top-color: #e5e7eb; }
body.theme-light .header-search-panel { background: #ffffff; border-top-color: #e5e7eb; }
body.theme-light .header-search-form input[type="search"] { background: #f3f4f6; border-color: #e5e7eb; color: #111827; }

body.theme-light .hero-main {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.09);
}
body.theme-light .hero-media::before { background: linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0)); }
body.theme-light .hero-content { color: #111827; }
body.theme-light .hero-excerpt { color: #4b5563; }

body.theme-light .hero-secondary-card {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 12px 30px rgba(148, 163, 184, 0.18);
}

body.theme-light .highlight-block {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 14px 35px rgba(148, 163, 184, 0.16);
}

body.theme-light .post-card {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 18px 40px rgba(148, 163, 184, 0.2);
}
body.theme-light .post-card-excerpt { color: #4b5563; }
body.theme-light .post-card-meta { color: #6b7280; }
body.theme-light .post-card-footer { color: #6b7280; }

body.theme-light .widget {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 18px 40px rgba(148, 163, 184, 0.2);
}

body.theme-light .single-cover {
    box-shadow: 0 22px 60px rgba(148, 163, 184, 0.35);
    border-color: #e5e7eb;
}
body.theme-light .single-meta-box {
    background: #ffffff;
    border-color: #e5e7eb;
}
body.theme-light .single-content {
    color: #111827;
}

body.theme-light .site-footer {
    background: #f9fafb;
    color: #6b7280;
    border-top-color: #e5e7eb;
}

body.theme-light .breaking-bar {
    background: linear-gradient(90deg, #f97316, #facc15);
    color: #111827;
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-main-inner { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .single-content-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-navigation { display: none; }
    .header-actions { display: none; }
    .menu-toggle { display: inline-flex; align-items: center; }
    .posts-grid, .posts-grid.dense { grid-template-columns: 1fr; }
}
