/*
Theme Name: Basilicata Wedding
Theme URI: https://www.basilicatawedding.it
Author: Basilicata Wedding
Description: Tema per portale di matrimoni in Basilicata: directory fornitori con ricerca avanzata, magazine, meteo locale, calcolatore budget e richieste preventivo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: basilicata-wedding
*/

:root {
	--bw-terracotta: #b45a3c;
	--bw-terracotta-dark: #8d4229;
	--bw-gold: #c8a04a;
	--bw-olive: #6a7a52;
	--bw-ink: #2c2521;
	--bw-muted: #6d6259;
	--bw-cream: #faf6f0;
	--bw-line: #e6ddd1;
	--bw-radius: 14px;
	--bw-shadow: 0 10px 30px rgba(60, 40, 25, .10);
	--bw-serif: "Cormorant Garamond", Georgia, serif;
	--bw-sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--bw-sans);
	color: var(--bw-ink);
	background: var(--bw-cream);
	line-height: 1.65;
	font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bw-terracotta-dark); }

h1, h2, h3, h4 { font-family: var(--bw-serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--bw-ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.bw-container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.bw-section { padding: 4rem 0; }
.bw-eyebrow {
	font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
	color: var(--bw-terracotta); font-weight: 700; margin-bottom: .6rem;
}
.bw-lead { color: var(--bw-muted); font-size: 1.05rem; max-width: 62ch; }
.bw-rule { height: 1px; background: linear-gradient(90deg, var(--bw-gold), transparent); border: 0; margin: 1.5rem 0; }

/* Header */
.bw-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(250, 246, 240, .92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--bw-line);
}
.bw-header__inner { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.bw-logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.bw-logo svg { width: 42px; height: 42px; flex: none; }
.bw-logo__text { font-family: var(--bw-serif); font-size: 1.35rem; line-height: 1; }
.bw-logo__sub { display: block; font-family: var(--bw-sans); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--bw-muted); margin-top: .25rem; }
.bw-nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.bw-nav a { text-decoration: none; color: var(--bw-ink); font-size: .92rem; }
.bw-nav a:hover { color: var(--bw-terracotta); }

.bw-btn {
	display: inline-block; border: 0; cursor: pointer;
	background: var(--bw-terracotta); color: #fff;
	padding: .72rem 1.35rem; border-radius: 999px;
	font-family: var(--bw-sans); font-size: .92rem; font-weight: 600;
	text-decoration: none; transition: background .2s ease;
}
.bw-btn:hover { background: var(--bw-terracotta-dark); color: #fff; }
.bw-btn--ghost { background: transparent; color: var(--bw-ink); border: 1px solid var(--bw-line); }
.bw-btn--ghost:hover { background: #fff; color: var(--bw-terracotta-dark); }
.bw-btn--gold { background: var(--bw-gold); color: #2c2521; }
.bw-btn--gold:hover { background: #b58f3c; color: #2c2521; }

/* Hero */
.bw-hero { position: relative; color: #fff; }
.bw-hero__media { position: absolute; inset: 0; }
.bw-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.bw-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,20,14,.62), rgba(30,20,14,.78)); }
.bw-hero__inner { position: relative; padding: 5.5rem 0 4rem; }
.bw-hero h1 { color: #fff; max-width: 18ch; }
.bw-hero p { color: rgba(255,255,255,.85); max-width: 58ch; }
.bw-hero .bw-eyebrow { color: var(--bw-gold); }

/* Search */
.bw-search { background: #fff; border-radius: var(--bw-radius); box-shadow: var(--bw-shadow); padding: 1.25rem; margin-top: 2rem; }
.bw-search__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.bw-field { display: flex; flex-direction: column; gap: .3rem; }
.bw-field label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bw-muted); font-weight: 700; }
.bw-field input, .bw-field select, .bw-field textarea {
	font-family: var(--bw-sans); font-size: .95rem; color: var(--bw-ink);
	padding: .6rem .7rem; border: 1px solid var(--bw-line); border-radius: 10px; background: #fff; width: 100%;
}
.bw-field textarea { min-height: 120px; resize: vertical; }
.bw-search__actions { display: flex; gap: .6rem; align-items: end; margin-top: .9rem; flex-wrap: wrap; }
.bw-results-count { color: var(--bw-muted); font-size: .9rem; margin: 1.5rem 0 1rem; }

/* Cards */
.bw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.bw-card {
	background: #fff; border: 1px solid var(--bw-line); border-radius: var(--bw-radius);
	padding: 1.25rem; display: flex; flex-direction: column; gap: .55rem;
}
.bw-card h3 { margin: 0; font-size: 1.22rem; }
.bw-card h3 a { text-decoration: none; color: inherit; }
.bw-card h3 a:hover { color: var(--bw-terracotta); }
.bw-card__meta { font-size: .82rem; color: var(--bw-muted); }
.bw-card__desc { font-size: .93rem; color: var(--bw-muted); margin: 0; }
.bw-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.bw-tag { font-size: .72rem; background: #f3ece2; color: var(--bw-muted); border-radius: 999px; padding: .2rem .6rem; }
.bw-tag--cat { background: rgba(180,90,60,.12); color: var(--bw-terracotta-dark); font-weight: 600; }
.bw-card__foot { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--bw-line); display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; }
.bw-check { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--bw-muted); cursor: pointer; }

/* Layout with sidebar */
.bw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .bw-layout { grid-template-columns: 1fr; } }
.bw-widget { background: #fff; border: 1px solid var(--bw-line); border-radius: var(--bw-radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.bw-widget h3 { font-size: 1.1rem; }
.bw-widget ul { list-style: none; margin: 0; padding: 0; }
.bw-widget li { padding: .35rem 0; border-bottom: 1px dashed var(--bw-line); font-size: .9rem; }
.bw-widget li:last-child { border-bottom: 0; }
.bw-widget a { text-decoration: none; }

/* Weather */
.bw-weather__row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--bw-line); }
.bw-weather__row:last-child { border-bottom: 0; }
.bw-weather__city { font-weight: 600; font-size: .95rem; }
.bw-weather__cond { font-size: .78rem; color: var(--bw-muted); }
.bw-weather__temp { font-family: var(--bw-serif); font-size: 1.5rem; }
.bw-weather__note { font-size: .74rem; color: var(--bw-muted); margin-top: .6rem; }

