/*
Theme Name: Focus Energie
Theme URI: https://example.com/focus-energie
Author: Smart Italy Communications
Author URI: https://example.com
Description: Tema editoriale WordPress per magazine energia, con homepage modulare, pubblicita, ricerca, box autore e infinite scroll.
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: focus-energie
*/

:root {
  --fe-black: #101615;
  --fe-ink: #151a19;
  --fe-muted: #677271;
  --fe-line: #dfe6e2;
  --fe-soft: #f4f7f5;
  --fe-green: #70d216;
  --fe-green-dark: #3e9b11;
  --fe-white: #ffffff;
  --fe-max: 1220px;
  --fe-radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--fe-ink);
  background: var(--fe-white);
  font-family: "Inter", "Arial", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--fe-green-dark); }
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;
}

.fe-container {
  width: min(var(--fe-max), calc(100% - 40px));
  margin: 0 auto;
}

.fe-topbar {
  background: var(--fe-black);
  color: #eef5ef;
  font-size: 13px;
}

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

.fe-topbar__inner { min-height: 36px; }
.fe-topbar__meta,
.fe-topbar__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.fe-topbar__social { display: flex; gap: 14px; font-weight: 700; }

.fe-header {
  background: #fff;
  border-bottom: 1px solid var(--fe-line);
}

.fe-header__inner {
  min-height: 96px;
}

.fe-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.fe-brand__mark {
  width: 64px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 38%, #fff 0 8%, transparent 9%),
    conic-gradient(from 35deg, #70d216, #c9f025, #30a411, #70d216);
  transform: skewX(-16deg);
  position: relative;
}

.fe-brand__mark::after {
  content: "";
  position: absolute;
  inset: 11px 15px;
  border-top: 8px solid #fff;
  border-right: 8px solid #fff;
  transform: rotate(35deg);
}

.fe-brand__name {
  color: #6f8180;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.fe-brand__name span { color: #3e4a49; }

.fe-search {
  position: relative;
  width: min(320px, 100%);
}

.fe-search form {
  display: flex;
  align-items: center;
  border: 1px solid var(--fe-line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.fe-search input[type="search"] {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 10px 12px 10px 16px;
  font: inherit;
  outline: none;
}

.fe-search button {
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--fe-green);
  color: #13200e;
  cursor: pointer;
  font-weight: 900;
}

.fe-nav {
  border-bottom: 1px solid var(--fe-line);
  background: #fff;
}

.fe-nav__inner { min-height: 54px; }
.fe-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
}

.fe-menu a {
  display: block;
  padding: 18px 0 14px;
  border-bottom: 3px solid transparent;
}

.fe-menu .current-menu-item > a,
.fe-menu a:hover {
  color: var(--fe-green-dark);
  border-bottom-color: var(--fe-green);
}

.fe-main { padding: 28px 0 0; }

.fe-section {
  margin: 34px 0;
}

.fe-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.fe-section__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.fe-section__link {
  color: var(--fe-green-dark);
  font-size: 14px;
  font-weight: 800;
}

.fe-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
  gap: 6px;
}

.fe-hero-grid__side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.fe-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--fe-radius);
  background: #17201d;
}

.fe-card--hero { min-height: 496px; }
.fe-card--tile { min-height: 245px; }

.fe-card__image,
.fe-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fe-card__image img { object-fit: cover; }
.fe-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.04) 15%, rgba(0,0,0,.82) 100%);
}

.fe-card__body {
  position: absolute;
  z-index: 1;
  left: 24px;
  right: 24px;
  bottom: 22px;
  color: #fff;
}

.fe-card--tile .fe-card__body {
  left: 18px;
  right: 18px;
  bottom: 16px;
}

.fe-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 3px 7px;
  background: var(--fe-green);
  color: #11200d;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.fe-card__title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

.fe-card--tile .fe-card__title { font-size: 20px; }
.fe-card__excerpt {
  margin: 0 0 12px;
  max-width: 680px;
  font-size: 17px;
}

.fe-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: inherit;
  font-size: 13px;
  opacity: .9;
}

.fe-news-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.fe-mini {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.fe-mini__thumb {
  aspect-ratio: 1.45;
  overflow: hidden;
  border-radius: 4px;
  background: var(--fe-soft);
}

.fe-mini__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fe-mini__title {
  margin: 3px 0 6px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
}

.fe-three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
}

.fe-column {
  border-right: 1px solid var(--fe-line);
  padding-right: 24px;
}

.fe-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.fe-feature__thumb {
  aspect-ratio: 1.5;
  border-radius: var(--fe-radius);
  overflow: hidden;
  background: var(--fe-soft);
  margin-bottom: 14px;
}

.fe-feature__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fe-feature__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.15;
}

.fe-feature__excerpt {
  margin: 0 0 10px;
  color: #43504e;
  font-size: 14px;
}

.fe-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.fe-list .fe-mini {
  grid-template-columns: 86px minmax(0, 1fr);
  padding-top: 12px;
  border-top: 1px solid var(--fe-line);
}

