/*
Theme Name: Energia24Notizie
Theme URI: https://energia24notizie.it/
Author: Smart Italy Communications
Description: Tema editoriale WordPress per un magazine energia, mercati e sostenibilita, con homepage configurabile, pubblicita e lettura continua.
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: energia24notizie
*/

:root {
  --e24-blue: #071f41;
  --e24-blue-2: #0b2d56;
  --e24-orange: #ff6a00;
  --e24-orange-2: #ff7b1a;
  --e24-ink: #07182f;
  --e24-muted: #65748b;
  --e24-line: #dfe7f1;
  --e24-soft: #f5f8fb;
  --e24-white: #ffffff;
  --e24-radius: 8px;
  --e24-shadow: 0 14px 34px rgba(7, 31, 65, .09);
  --e24-width: 1220px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--e24-ink);
  background: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

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

a:hover,
a:focus {
  color: var(--e24-orange);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(223, 231, 241, .8);
  backdrop-filter: blur(14px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  min-width: 236px;
  color: var(--e24-blue);
  font-weight: 900;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0;
}

.site-logo .bolt,
.section-title .bolt,
.footer-logo .bolt {
  color: var(--e24-orange);
  font-weight: 950;
  margin-right: 2px;
}

.site-logo .brand-orange,
.footer-logo .brand-orange {
  color: var(--e24-orange);
}

.site-logo .brand-small,
.footer-logo .brand-small {
  font-size: .74em;
  font-weight: 850;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 800;
}

.primary-nav ul,
.footer-columns ul {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.icon-button,
.menu-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: var(--e24-blue);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.newsletter-button,
.hero-button,
.newsletter-submit,
.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--e24-orange);
  border: 1px solid var(--e24-orange);
  border-radius: 4px;
  font-weight: 850;
  cursor: pointer;
}

.newsletter-button {
  color: var(--e24-orange);
  background: #ffffff;
}

.login-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--e24-blue);
  font-weight: 800;
  font-size: 14px;
}

.menu-toggle {
  display: none;
}

.search-panel {
  display: none;
  padding: 0 0 22px;
}

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

.header-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 760px;
  margin-left: auto;
}

.header-search input[type="search"],
.newsletter-form input[type="email"],
.search-page-form input[type="search"],
.comment-form input,
.comment-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--e24-ink);
  background: #ffffff;
  border: 1px solid var(--e24-line);
  border-radius: 4px;
  font: inherit;
}

.header-search button,
.search-page-form button {
  min-height: 48px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--e24-blue);
  border: 0;
  border-radius: 4px;
  font-weight: 850;
}

.hero {
  position: relative;
  min-height: 430px;
  margin-top: 28px;
  overflow: hidden;
  color: #ffffff;
  background: var(--e24-blue);
  border-radius: var(--e24-radius);
  box-shadow: var(--e24-shadow);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(7, 31, 65, .92) 0%, rgba(7, 31, 65, .66) 38%, rgba(7, 31, 65, .12) 78%);
}

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

.hero-content {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  width: min(620px, 70%);
  flex-direction: column;
  justify-content: center;
  padding: 58px;
}

.eyebrow,
.card-category,
.list-category {
  color: var(--e24-orange);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.card-category,
.section-card .card-category {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 10px;
  color: #ffffff;
  background: var(--e24-orange);
  border-radius: 3px;
}

.hero-title {
  max-width: 560px;
  margin: 16px 0 14px;
  color: #ffffff;
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: .98;
  letter-spacing: 0;
}

.hero-excerpt {
  max-width: 500px;
  margin: 0 0 24px;
  font-size: 18px;
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.hero-dash {
  width: 28px;
  height: 6px;
  background: var(--e24-orange);
  border-radius: 8px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.article-card,
.section-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--e24-line);
  border-radius: var(--e24-radius);
  box-shadow: 0 8px 24px rgba(7, 31, 65, .05);
}

.article-card-image,
.section-card-image {
  position: relative;
  min-height: 156px;
  background: var(--e24-soft);
}

.article-card-image img,
.section-card-image img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.article-card-image .card-category,
.section-card-image .card-category {
  position: absolute;
  top: 12px;
  left: 12px;
}

.card-body {
  padding: 20px;
}

.card-title {
  margin: 0 0 10px;
  color: var(--e24-blue);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.card-excerpt {
  margin: 0 0 18px;
  color: #24324a;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #2f3f55;
  font-size: 14px;
}

.ad-slot {
  display: flex;
  width: 100%;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  margin: 32px 0;
  padding: 14px;
  color: #6a7890;
  background: repeating-linear-gradient(135deg, #f4f7fb 0, #f4f7fb 10px, #edf2f8 10px, #edf2f8 20px);
  border: 1px dashed #c7d4e4;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}

.ad-slot.is-empty::before {
  content: attr(data-size);
}

.ad-home-leaderboard {
  min-height: 120px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 46px 0 18px;
}

.section-title {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--e24-blue);
  font-size: 27px;
  line-height: 1.1;
  text-transform: uppercase;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--e24-blue);
  font-weight: 850;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 34px;
  border-top: 1px solid var(--e24-line);
}

.latest-item {
  display: grid;
  grid-template-columns: 124px 1fr auto;
  gap: 16px;
  min-height: 116px;
  padding: 18px 0;
  border-bottom: 1px solid var(--e24-line);
}

.latest-item:nth-child(odd) {
  padding-right: 18px;
  border-right: 1px solid var(--e24-line);
}

.latest-item img {
  width: 124px;
  height: 92px;
  object-fit: cover;
  border-radius: 4px;
}

.latest-item h3 {
  margin: 4px 0 5px;
  color: var(--e24-blue);
  font-size: 18px;
  line-height: 1.18;
}

.latest-item p {
  margin: 0;
  color: #354259;
  font-size: 14px;
}

.latest-time {
  color: #66758b;
  font-size: 13px;
  text-align: right;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 44px;
}

.section-card .card-title {
  font-size: 23px;
}

.section-links {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.section-links li {
  position: relative;
  margin: 9px 0;
  padding-left: 15px;
  color: #25354b;
  font-size: 14px;
}

.section-links li::before {
  position: absolute;
  left: 0;
  color: var(--e24-orange);
  content: "•";
}

.newsletter-band {
  margin: 42px 0;
  padding: 32px;
  color: #ffffff;
  background: var(--e24-blue);
  border-radius: var(--e24-radius);
}

.newsletter-band-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(330px, 520px);
  align-items: center;
  gap: 26px;
}

.newsletter-icon {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
}

.newsletter-band h2 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 27px;
}

.newsletter-band p {
  margin: 0;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.newsletter-privacy {
  grid-column: 1 / -1;
  color: #d8e5f4;
  font-size: 13px;
}

.site-footer {
  margin-top: 26px;
  border-top: 1px solid var(--e24-line);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, 1fr);
  gap: 46px;
  padding: 48px 0 34px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--e24-blue);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.footer-about p {
  max-width: 265px;
  margin: 0 0 22px;
  color: #4b5b72;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  background: var(--e24-blue);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 900;
}

.footer-column h3 {
  margin: 0 0 14px;
  color: var(--e24-blue);
  font-size: 16px;
}

.footer-column li {
  margin: 8px 0;
  color: #33465d;
  font-size: 14px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 28px;
  color: #5b6b80;
  border-top: 1px solid var(--e24-line);
  font-size: 13px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 330px;
  gap: 54px;
  margin-top: 36px;
  align-items: start;
}

.single-article {
  padding-bottom: 24px;
}

.single-header {
  margin-bottom: 22px;
}

.single-title,
.archive-title {
  margin: 12px 0 16px;
  color: var(--e24-blue);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.single-excerpt {
  color: #34435b;
  font-size: 21px;
}

.single-featured img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--e24-radius);
}

