/*
Theme Name: BitPratico
Theme URI: https://bitpratico.local
Author: BitPratico
Description: Tema editoriale premium per guide, notizie, AI, sicurezza, software e hardware.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: bitpratico
*/

:root {
  --bg: #eef3f8;
  --paper: #ffffff;
  --ink: #101820;
  --muted: #65717e;
  --line: #dfe5ea;
  --cyan: #00a6ff;
  --cyan-dark: #0077c8;
  --lime: #b7ff16;
  --graphite: #07111b;
  --shadow: 0 20px 60px rgba(8, 20, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 166, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f8 34%, #e9f0f6 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 78px;
  padding: 0 42px;
  background: rgba(248, 251, 255, 0.96);
  border-top: 4px solid var(--cyan);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(8, 20, 32, 0.07);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 30px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  background: linear-gradient(135deg, #009dff, #04d5ff);
  border-radius: 7px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 166, 255, 0.28);
}

.brand strong,
.nav a:hover {
  color: var(--cyan);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.nav li {
  list-style: none;
}

.nav a {
  padding: 28px 0;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.admin-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 5px;
  background: var(--cyan);
  color: white;
  font-size: 14px;
  font-weight: 900;
}

.wrap {
  width: min(1440px, calc(100% - 84px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  padding: 36px 0 30px;
}

.hero-feature {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  min-height: 460px;
  overflow: hidden;
  color: white;
  background: var(--graphite);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 50px;
  background: linear-gradient(90deg, rgba(7, 17, 27, 1) 0%, rgba(7, 17, 27, 0.94) 74%, rgba(7, 17, 27, 0.08) 100%);
}

.hero-copy time,
.post-date {
  color: #9eacbb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 4.2vw, 66px);
  line-height: 0.98;
  font-weight: 900;
}

.hero-copy p {
  max-width: 530px;
  margin: 0 0 32px;
  color: #d4dde7;
  font-size: 18px;
  line-height: 1.55;
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.latest {
  align-self: stretch;
  padding: 22px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(198, 211, 225, 0.75);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(8, 20, 32, 0.06);
}

.section-title,
.latest h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.latest h2::after,
.section-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 12px;
  background: var(--cyan);
}

.latest article {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.latest h3 {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.35;
}

.category-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 14px 34px rgba(8, 20, 32, 0.05);
}

.category-bar a {
  display: grid;
  place-items: center;
  min-height: 62px;
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease;
}

.category-bar a:hover {
  background: #eef8ff;
  color: var(--cyan-dark);
}

.category-bar a:first-child {
  color: var(--cyan-dark);
  box-shadow: inset 0 -4px 0 var(--cyan);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 18px;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(8, 20, 32, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 166, 255, 0.45);
  box-shadow: 0 20px 44px rgba(8, 20, 32, 0.11);
}

.post-thumb {
  height: 150px;
  background:
    radial-gradient(circle at 78% 28%, rgba(183,255,22,0.32), transparent 24%),
    linear-gradient(135deg, rgba(0, 166, 255, 0.86), rgba(21, 91, 117, 0.78) 48%, rgba(21, 80, 34, 0.72)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 14px),
    #07111b;
}

.post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.post-card h2,
.post-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.2;
}

.post-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.post-meta strong {
  color: var(--cyan-dark);
  text-transform: uppercase;
}

.ad-slot {
  margin: 38px 0;
  padding: 28px;
  color: #c6d0dc;
  background:
    linear-gradient(110deg, rgba(7, 17, 27, 0.95), rgba(7, 17, 27, 0.82)),
    var(--graphite);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.ad-slot strong {
  display: block;
  margin-bottom: 6px;
  color: var(--lime);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 320px;
  gap: 54px;
  padding: 54px 0 78px;
}

.article h1 {
  margin: 16px 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
}

.article .lead {
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.article-content {
  margin-top: 32px;
  font-size: 19px;
  line-height: 1.75;
}

.article-content h2 {
  margin: 38px 0 10px;
  font-size: 30px;
  line-height: 1.15;
}

.sidebar-box {
  margin-bottom: 26px;
  padding: 22px;
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(8, 20, 32, 0.05);
}

.sidebar-box p {
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--cyan-dark);
  font-weight: 900;
}

.sidebar-ad {
  border-color: rgba(0, 166, 255, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 42px 42px;
  color: var(--muted);
  background: #07111b;
  color: #aeb9c5;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer a,
.section-head a {
  color: var(--cyan-dark);
  font-weight: 900;
}

.home .wrap,
.blog .wrap {
  position: relative;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr;
    padding: 18px 24px;
  }

  .nav {
    justify-content: start;
    flex-wrap: wrap;
  }

  .hero,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero-feature {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    background: var(--graphite);
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 28px, 1440px);
  }

  .site-header {
    position: static;
  }

  .brand {
    font-size: 24px;
  }

  .nav {
    gap: 14px;
    font-size: 13px;
  }

  .hero-copy {
    padding: 34px 24px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .category-bar,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .site-footer {
    flex-direction: column;
  }

  .site-footer {
    padding: 24px 18px 34px;
  }
}
