/*
Theme Name: Osservatorio Energia
Theme URI: https://example.com/osservatorio-energia
Author: Codex
Description: Tema editoriale WordPress ispirato a un osservatorio energia: homepage modulare, ricerca in header, pubblicita, box autore e infinite scroll.
Version: 1.0.2
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: osservatorio-energia
Tags: news, blog, customizer, featured-images, grid-layout
*/

:root {
  --oe-ink: #07172d;
  --oe-navy: #031326;
  --oe-blue: #064d9d;
  --oe-orange: #ff7900;
  --oe-green: #277a4b;
  --oe-muted: #5d6a7b;
  --oe-line: #e3e8ef;
  --oe-soft: #f4f6f8;
  --oe-paper: #ffffff;
  --oe-serif: Georgia, "Times New Roman", serif;
  --oe-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--oe-ink);
  background: var(--oe-paper);
  font-family: var(--oe-sans);
  line-height: 1.55;
}

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

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

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

.oe-container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.oe-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--oe-navy);
  color: #fff;
  box-shadow: 0 2px 18px rgba(2, 11, 24, .22);
}

.oe-header-inner {
  min-height: 90px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.oe-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.oe-brand-mark {
  width: 38px;
  height: 52px;
  color: var(--oe-orange);
}

.oe-brand-name {
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.oe-brand-sub {
  display: block;
  color: rgba(255,255,255,.82);
  font-size: 20px;
  line-height: 1.05;
}

.oe-nav {
  justify-self: center;
}

.oe-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oe-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 90px;
  border-bottom: 3px solid transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.oe-menu .current-menu-item > a,
.oe-menu .current_page_item > a,
.oe-menu a:hover {
  border-color: var(--oe-orange);
}

.oe-header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.oe-icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.oe-search-panel {
  display: none;
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0;
  background: #061b34;
}

.oe-search-panel.is-open {
  display: block;
}

.oe-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.oe-search-form input[type="search"] {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.25);
  background: #fff;
  padding: 0 16px;
  font-size: 16px;
}

.oe-button,
.oe-search-form button,
.oe-newsletter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--oe-orange);
  background: var(--oe-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.oe-button.is-outline {
  background: transparent;
}

.oe-hero {
  position: relative;
  min-height: 380px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(2, 12, 25, .92) 0%, rgba(2, 12, 25, .63) 42%, rgba(2, 12, 25, .08) 100%),
    var(--oe-hero-image, linear-gradient(135deg, #051628, #37607e 52%, #f7b05e));
  background-size: cover;
  background-position: center;
}

.oe-hero-card {
  min-height: 380px;
  display: grid;
  align-items: center;
}

.oe-hero-content {
  max-width: 700px;
  padding: 42px 0 46px;
}

.oe-hero .oe-kicker {
  margin: 0 0 16px;
  color: var(--oe-orange);
  font-size: 16px;
  font-family: var(--oe-sans);
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.oe-hero h1 {
  margin: 0 0 18px;
  font-family: var(--oe-serif);
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: 0;
}

.oe-hero .oe-hero-excerpt {
  max-width: 620px;
  margin: 0 0 24px;
  font-family: var(--oe-serif);
  font-size: 19px;
  line-height: 1.35;
}

.oe-trending {
  padding: 38px 0 28px;
  border-bottom: 1px solid var(--oe-line);
}

.oe-trending-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oe-trending-title,
.oe-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--oe-soft);
  font-size: 14px;
  font-weight: 700;
}

.oe-trending-title {
  border-radius: 4px;
  color: var(--oe-ink);
  text-transform: uppercase;
}

.oe-trending-title svg {
  color: var(--oe-orange);
}

.oe-section {
  padding: 30px 0;
}

.oe-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 28px;
}

.oe-section-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
}

.oe-section-link {
  color: var(--oe-blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.oe-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .95fr);
  gap: 30px;
}

.oe-feature-card {
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0b1a2e;
}

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

.oe-feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.76));
}

