/*
Theme Name: Dho Artigiana
Theme URI: https://www.falegnameriartigianadho.com/
Author: Falegnameria Artigiana Dho
Description: Tema leggero e responsive ricostruito per Falegnameria Artigiana Dho.
Version: 1.0.0
Requires at least: 7.0
Requires PHP: 8.3
Text Domain: dho-artigiana
License: GPL-2.0-or-later
*/

:root {
  --dho-ink: #25231f;
  --dho-muted: #6c675e;
  --dho-cream: #f5f1e9;
  --dho-paper: #fffdf8;
  --dho-wood: #8a5a2b;
  --dho-wood-dark: #56381d;
  --dho-line: #ded6c8;
  --dho-max: 1180px;
  --dho-radius: 3px;
  --dho-shadow: 0 18px 48px rgb(37 35 31 / 12%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--dho-ink);
  background: var(--dho-paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--dho-wood-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--dho-wood); }
.container { width: min(calc(100% - 40px), var(--dho-max)); margin-inline: 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;
}
.screen-reader-text:focus {
  z-index: 100000; top: 8px; left: 8px; width: auto; height: auto; padding: 12px;
  clip: auto; background: white;
}

.site-header {
  position: sticky; z-index: 30; top: 0;
  background: rgb(255 253 248 / 96%); border-bottom: 1px solid var(--dho-line);
  backdrop-filter: blur(10px);
}
.header-inner {
  min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.custom-logo { width: auto; max-height: 86px; }
.site-title { margin: 0; font-family: Georgia, serif; font-size: clamp(1.35rem, 2vw, 2rem); }
.site-title a { color: var(--dho-ink); text-decoration: none; }
.site-description { margin: 2px 0 0; color: var(--dho-muted); font-size: .86rem; letter-spacing: .03em; }
.menu-toggle {
  display: none; border: 1px solid var(--dho-line); padding: 10px 14px; color: var(--dho-ink);
  background: transparent; font: inherit; cursor: pointer;
}
.primary-menu, .primary-menu ul { padding: 0; margin: 0; list-style: none; }
.primary-menu { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.primary-menu a { color: var(--dho-ink); font-size: .85rem; font-weight: 700; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--dho-wood); }
.primary-menu .menu-item-has-children { position: relative; }
.primary-menu .sub-menu {
  position: absolute; top: 100%; left: -18px; min-width: 260px; padding: 16px 18px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
  background: var(--dho-paper); border: 1px solid var(--dho-line); box-shadow: var(--dho-shadow);
}
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu li + li { margin-top: 8px; }

.hero {
  position: relative; min-height: min(680px, 72vh); display: grid; align-items: end; color: white;
  background: linear-gradient(90deg, rgb(24 18 11 / 82%), rgb(24 18 11 / 20%)), var(--hero-image, linear-gradient(135deg, #3d2b1c, #8b6841));
  background-position: center; background-size: cover;
}
.hero .container { padding-block: clamp(80px, 12vw, 150px) clamp(70px, 9vw, 115px); }
.hero-kicker, .section-kicker { margin: 0 0 8px; font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 800px; margin: 0; font-family: Georgia, serif; font-size: clamp(2.65rem, 7vw, 6rem); font-weight: 500; line-height: .98; }
.hero p { max-width: 650px; margin: 26px 0 0; font-size: clamp(1rem, 2vw, 1.28rem); }
.button, .wp-block-button__link {
  display: inline-block; padding: 13px 24px; color: white; background: var(--dho-wood);
  border: 1px solid var(--dho-wood); border-radius: var(--dho-radius); font-weight: 700;
  letter-spacing: .04em; text-decoration: none;
}
.button:hover, .wp-block-button__link:hover { color: white; background: var(--dho-wood-dark); border-color: var(--dho-wood-dark); }

.site-main { min-height: 55vh; }
.content-area { padding-block: clamp(56px, 8vw, 100px); }
.page-header { padding: 60px 0; color: white; background: var(--dho-wood-dark); }
.page-header h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 500; line-height: 1.08; }
.entry-content { max-width: 900px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.25em; }
.entry-content > .alignwide { width: min(1120px, calc(100vw - 40px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; font-family: Georgia, serif; line-height: 1.2; }
.entry-content h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.entry-content figure { margin-inline: 0; }
.entry-content .wp-block-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.entry-content .wp-block-gallery figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.entry-content .wp-block-gallery img { width: 100%; height: 100%; object-fit: cover; }
.contact-form { max-width: 720px; margin-top: 38px; padding: 30px; background: var(--dho-cream); border: 1px solid var(--dho-line); }
.contact-form label { display: block; font-weight: 700; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: 12px 14px; color: var(--dho-ink); background: white;
  border: 1px solid #bdb3a3; border-radius: 0; font: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid rgb(138 90 43 / 25%); border-color: var(--dho-wood); }
.contact-form .form-consent label { font-size: .9rem; font-weight: 400; }
.form-message { max-width: 720px; padding: 14px 18px; border-left: 4px solid; }
.form-success { background: #edf7ed; border-color: #357a38; }
.form-error { background: #fff0f0; border-color: #b3261e; }

.services-section, .partners-section { padding-block: clamp(60px, 9vw, 110px); }
.services-section { background: var(--dho-cream); }
.section-heading { max-width: 760px; margin-bottom: 42px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.1rem, 5vw, 4rem); font-weight: 500; line-height: 1.08; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  min-height: 380px; position: relative; display: flex; align-items: end; overflow: hidden;
  color: white; background: #574534; box-shadow: var(--dho-shadow);
}
.card::after { position: absolute; inset: 0; content: ""; background: linear-gradient(transparent 25%, rgb(17 13 9 / 88%)); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover img { transform: scale(1.035); }
.card-content { position: relative; z-index: 1; width: 100%; padding: 28px; }
.card-kicker { margin: 0; opacity: .8; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.card h3 { margin: 5px 0 15px; font-family: Georgia, serif; font-size: 1.65rem; line-height: 1.1; }
.card a { color: white; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: white; border: 1px solid var(--dho-line); }
.post-card-content { padding: 24px; }
.post-card h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 1.55rem; line-height: 1.25; }
.post-card h2 a { color: var(--dho-ink); text-decoration: none; }
.post-meta { color: var(--dho-muted); font-size: .82rem; }

.contact-band { padding: 66px 0; color: white; background: var(--dho-wood); }
.contact-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.contact-band h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 500; }
.contact-band .button { color: var(--dho-ink); background: white; border-color: white; }
.site-footer { padding: 64px 0 22px; color: #eee7dc; background: #211d18; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 45px; }
.site-footer h2, .site-footer h3 { color: white; font-family: Georgia, serif; }
.site-footer h2 { margin: 0; font-size: 1.6rem; }
.site-footer h3 { margin-top: 0; }
.site-footer a { color: #eee7dc; }
.site-footer ul { padding: 0; list-style: none; }
.site-footer li + li { margin-top: 7px; }
.footer-bottom { margin-top: 45px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 15%); font-size: .82rem; }
.whatsapp-link {
  position: fixed; z-index: 28; right: 22px; bottom: 22px; display: grid; width: 56px; height: 56px;
  place-items: center; color: white; background: #1d9f61; border-radius: 50%; box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
  font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-decoration: none;
}
.whatsapp-link:hover { color: white; background: #147a48; }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .site-navigation {
    position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 20px;
    background: var(--dho-paper); border-bottom: 1px solid var(--dho-line); box-shadow: var(--dho-shadow);
  }
  .site-navigation.is-open { display: block; }
  .primary-menu { align-items: stretch; flex-direction: column; gap: 12px; }
  .primary-menu .sub-menu { position: static; display: block; padding: 10px 0 0 20px; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; }
  .cards, .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  body.admin-bar .site-header { top: 46px; }
  .container { width: min(calc(100% - 28px), var(--dho-max)); }
  .header-inner { min-height: 84px; }
  .custom-logo { max-height: 68px; }
  .site-description { display: none; }
  .hero { min-height: 610px; }
  .cards, .posts-grid, .footer-grid { grid-template-columns: 1fr; }
  .card { min-height: 350px; }
  .contact-band-inner { align-items: flex-start; flex-direction: column; }
  .entry-content .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
}
