/*
Theme Name: Tunafisher
Description: Tema per il diario di pesca di Giorgio Cerciello: uscite, catture e tecniche. Funziona con il plugin "Tunafisher Diario di pesca".
Version: 1.0.0
Author: Giorgio Cerciello
Text Domain: tunafisher
Requires PHP: 7.4
*/

:root {
	--ink: #0C2A33;
	--sea: #14606B;
	--foam: #EEF4F3;
	--tile: #DCEAE8;
	--lure: #E4672B;
	--lure-dark: #B14A18;
	--muted: #4A6168;
	--soft: #D5E6E4;
	--line: #B7CFCC;
	--font: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--foam);
	color: var(--ink);
	font-family: var(--font);
	font-size: 18px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--sea); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--font); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tf-skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.tf-skip:focus { left: 8px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--lure); outline-offset: 2px; }

.tf-wrap { width: 100%; max-width: 1256px; margin: 0 auto; padding-inline: var(--gutter); }

/* Intestazione */
.tf-header { background: var(--ink); padding: 18px 0; }
.tf-header-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.tf-logo { font-weight: 800; font-size: 26px; letter-spacing: -0.01em; color: #fff; text-decoration: none; }
.tf-nav { flex-grow: 1; }
.tf-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tf-menu a { color: var(--soft); text-decoration: none; font-weight: 500; padding: 6px 0; display: inline-block; }
.tf-menu a:hover, .tf-menu .current-menu-item a { color: #fff; }
.tf-social { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-social a { color: var(--soft); text-decoration: none; font-size: 14px; border: 1px solid #3F6A73; border-radius: 999px; padding: 8px 14px; }
.tf-social a:hover { color: #fff; border-color: #8FB9BE; }

/* Pulsanti */
.tf-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tf-btn { display: inline-block; background: var(--lure); color: var(--ink); text-decoration: none; font-weight: 600; padding: 14px 24px; border-radius: 10px; font-size: 17px; border: 1px solid var(--lure); }
.tf-btn:hover { color: var(--ink); filter: brightness(1.06); }
.tf-btn-line { background: transparent; color: #fff; border-color: #5B8790; }
.tf-btn-line:hover { color: #fff; border-color: #fff; }
.tf-btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.tf-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* Home */
.tf-hero { background: var(--ink); padding: 40px 0 72px; color: #fff; }
.tf-hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.tf-hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 24px; }
.tf-hero h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.02; color: #fff; }
.tf-hero p { font-size: 19px; line-height: 1.55; color: #C7DCDA; max-width: 520px; margin: 0; }
.tf-hero-img { flex: 1 1 380px; display: flex; flex-direction: column; gap: 10px; }
.tf-hero-img img { display: block; width: 100%; height: auto; border-radius: 14px; }
.tf-hero-cap { color: #9FBFBC; font-size: 14px; }
.tf-eyebrow { color: var(--lure-dark); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 14px; margin-bottom: 12px; }
.tf-eyebrow-dark { color: var(--lure); margin: 0; }

.tf-section { padding: 56px 0 8px; }
.tf-section-last { padding-bottom: 72px; }
.tf-section:first-of-type { padding-top: 72px; }
.tf-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.tf-section-head h2, .tf-h2 { font-size: 34px; margin-bottom: 0; }
.tf-h2 { margin: 40px 0 24px; }
.tf-section-head a { font-weight: 600; }

/* Schede delle uscite */
.tf-cards { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.tf-card { flex: 1 1 300px; max-width: 100%; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.tf-card-img { display: block; aspect-ratio: 7 / 5; overflow: hidden; background: var(--tile); }
.tf-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.tf-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.tf-card-meta { font-size: 14px; color: var(--muted); font-weight: 500; }
.tf-card-title { font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.tf-card-text { font-size: 15px; color: var(--muted); line-height: 1.5; }
.tf-card:hover .tf-card-title { color: var(--sea); }

/* Tecniche */
.tf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tf-tile { min-width: 0; background: var(--tile); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.tf-tile:hover { background: #cfe2df; }
.tf-tile-title { font-weight: 700; font-size: 20px; line-height: 1.2; }
.tf-tile-text { font-size: 15px; line-height: 1.5; color: #2E4A52; }
.tf-tile-n { font-size: 13px; color: var(--muted); margin-top: auto; }

/* Foto intere, senza ritaglio */
.tf-masonry { columns: 300px; column-gap: 20px; }
.tf-fig { margin: 0 0 20px; break-inside: avoid; background: #fff; border-radius: 14px; overflow: hidden; display: block; }
.tf-zoom { display: block; background: var(--tile); cursor: zoom-in; }
.tf-zoom img, .tf-foto { display: block; width: 100%; height: auto; }
.tf-fig figcaption { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tf-fig-title { font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.tf-fig-title:hover { color: var(--sea); text-decoration: underline; }
.tf-fig-meta { font-size: 14px; color: var(--muted); }

/* Filtri per specie */
.tf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tf-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.tf-chip:hover { border-color: var(--ink); color: var(--ink); }
.tf-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Fascia social */
.tf-band { background: var(--sea); color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.tf-band h2 { font-size: 30px; color: #fff; margin-bottom: 8px; }
.tf-band p { color: var(--soft); margin: 0; }

/* Pagine interne */
.tf-page { padding-top: 48px; padding-bottom: 72px; }
.tf-narrow { max-width: 860px; }
.tf-page-head { margin-bottom: 32px; }
.tf-page-head h1 { font-size: clamp(36px, 4.6vw, 56px); margin-bottom: 12px; }
.tf-page-head p { font-size: 18px; color: #2E4A52; max-width: 640px; margin: 0; }
.tf-intro { margin-bottom: 32px; }

.tf-single { padding-top: 48px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.tf-article { flex: 2 1 520px; min-width: 0; }
.tf-article h1 { font-size: clamp(32px, 4.4vw, 52px); }
.tf-side { flex: 1 1 300px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.tf-back { display: inline-block; margin-bottom: 20px; font-weight: 600; text-decoration: none; }
.tf-main-photo { margin: 24px 0; border-radius: 14px; overflow: hidden; }
.tf-content { font-size: 19px; line-height: 1.7; color: #1B3841; }
.tf-content h2 { font-size: 28px; margin: 1.4em 0 0.5em; }
.tf-content h3 { font-size: 22px; margin: 1.2em 0 0.4em; }
.tf-content img, .tf-content figure { max-width: 100%; height: auto; border-radius: 10px; }
.tf-content figure { margin: 1.4em 0; }
.tf-content figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.tf-content .alignleft { float: left; margin: 0 1em 1em 0; }
.tf-content .alignright { float: right; margin: 0 0 1em 1em; }
.tf-content .aligncenter { display: block; margin-inline: auto; }
.tf-content::after { content: ""; display: block; clear: both; }
.tf-video { margin: 24px 0; position: relative; }
.tf-video iframe, .tf-content iframe { max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }

.tf-box { background: #fff; border-radius: 16px; padding: 24px; }
.tf-box h2 { font-size: 22px; margin-bottom: 14px; }
.tf-box-sea { background: var(--sea); }
.tf-box-sea h2 { color: #fff; }
.tf-scheda { margin: 0; }
.tf-scheda > div { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--tile); padding: 12px 0; font-size: 16px; }
.tf-scheda dt { color: var(--muted); }
.tf-scheda dd { margin: 0; font-weight: 600; text-align: right; }

.tf-post { margin-bottom: 32px; }
.tf-post h2 a { text-decoration: none; color: var(--ink); }

.navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Piede */
.tf-footer { background: var(--ink); color: #9FBFBC; font-size: 14px; padding: 32px 0; }
.tf-footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Ingrandimento foto */
.tf-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(6, 22, 27, 0.95); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow: auto; }
.tf-lb[hidden] { display: none; }
.tf-lb-in { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; }
.tf-lb-img { display: block; max-width: min(94vw, 960px); max-height: 72vh; width: auto; height: auto; border-radius: 8px; }
.tf-lb-cap { color: #fff; text-align: center; max-width: 640px; font-size: 18px; line-height: 1.4; font-weight: 500; }
.tf-lb-pos { color: #9FBFBC; font-size: 14px; }
.tf-lb-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tf-lb-btns button { font: inherit; font-size: 16px; font-weight: 600; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid #5B8790; background: transparent; color: #fff; cursor: pointer; }
.tf-lb-btns .tf-lb-close { background: var(--lure); border-color: var(--lure); color: var(--ink); }
html.tf-lb-open { overflow: hidden; }

@media (max-width: 600px) {
	body { font-size: 17px; }
	.tf-hero { padding-bottom: 48px; }
	.tf-section-head h2, .tf-h2 { font-size: 28px; }
}

/* Scheda tecnica: copertina, testo, galleria, link attrezzature */
.tf-tile-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; height: auto; border-radius: 10px; display: block; margin-bottom: 4px; }
.tf-tecnica-cover { display: block; max-width: 880px; margin: 0 0 28px; }
.tf-tecnica-cover { width: fit-content; }
.tf-tecnica-cover img { width: auto; max-width: 100%; max-height: 70vh; height: auto; border-radius: 12px; display: block; }
.tf-tecnica-testo { max-width: 720px; margin-bottom: 28px; }
.tf-tecnica-testo img { max-width: 100%; height: auto; border-radius: 10px; }
.tf-tecnica-gallery { margin-bottom: 28px; }
.tf-tecnica-link { margin: 8px 0 36px; }

/* Pagine: foto in testa, schede figlie, fondo con email e privacy */
.tf-page-foto { margin: 0 0 28px; }
.tf-page-foto .tf-zoom { display: block; width: fit-content; max-width: 100%; }
.tf-page-foto img { width: auto; max-width: 100%; max-height: 70vh; height: auto; border-radius: 12px; display: block; }
.tf-figli { margin-top: 32px; }
.tf-footer-links a { color: inherit; }
.tf-content .tf-zoom { display: inline-block; max-width: 100%; }
