/*
Theme Name: Giornale Energia
Theme URI: https://example.com/giornale-energia
Author: Smart Italy Communications
Description: Tema editoriale WordPress per un magazine energia con homepage configurabile, pubblicita, ricerca e infinite scroll articoli.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: giornale-energia
*/

:root {
  --ge-bg: #0c0d0e;
  --ge-bg-soft: #141516;
  --ge-panel: #1c1d1e;
  --ge-panel-2: #252628;
  --ge-text: #f7f7f2;
  --ge-muted: #b8b8b2;
  --ge-soft: #797b7e;
  --ge-line: rgba(255, 255, 255, 0.12);
  --ge-yellow: #ffc400;
  --ge-yellow-2: #ffdd33;
  --ge-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  --ge-radius: 6px;
  --ge-wrap: 1320px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 22% 8%, rgba(255, 196, 0, 0.08), transparent 28%), var(--ge-bg);
  color: var(--ge-text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ge-yellow); }
img { display: block; max-width: 100%; height: auto; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.ge-wrap {
  width: min(calc(100% - 48px), var(--ge-wrap));
  margin: 0 auto;
}

.ge-topbar {
  border-bottom: 1px solid var(--ge-line);
  background: #090a0a;
  color: #f0f0ec;
  font-size: 13px;
}

.ge-topbar__inner,
.ge-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ge-topbar__inner { min-height: 52px; }
.ge-topbar nav ul,
.ge-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ge-social {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
}

.ge-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 11, 12, 0.94);
  border-bottom: 1px solid var(--ge-line);
  backdrop-filter: blur(14px);
}

.ge-header__inner { min-height: 112px; }
.ge-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  font-size: 31px;
  font-weight: 900;
  font-style: italic;
  color: #b9b9b9;
  letter-spacing: 0;
}

.ge-logo__mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 2px solid #606164;
  color: var(--ge-yellow);
  font-size: 28px;
  font-style: normal;
  line-height: 1;
}

.ge-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.ge-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 112px;
  border-bottom: 4px solid transparent;
}

.ge-nav .current-menu-item > a,
.ge-nav a:hover { border-bottom-color: var(--ge-yellow); }

.ge-search {
  position: relative;
  width: min(280px, 24vw);
}

.ge-search input[type="search"] {
  width: 100%;
  height: 42px;
  border: 1px solid var(--ge-line);
  border-radius: 0;
  background: #191a1b;
  color: #fff;
  padding: 0 46px 0 14px;
  outline: none;
}

.ge-search button {
  position: absolute;
  inset: 0 0 0 auto;
  width: 42px;
  border: 0;
  background: transparent;
  color: var(--ge-yellow);
  cursor: pointer;
}

.ge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 30px;
  background: var(--ge-yellow);
  color: #111;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  border: 0;
}

.ge-btn:hover { background: var(--ge-yellow-2); color: #111; }

.ge-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #151719;
}

.ge-hero::after,
.ge-card--image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.45));
}

.ge-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge-hero__content {
  position: relative;
  z-index: 2;
  width: min(760px, 90%);
  padding: 64px 0;
}

.ge-kicker {
  margin: 0 0 20px;
  color: var(--ge-yellow);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ge-hero h1 {
  margin: 0 0 24px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: 0;
}

.ge-hero p {
  max-width: 690px;
  margin: 0 0 34px;
  color: #f0f0ec;
  font-size: 20px;
}

.ge-section {
  padding: 58px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent);
}

.ge-section + .ge-section { padding-top: 12px; }

.ge-section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 26px;
  font-size: 26px;
  line-height: 1.2;
}

.ge-section-title::before {
  content: "";
  width: 5px;
  height: 36px;
  background: var(--ge-yellow);
}

.ge-grid-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.8fr) minmax(300px, 0.82fr);
  gap: 28px;
  align-items: start;
}

.ge-card {
  background: var(--ge-panel);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.ge-card--image {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: end;
  box-shadow: var(--ge-shadow);
}

.ge-card--image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge-card__body {
  position: relative;
  z-index: 2;
  padding: 28px;
}

.ge-card h2,
.ge-card h3,
.ge-card h4 {
  margin: 8px 0 12px;
  line-height: 1.16;
}

.ge-card h2 { font-size: 35px; }
.ge-card h3 { font-size: 22px; }
.ge-meta {
  color: var(--ge-muted);
  font-size: 13px;
}

.ge-stack {
  display: grid;
  gap: 20px;
}

.ge-mini {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  align-items: center;
}

.ge-mini img {
  width: 128px;
  aspect-ratio: 1.35;
  object-fit: cover;
}

.ge-news-panel {
  padding: 24px;
  background: #18191a;
  border-left: 1px solid var(--ge-line);
}

.ge-timeline {
  display: grid;
  gap: 0;
}

.ge-timeline article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ge-line);
}