.oe-card-content {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.oe-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin: 0 0 14px;
  background: var(--oe-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.oe-label.is-orange {
  background: var(--oe-orange);
}

.oe-label.is-green {
  background: var(--oe-green);
}

.oe-card-title {
  margin: 0 0 12px;
  font-family: var(--oe-serif);
  font-size: 38px;
  line-height: 1.08;
}

.oe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--oe-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.oe-feature-card .oe-meta {
  color: #fff;
}

.oe-side-list {
  display: grid;
  gap: 22px;
}

.oe-side-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: start;
}

.oe-side-item img {
  width: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.oe-side-item h3 {
  margin: 0 0 8px;
  font-family: var(--oe-serif);
  font-size: 19px;
  line-height: 1.18;
}

.oe-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.oe-post-card {
  border: 1px solid var(--oe-line);
  background: #fff;
}

.oe-post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.oe-post-card .oe-card-content {
  padding: 18px;
  color: var(--oe-ink);
}

.oe-post-card h3 {
  margin: 0 0 12px;
  font-family: var(--oe-serif);
  font-size: 20px;
  line-height: 1.25;
}

.oe-newsletter {
  margin: 8px 0 20px;
  padding: 30px 52px;
  display: grid;
  grid-template-columns: auto 1fr 1.2fr;
  gap: 28px;
  align-items: center;
  background: var(--oe-navy);
  color: #fff;
}

.oe-newsletter svg {
  color: var(--oe-orange);
}

.oe-newsletter h2 {
  margin: 0;
  font-family: var(--oe-serif);
  font-size: 31px;
  line-height: 1.1;
}

.oe-newsletter form {
  display: grid;
  grid-template-columns: 1fr auto;
}

.oe-newsletter input {
  min-height: 50px;
  border: 0;
  padding: 0 16px;
  font-size: 15px;
}

.oe-ad {
  display: grid;
  place-items: center;
  min-height: 90px;
  margin: 24px 0;
  border: 1px dashed #b8c1cd;
  background: #f8fafc;
  color: #6b7684;
  text-align: center;
  font-size: 13px;
}

.oe-ad--leaderboard {
  min-height: 90px;
}

.oe-ad--rectangle {
  min-height: 250px;
}

.oe-site-main {
  padding: 36px 0 54px;
}

.oe-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.oe-page-title {
  margin: 0 0 26px;
  font-family: var(--oe-serif);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
}

.oe-single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 740px) 300px;
  gap: 52px;
  align-items: start;
}

.oe-single-header {
  margin-bottom: 28px;
}

.oe-single-title {
  margin: 12px 0 18px;
  font-family: var(--oe-serif);
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1;
}

.oe-single-featured {
  margin: 0 0 30px;
}

.oe-single-content {
  font-family: var(--oe-serif);
  font-size: 20px;
  line-height: 1.72;
}

.oe-single-content a {
  color: var(--oe-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.oe-single-content p {
  margin: 0 0 1.25em;
}

.oe-author-box {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  margin: 42px 0;
  padding: 24px;
  border-top: 4px solid var(--oe-orange);
  background: var(--oe-soft);
}

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

.oe-author-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.oe-next-post {
  display: block;
  width: 100%;
  margin: 34px 0 0;
  padding: 26px;
  background: var(--oe-navy);
  color: #fff;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.oe-next-post span {
  color: var(--oe-orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.oe-next-post h2 {
  margin: 8px 0 0;
  font-family: var(--oe-serif);
}

.oe-load-more {
  width: 100%;
  margin-top: 28px;
}

.oe-load-status {
  min-height: 24px;
  margin-top: 16px;
  color: var(--oe-muted);
  text-align: center;
}

.oe-site-footer {
  background: var(--oe-navy);
  color: #fff;
  padding: 24px 0;
}

.oe-footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.oe-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oe-footer-links a,
.oe-social a {
  color: rgba(255,255,255,.86);
  font-size: 12px;
  text-transform: uppercase;
}

.oe-social {
  display: flex;
  align-items: center;
  gap: 18px;
}

@media (max-width: 980px) {
  .oe-header-inner {
    grid-template-columns: 1fr auto;
  }

  .oe-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    padding-bottom: 18px;
  }

  .oe-nav.is-open {
    display: block;
  }

  .oe-menu {
    display: grid;
    gap: 0;
  }

  .oe-menu a {
    min-height: 42px;
  }

  .oe-lead-grid,
  .oe-single-wrap,
  .oe-newsletter {
    grid-template-columns: 1fr;
  }

  .oe-card-grid,
  .oe-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .oe-container {
    width: min(100% - 28px, 1120px);
  }

  .oe-header-inner {
    min-height: 76px;
    gap: 12px;
  }

  .oe-brand {
    min-width: 0;
  }

  .oe-brand-name,
  .oe-brand-sub {
    font-size: 15px;
  }

  .oe-hero {
    min-height: 320px;
  }

  .oe-hero-card {
    min-height: 320px;
  }

  .oe-hero h1 {
    font-size: 40px;
  }

  .oe-lead-grid,
  .oe-card-grid,
  .oe-archive-grid,
  .oe-side-item,
  .oe-footer-inner,
  .oe-author-box {
    grid-template-columns: 1fr;
  }

  .oe-side-item img {
    width: 100%;
  }

  .oe-newsletter {
    padding: 26px;
  }

  .oe-newsletter form,
  .oe-search-form {
    grid-template-columns: 1fr;
  }
}