/* Author box */
.bw-author { display: flex; gap: 1rem; align-items: flex-start; }
.bw-author__avatar {
	width: 60px; height: 60px; border-radius: 50%; flex: none;
	background: linear-gradient(135deg, var(--bw-gold), var(--bw-terracotta));
	color: #fff; display: grid; place-items: center; font-family: var(--bw-serif); font-size: 1.4rem;
}
.bw-author__name { font-family: var(--bw-serif); font-size: 1.2rem; }
.bw-author__role { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--bw-terracotta); }
.bw-author p { font-size: .88rem; color: var(--bw-muted); margin: .5rem 0 0; }

/* Posts */
.bw-post { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 1.25rem; background: #fff; border: 1px solid var(--bw-line); border-radius: var(--bw-radius); overflow: hidden; margin-bottom: 1.25rem; }
.bw-post__thumb { height: 100%; min-height: 160px; }
.bw-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bw-post__body { padding: 1.1rem 1.25rem 1.25rem 0; }
.bw-post h3 { margin: .3rem 0 .4rem; }
.bw-post h3 a { text-decoration: none; color: inherit; }
.bw-post__meta { font-size: .78rem; color: var(--bw-muted); text-transform: uppercase; letter-spacing: .1em; }
.bw-post p { font-size: .93rem; color: var(--bw-muted); margin: 0; }
@media (max-width: 640px) {
	.bw-post { grid-template-columns: 1fr; }
	.bw-post__body { padding: 0 1.25rem 1.25rem; }
}

/* Calculator */
.bw-calc { background: #fff; border: 1px solid var(--bw-line); border-radius: var(--bw-radius); padding: 1.5rem; }
.bw-calc__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: .9rem; }
.bw-calc__out { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--bw-line); }
.bw-calc__total { font-family: var(--bw-serif); font-size: 2.2rem; color: var(--bw-terracotta-dark); }
.bw-calc__lines { list-style: none; padding: 0; margin: .75rem 0 0; }
.bw-calc__lines li { display: flex; justify-content: space-between; font-size: .9rem; padding: .25rem 0; border-bottom: 1px dashed var(--bw-line); }

/* Forms / notices */
.bw-form { background: #fff; border: 1px solid var(--bw-line); border-radius: var(--bw-radius); padding: 1.5rem; display: grid; gap: .9rem; }
.bw-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: .9rem; }
.bw-notice { border-radius: 10px; padding: .85rem 1rem; font-size: .92rem; margin-bottom: 1rem; }
.bw-notice--ok { background: #e8f0e2; color: #3f5230; }
.bw-notice--err { background: #f6e2dc; color: #8d4229; }

/* Entry content */
.bw-entry { background: #fff; border: 1px solid var(--bw-line); border-radius: var(--bw-radius); padding: 2rem; }
.bw-entry img { border-radius: 10px; margin: 1rem 0; }
.bw-breadcrumb { font-size: .82rem; color: var(--bw-muted); margin-bottom: 1rem; }
.bw-breadcrumb a { text-decoration: none; }

/* Footer */
.bw-footer { background: #2c2521; color: rgba(255,255,255,.75); margin-top: 4rem; padding: 3rem 0 2rem; }
.bw-footer h4 { color: #fff; font-family: var(--bw-serif); font-size: 1.1rem; margin-bottom: .6rem; }
.bw-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.bw-footer a:hover { color: var(--bw-gold); }
.bw-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 2rem; }
.bw-footer ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.bw-footer li { padding: .2rem 0; }
.bw-footer__bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .82rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.bw-pagination { display: flex; gap: .5rem; margin-top: 2rem; flex-wrap: wrap; }
.bw-pagination .page-numbers { padding: .45rem .85rem; border: 1px solid var(--bw-line); border-radius: 8px; text-decoration: none; background: #fff; }
.bw-pagination .current { background: var(--bw-terracotta); color: #fff; border-color: var(--bw-terracotta); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