.fe-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 28px 0;
  border: 1px dashed #b8c6c0;
  border-radius: var(--fe-radius);
  background: #f6faf6;
  color: #60706b;
  text-align: center;
  overflow: hidden;
}

.fe-ad > * { max-width: 100%; }

.fe-newsletter {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding: 30px 64px;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 130%, rgba(112,210,22,.92), transparent 32%),
    linear-gradient(120deg, #111a18, #1f302c);
}

.fe-newsletter h2 {
  margin: 0 0 5px;
  font-size: 26px;
  line-height: 1.1;
}

.fe-newsletter p { margin: 0; }
.fe-newsletter form {
  display: flex;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
  overflow: hidden;
}

.fe-newsletter input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 0 16px;
}

.fe-newsletter button {
  border: 0;
  padding: 0 18px;
  background: var(--fe-green);
  color: #13200e;
  font-weight: 900;
  cursor: pointer;
}

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

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

.fe-entry-card {
  border-bottom: 1px solid var(--fe-line);
  padding-bottom: 20px;
}

.fe-entry-card__thumb {
  aspect-ratio: 1.55;
  border-radius: var(--fe-radius);
  overflow: hidden;
  background: var(--fe-soft);
  margin-bottom: 12px;
}

.fe-entry-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fe-entry-card__title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.18;
}

.fe-entry-card__excerpt {
  color: #4e5c59;
  font-size: 14px;
}

.fe-load-more {
  display: flex;
  justify-content: center;
  margin: 34px 0;
}

.fe-button {
  border: 0;
  border-radius: 4px;
  background: var(--fe-green);
  color: #14210f;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
}

.fe-single {
  display: grid;
  grid-template-columns: minmax(0, 760px) 320px;
  gap: 54px;
  align-items: start;
}

.fe-article {
  min-width: 0;
}

.fe-article__header {
  margin-bottom: 24px;
}

.fe-article__title {
  margin: 10px 0 12px;
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: 0;
}

.fe-article__thumb {
  margin: 0 0 24px;
  border-radius: 8px;
  overflow: hidden;
}

.fe-article__content {
  font-size: 18px;
  line-height: 1.75;
}

.fe-article__content a {
  color: var(--fe-green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.fe-article__content p,
.fe-article__content ul,
.fe-article__content ol,
.fe-article__content blockquote {
  margin: 0 0 1.35em;
}

.fe-author-box {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  margin: 36px 0;
  padding: 22px;
  border: 1px solid var(--fe-line);
  border-radius: var(--fe-radius);
  background: var(--fe-soft);
}

.fe-author-box img { border-radius: 50%; }
.fe-author-box h3 { margin: 0 0 4px; }
.fe-author-box p { margin: 0 0 8px; color: #4a5754; }

.fe-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 30px 0;
}

.fe-post-nav a {
  display: block;
  padding: 16px;
  border: 1px solid var(--fe-line);
  border-radius: var(--fe-radius);
  font-weight: 800;
}

.fe-sidebar {
  position: sticky;
  top: 20px;
}

.fe-widget {
  margin-bottom: 28px;
}

.fe-widget__title {
  margin: 0 0 14px;
  font-size: 17px;
  text-transform: uppercase;
}

.fe-footer {
  margin-top: 48px;
  padding: 34px 0 18px;
  color: #dce7e3;
  background: var(--fe-black);
}

.fe-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 46px;
}

.fe-footer h3 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  color: #fff;
}

.fe-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fe-footer li { margin: 5px 0; }
.fe-footer__bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  color: #aab8b4;
}

@media (max-width: 980px) {
  .fe-header__inner,
  .fe-topbar__inner,
  .fe-nav__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .fe-brand__name { font-size: 32px; }
  .fe-menu { gap: 18px; overflow-x: auto; width: 100%; }
  .fe-hero-grid,
  .fe-three-col,
  .fe-single,
  .fe-newsletter,
  .fe-footer__grid {
    grid-template-columns: 1fr;
  }

  .fe-column {
    border-right: 0;
    padding-right: 0;
  }

  .fe-news-strip,
  .fe-post-grid,
  .fe-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fe-sidebar { position: static; }
}

@media (max-width: 640px) {
  .fe-container { width: min(100% - 24px, var(--fe-max)); }
  .fe-hero-grid__side,
  .fe-news-strip,
  .fe-post-grid,
  .fe-archive-grid {
    grid-template-columns: 1fr;
  }

  .fe-card--hero,
  .fe-card--tile {
    min-height: 360px;
  }

  .fe-card__title,
  .fe-article__title {
    font-size: 30px;
  }

  .fe-newsletter {
    padding: 24px;
  }

  .fe-newsletter form,
  .fe-post-nav {
    grid-template-columns: 1fr;
  }

  .fe-newsletter form {
    display: grid;
  }

  .fe-newsletter input,
  .fe-newsletter button {
    min-height: 46px;
  }
}