.ge-timeline time {
  color: var(--ge-muted);
  font-size: 12px;
}

.ge-topics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.ge-topic-card {
  min-height: 360px;
  display: flex;
  align-items: end;
  position: relative;
  background: #1a1b1c;
  overflow: hidden;
}

.ge-topic-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.82));
}

.ge-topic-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge-topic-card__body {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.ge-topic-card h3 { margin: 12px 0; font-size: 22px; line-height: 1.2; }
.ge-topic-card p { color: var(--ge-muted); font-size: 14px; }

.ge-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 52px;
}

.ge-depth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
}

.ge-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 36px 0;
  border: 1px dashed rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
  color: var(--ge-muted);
  text-align: center;
  overflow: hidden;
}

.ge-ad--leaderboard { min-height: 90px; }
.ge-ad--rectangle { min-height: 250px; }
.ge-ad--mobile { min-height: 100px; display: none; }

.ge-newsletter {
  min-height: 390px;
  padding: 32px;
  background: linear-gradient(135deg, #202122, #111213);
  border: 1px solid var(--ge-line);
}

.ge-newsletter input {
  width: 100%;
  height: 52px;
  margin: 18px 0 10px;
  padding: 0 16px;
  border: 1px solid var(--ge-line);
  background: #333436;
  color: #fff;
}

.ge-post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.ge-article {
  background: #101112;
}

.ge-article__hero {
  min-height: 560px;
  display: flex;
  align-items: end;
  position: relative;
  overflow: hidden;
}

.ge-article__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), #101112 92%);
}

.ge-article__hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge-article__intro {
  position: relative;
  z-index: 2;
  padding: 90px 0 48px;
}

.ge-article h1 {
  max-width: 940px;
  margin: 0 0 18px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 1.08;
}

.ge-article__body {
  display: grid;
  grid-template-columns: minmax(0, 780px) 320px;
  gap: 64px;
  align-items: start;
  padding: 44px 0 80px;
}

.ge-content {
  color: #ededeb;
  font-size: 20px;
}

.ge-content p { margin: 0 0 1.45em; }
.ge-content a { color: var(--ge-yellow); text-decoration: underline; text-underline-offset: 3px; }
.ge-content h2, .ge-content h3 { line-height: 1.2; margin-top: 2em; }

.ge-author-box {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 20px;
  margin-top: 52px;
  padding: 26px;
  background: var(--ge-panel);
  border-left: 5px solid var(--ge-yellow);
}

.ge-author-box img { border-radius: 50%; }

.ge-sidebar {
  position: sticky;
  top: 140px;
  display: grid;
  gap: 24px;
}

.ge-next-article {
  padding: 22px;
  border: 1px solid var(--ge-line);
  background: var(--ge-panel);
}

.ge-loader {
  display: none;
  justify-content: center;
  padding: 28px;
  color: var(--ge-muted);
}

.ge-loader.is-active { display: flex; }

.ge-footer {
  padding: 56px 0 28px;
  background: #0a0b0b;
  border-top: 1px solid var(--ge-line);
}

.ge-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 48px;
}

.ge-footer ul {
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.ge-footer li { margin: 8px 0; color: var(--ge-muted); }
.ge-copyright { margin-top: 42px; color: var(--ge-soft); font-size: 13px; }

@media (max-width: 1180px) {
  .ge-header__inner { flex-wrap: wrap; padding: 20px 0; }
  .ge-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .ge-nav a { min-height: 54px; white-space: nowrap; }
  .ge-search { width: min(360px, 44vw); }
  .ge-grid-feature, .ge-two-col, .ge-article__body { grid-template-columns: 1fr; }
  .ge-news-panel, .ge-sidebar { position: static; }
  .ge-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .ge-wrap { width: min(calc(100% - 28px), var(--ge-wrap)); }
  .ge-topbar__inner { justify-content: center; }
  .ge-topbar nav { display: none; }
  .ge-header__inner { gap: 16px; }
  .ge-logo { min-width: auto; font-size: 24px; }
  .ge-search { width: 100%; }
  .ge-hero, .ge-article__hero { min-height: 520px; }
  .ge-hero p { font-size: 17px; }
  .ge-card--image { min-height: 360px; }
  .ge-grid-feature, .ge-depth-grid, .ge-footer__grid { grid-template-columns: 1fr; }
  .ge-topics, .ge-post-list { grid-template-columns: 1fr; }
  .ge-mini { grid-template-columns: 100px 1fr; }
  .ge-mini img { width: 100px; }
  .ge-content { font-size: 18px; }
  .ge-ad--mobile { display: flex; }
}