.entry-content {
  color: #18283e;
  font-size: 19px;
  line-height: 1.78;
}

.entry-content a {
  color: var(--e24-orange);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content h2,
.entry-content h3 {
  color: var(--e24-blue);
  line-height: 1.18;
}

.entry-content blockquote {
  margin: 28px 0;
  padding: 6px 0 6px 24px;
  color: var(--e24-blue);
  border-left: 4px solid var(--e24-orange);
  font-size: 24px;
  font-weight: 800;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.post-tags a {
  padding: 7px 10px;
  background: var(--e24-soft);
  border: 1px solid var(--e24-line);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 750;
}

.author-box {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 20px;
  margin: 38px 0;
  padding: 24px;
  background: var(--e24-soft);
  border: 1px solid var(--e24-line);
  border-radius: var(--e24-radius);
}

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

.author-box h2 {
  margin: 0 0 6px;
  color: var(--e24-blue);
  font-size: 22px;
}

.author-box p {
  margin: 0 0 10px;
  color: #40516a;
}

.post-navigation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 28px 0;
}

.post-navigation a {
  display: block;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--e24-line);
  border-radius: var(--e24-radius);
  font-weight: 850;
}

.sidebar {
  position: sticky;
  top: 120px;
}

.sidebar-widget {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--e24-line);
  border-radius: var(--e24-radius);
}

.sidebar-widget h2 {
  margin: 0 0 14px;
  color: var(--e24-blue);
  font-size: 20px;
}

.archive-grid,
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 30px 0 48px;
}

.pagination,
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 30px 0 50px;
}

.load-more-button {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--e24-blue);
  border: 0;
  border-radius: 4px;
  font-weight: 850;
}

.next-article-loader {
  min-height: 80px;
  color: var(--e24-muted);
  text-align: center;
}

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

  .primary-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 0 22px;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .header-actions {
    justify-content: end;
  }

  .content-layout,
  .newsletter-band-inner,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-wrap {
    width: min(100% - 28px, var(--e24-width));
  }

  .site-logo {
    min-width: 0;
    font-size: 25px;
  }

  .newsletter-button,
  .login-link {
    display: none;
  }

  .hero,
  .hero-image {
    min-height: 500px;
  }

  .hero-content {
    width: 100%;
    padding: 30px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(7, 31, 65, .92) 0%, rgba(7, 31, 65, .55) 62%, rgba(7, 31, 65, .82) 100%);
  }

  .featured-grid,
  .latest-grid,
  .section-grid,
  .archive-grid,
  .search-results-grid,
  .post-navigation {
    grid-template-columns: 1fr;
  }

  .latest-item,
  .latest-item:nth-child(odd) {
    grid-template-columns: 104px 1fr;
    padding-right: 0;
    border-right: 0;
  }

  .latest-time {
    grid-column: 2;
    text-align: left;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-inner {
    gap: 10px;
    min-height: 78px;
  }

  .site-logo {
    font-size: 20px;
  }

  .hero-title,
  .single-title,
  .archive-title {
    font-size: 36px;
  }

  .card-title {
    font-size: 23px;
  }

  .latest-item {
    grid-template-columns: 1fr;
  }

  .latest-item img {
    width: 100%;
    height: 180px;
  }

  .latest-time {
    grid-column: auto;
  }

  .author-box {
    grid-template-columns: 1fr;
  }
}
