/*
Theme Name: Lapponia Modern
Theme URI: https://www.lapponia.it/
Author: Agonet
Description: Tema moderno e responsive per Lapponia.it, ricostruito dalla grafica storica bluetooth.
Version: 1.2.2
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: lapponia-modern
*/

:root {
  --ice-50: #f5fafc;
  --ice-100: #e4f0f5;
  --ice-200: #c9dee8;
  --ice-500: #5d8da4;
  --fjord-700: #24546b;
  --fjord-800: #153e52;
  --night-900: #102b38;
  --snow: #fff;
  --ink: #23333b;
  --muted: #5b6d76;
  --line: #ccdde5;
  --shadow: 0 18px 45px rgb(16 43 56 / 16%);
  --radius: 18px;
  --content: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgb(255 255 255 / 70%), transparent 34rem),
    linear-gradient(180deg, #8fb3c4 0, #d8e7ed 31rem, var(--ice-50) 58rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--fjord-700); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--night-900); }
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;
}

.skip-link:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 12px;
  padding: 10px 14px;
  z-index: 9999;
  background: var(--snow);
}

.site-shell {
  width: min(calc(100% - 28px), var(--content));
  margin: 14px auto 34px;
  overflow: hidden;
  background: rgb(255 255 255 / 93%);
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.site-hero {
  min-height: 275px;
  display: grid;
  place-items: center;
  padding: 38px 24px;
  position: relative;
  isolation: isolate;
  color: var(--snow);
  text-align: center;
  background: #567d90 url("assets/images/header.jpg") center 44% / cover no-repeat;
}

.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(9 34 47 / 16%), rgb(9 34 47 / 4%) 48%, rgb(9 34 47 / 24%));
}

.site-brand { color: inherit; text-decoration: none; text-shadow: 0 2px 16px rgb(0 0 0 / 45%); }
.site-brand__title { display: block; font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: .075em; line-height: 1; }
.site-brand__tagline { display: block; margin-top: 13px; font-size: clamp(.84rem, 1.8vw, 1.08rem); font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

.site-nav { position: relative; background: var(--night-900); }
.menu-toggle {
  display: none;
  width: 100%;
  padding: 14px 18px;
  color: var(--snow);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.primary-menu,
.primary-menu ul { margin: 0; padding: 0; list-style: none; }
.primary-menu { display: flex; justify-content: center; align-items: stretch; }
.primary-menu > li { position: relative; }
.primary-menu a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 15px 15px;
  color: var(--snow);
  font-size: .79rem;
  font-weight: 760;
  letter-spacing: .025em;
  line-height: 1.25;
  text-decoration: none;
  text-transform: uppercase;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a { background: var(--ice-500); }
.primary-menu .children,
.primary-menu .sub-menu {
  display: none;
  min-width: 240px;
  position: absolute;
  z-index: 20;
  inset: 100% auto auto 0;
  background: var(--night-900);
  box-shadow: 0 12px 25px rgb(0 0 0 / 25%);
}
.primary-menu li:hover > .children,
.primary-menu li:focus-within > .children,
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { display: block; }

.site-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 34px;
  padding: clamp(26px, 4vw, 52px);
}

.content-area { min-width: 0; }
.sidebar { min-width: 0; }

.article-card,
.side-card {
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgb(36 84 107 / 8%);
}

.article-card { padding: clamp(22px, 4vw, 42px); }
.article-card + .article-card { margin-top: 26px; }
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0; color: var(--fjord-800); font-size: clamp(1.75rem, 4vw, 2.65rem); line-height: 1.12; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-meta { margin-top: 9px; color: var(--muted); font-size: .86rem; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2,
.entry-content h3 { color: var(--fjord-800); line-height: 1.25; }
.entry-content img { margin: 1.5rem auto; border-radius: 14px; }
.entry-content img.is-zoomable { cursor: zoom-in; }
.entry-content img.is-zoomable:focus-visible { outline: 3px solid var(--ice-500); outline-offset: 4px; }
.entry-content .alignleft { float: left; margin: .45rem 1.5rem 1rem 0; }
.entry-content .alignright { float: right; margin: .45rem 0 1rem 1.5rem; }
.entry-content::after { content: ""; display: block; clear: both; }

.side-card { padding: 22px; margin-bottom: 20px; }
.side-card__title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  color: var(--fjord-800);
  border-bottom: 3px solid var(--ice-200);
  font-size: .94rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.side-card ul { margin: 0; padding-left: 1.1rem; }
.side-card li + li { margin-top: .65rem; }
.weather-now { display: flex; align-items: center; gap: 13px; }
.weather-now__icon { font-size: 2.5rem; line-height: 1; }
.weather-now__temperature { color: var(--fjord-800); font-size: 2.25rem; font-weight: 800; line-height: 1; }
.weather-now__label { margin: 10px 0 14px; font-weight: 720; }
.weather-details { margin: 0; }
.weather-details div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--ice-100); }
.weather-details dt { color: var(--muted); }
.weather-details dd { margin: 0; font-weight: 720; }
.side-card__source { margin: 13px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.webcam-card__image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--ice-100); }
.webcam-card p { margin: 12px 0 0; font-size: .84rem; line-height: 1.45; }
.image-lightbox {
  width: min(94vw, 1100px);
  max-width: none;
  max-height: 92vh;
  padding: 42px 14px 14px;
  border: 0;
  border-radius: 16px;
  color: var(--snow);
  background: rgb(8 25 34 / 96%);
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}
.image-lightbox::backdrop { background: rgb(4 15 21 / 82%); }
.image-lightbox__image { display: block; width: auto; max-width: 100%; max-height: calc(92vh - 82px); margin: 0 auto; border-radius: 10px; }
.image-lightbox__caption { margin: 10px 34px 0; text-align: center; font-size: .9rem; }
.image-lightbox__close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: var(--night-900); background: var(--snow); font-size: 1.45rem; line-height: 1; cursor: pointer; }
.search-form { display: flex; gap: 8px; }
.search-field { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.search-submit { padding: 11px 14px; color: var(--snow); background: var(--fjord-700); border: 0; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }

.pagination { margin-top: 30px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 12px; background: var(--ice-100); border-radius: 9px; text-decoration: none; }
.page-numbers.current { color: var(--snow); background: var(--fjord-700); }

.site-footer {
  padding: 27px clamp(24px, 4vw, 52px);
  color: rgb(255 255 255 / 84%);
  background: var(--night-900);
  font-size: .88rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.site-footer a { color: var(--snow); }
.privacy-settings { padding: 0; border: 0; color: var(--snow); background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 900px) {
  .site-shell { width: min(calc(100% - 16px), var(--content)); margin-top: 8px; border-radius: 18px; }
  .site-hero { min-height: 230px; }
  .menu-toggle { display: block; }
  .primary-menu { display: none; flex-direction: column; }
  .primary-menu.is-open { display: flex; }
  .primary-menu a { padding: 13px 18px; }
  .primary-menu .children,
  .primary-menu .sub-menu { display: block; position: static; min-width: 0; padding-left: 18px; box-shadow: none; }
  .site-content { grid-template-columns: 1fr; padding: 24px; }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .side-card { margin: 0; }
}

@media (max-width: 580px) {
  body { font-size: 16px; }
  .site-hero { min-height: 205px; padding: 30px 18px; }
  .site-content { padding: 16px; gap: 22px; }
  .article-card { padding: 21px 18px; border-radius: 14px; }
  .sidebar { grid-template-columns: 1fr; }
  .entry-content .alignleft,
  .entry-content .alignright { float: none; margin: 1.25rem auto; }
  .site-footer__inner { display: block; }
}
