/*
Theme Name: Studio Nescis Modern
Theme URI: https://www.studionescis.it/
Author: Studio Nescis
Description: Tema WordPress leggero e responsive progettato per Studio Legale Nescis. Nessun page builder e nessun font esterno obbligatorio.
Version: 1.0.17
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: studio-nescis-modern
*/

:root {
  --ink: #242a2a;
  --muted: #68706c;
  --paper: #f7f7f3;
  --white: #ffffff;
  --line: #dfe3dc;
  --green: #6f8f22;
  --green-dark: #506b13;
  --green-soft: #eef3e4;
  --max: 1180px;
  --shadow: 0 18px 55px rgba(25,31,27,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--green); }
button, input, textarea, select { font: inherit; }
.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; }

.site-shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.topbar { background: #202624; color: rgba(255,255,255,.86); font-size: 13px; letter-spacing: .02em; }
.topbar .site-shell { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar__contacts { display: flex; gap: 22px; flex-wrap: wrap; }

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(0,0,0,.07); backdrop-filter: blur(12px); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; min-width: 260px; }
.brand-mark { width: 43px; height: 43px; position: relative; flex: 0 0 auto; }
.brand-mark::before { content: ""; position: absolute; left: 4px; right: 4px; top: 5px; height: 4px; background: #3f4543; transform: skewX(-16deg); }
.brand-mark::after { content: ""; position: absolute; left: 10px; top: 14px; width: 23px; height: 24px; border-left: 5px solid var(--green); border-right: 5px solid var(--green); box-shadow: inset 6px 0 0 transparent; }
.brand-mark span { position: absolute; width: 5px; height: 24px; background: var(--green); left: 19px; top: 14px; }
.brand-title { font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.05; font-weight: 600; }
.brand-subtitle { display: block; margin-top: 5px; color: var(--green-dark); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }

.primary-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.primary-nav li { margin: 0; }
.primary-nav a { color: #343a37; text-decoration: none; font-size: 14px; font-weight: 650; letter-spacing: .015em; white-space: nowrap; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { color: var(--green-dark); }
.menu-toggle { display: none; border: 0; background: transparent; padding: 10px; cursor: pointer; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 25px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

.hero { position: relative; min-height: 620px; display: grid; align-items: center; overflow: hidden; background: #303631; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,24,21,.92) 0%, rgba(18,24,21,.73) 48%, rgba(18,24,21,.22) 100%), url('assets/images/studio-hero.jpg') center/cover no-repeat; transform: scale(1.015); }
.hero::after { content: ""; position: absolute; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.18); right: 8%; top: 18%; transform: rotate(45deg); }
.hero .site-shell { position: relative; z-index: 2; }
.hero-copy { max-width: 750px; padding: 86px 0 96px; color: white; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; color: #dce7c2; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: #a8bd70; }
.hero h1 { margin: 0 0 22px; max-width: 700px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 7vw, 78px); line-height: .99; font-weight: 500; letter-spacing: -.035em; }
.hero-lead { max-width: 650px; margin: 0 0 34px; color: rgba(255,255,255,.91); font-size: clamp(19px,2.1vw,25px); line-height: 1.45; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border: 1px solid var(--green); background: var(--green); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .03em; transition: .2s ease; }
.button:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; transform: translateY(-1px); }
.button--ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.button--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.home-strip { border-bottom: 1px solid var(--line); background: var(--white); }
.home-strip .site-shell { display: grid; grid-template-columns: repeat(3,1fr); }
.strip-item { padding: 25px 28px; border-right: 1px solid var(--line); }
.strip-item:first-child { padding-left: 0; }
.strip-item:last-child { border-right: 0; }
.strip-item strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 600; }
.strip-item span { color: var(--muted); font-size: 13px; }

.section { padding: 94px 0; }
.section--paper { background: var(--paper); }
.section-heading { max-width: 760px; margin-bottom: 46px; }
.section-kicker { display: block; margin-bottom: 12px; color: var(--green-dark); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .16em; }
.section h2 { margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px,4.3vw,52px); line-height: 1.12; font-weight: 500; letter-spacing: -.02em; }
.section-intro { margin: 0; color: var(--muted); font-size: 19px; }

.practice-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.practice-card { min-height: 240px; padding: 30px 26px; background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.practice-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: .25s ease; }
.practice-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #ccd5bc; }
.practice-card:hover::before { transform: scaleX(1); }
.practice-no { color: var(--green); font-family: Georgia, serif; font-size: 15px; }
.practice-card h3 { margin: 45px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; }
.practice-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.studio-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(45px,8vw,105px); align-items: center; }
.studio-photo { position: relative; max-width: 430px; margin: auto; }
.studio-photo img { display: block; width: 100%; min-height: 520px; object-fit: cover; box-shadow: var(--shadow); }
.studio-photo::after { content: ""; position: absolute; width: 68%; height: 68%; right: -24px; bottom: -24px; border: 1px solid #a9b88c; z-index: -1; }
.studio-copy p { color: #4f5753; }
.studio-copy .button { margin-top: 13px; }

.tradition { padding: 82px 0; background: #232a27; color: #fff; }
.tradition-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; }
.tradition h2 { color: #fff; }
.tradition p { color: rgba(255,255,255,.76); }
.tradition-year { font-family: Georgia, serif; font-size: clamp(70px,10vw,130px); line-height: .8; color: rgba(160,187,99,.9); letter-spacing: -.06em; }

.resources-section { background: #fff; }
.resources-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.resource-card { min-height: 270px; padding: 30px 28px; border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; align-items: flex-start; position: relative; overflow: hidden; }
.resource-card::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--green); }
.resource-tag { color: var(--green-dark); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.resource-card h3 { margin: 28px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 27px; line-height: 1.15; font-weight: 600; }
.resource-card p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.resource-link { margin-top: auto; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 750; }
.resource-link span { display: inline-block; margin-left: 7px; color: var(--green); transition: transform .2s ease; }
.resource-link:hover span { transform: translateX(4px); }
.resources-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; }

.contact-band { padding: 70px 0; background: var(--green-soft); }
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.contact-band h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: clamp(32px,4vw,48px); font-weight: 500; }
.contact-band p { margin: 0; color: var(--muted); }
.contact-details { display: grid; gap: 12px; }
.contact-line { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 11px; border-bottom: 1px solid rgba(80,107,19,.2); }
.contact-line span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.contact-line a, .contact-line strong { color: var(--ink); font-weight: 700; text-decoration: none; text-align: right; }

.page-hero { padding: 68px 0 58px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { color: var(--green-dark); }
.page-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(40px,6vw,65px); line-height: 1.08; font-weight: 500; }
.content-wrap { width: min(calc(100% - 40px), 900px); margin: 0 auto; padding: 65px 0 90px; }
.entry-content { font-size: 17px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: Georgia, serif; line-height: 1.25; }
.entry-content img.alignright { float: right; margin: 5px 0 26px 35px; max-width: 38%; }
.entry-content img.alignleft { float: left; margin: 5px 35px 26px 0; max-width: 38%; }
.entry-content table { width: 100% !important; height: auto !important; border-collapse: collapse; margin: 25px 0; background: #fff; }
.entry-content td, .entry-content th { width: auto !important; height: auto !important; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry-content iframe { display: block; width: 100% !important; max-width: 100%; min-height: 480px; border: 0; }
.entry-content ul { padding-left: 1.2em; }
.entry-content li { margin-bottom: .55em; }

.site-footer { background: #1f2523; color: rgba(255,255,255,.72); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .65fr .85fr .8fr; gap: 38px; padding-bottom: 45px; }
.footer-brand .brand { color: #fff; min-width: 0; }
.footer-brand .brand-subtitle { color: #b4c58d; }
.footer-brand p { max-width: 430px; font-size: 14px; }
.footer-title { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 5px 0; }
.footer-links a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 24px; font-size: 12px; }
.footer-bottom a { color: rgba(255,255,255,.72); }

.post-list article { padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: 32px; margin: 0 0 7px; }
.post-list h2 a { color: var(--ink); text-decoration: none; }


/* Professionisti / contatti */
.professionals-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin: 28px 0 24px; }
.professional-card { padding: 24px; background: #fff; border: 1px solid rgba(80,107,19,.20); box-shadow: 0 10px 28px rgba(25,31,27,.06); }
.professional-card h3 { margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; }
.professional-role { display: block; margin-bottom: 16px; color: var(--green-dark); font-size: 12px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.professional-card p { margin: 7px 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.professional-card a { color: var(--ink); text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.professional-card a:hover { color: var(--green-dark); }
.contact-office { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(80,107,19,.2); }
.contact-office p { margin: 5px 0; }
.contact-page-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: start; }
.contact-page-panel { padding: 28px; background: var(--paper); border: 1px solid var(--line); }
.contact-page-panel h2 { margin-top: 0; font-size: 30px; }

@media (max-width: 760px) {
  .professionals-grid, .contact-page-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .site-shell { width: min(calc(100% - 30px), var(--max)); }
  .topbar__contacts span:first-child { display: none; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 86px; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 24px; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav li { border-bottom: 1px solid #eee; }
  .primary-nav a { display: block; padding: 12px 4px; }
  .hero { min-height: 560px; }
  .hero::after { display: none; }
  .practice-grid { grid-template-columns: repeat(2,1fr); }
  .resources-grid { grid-template-columns: 1fr; }
  .studio-grid, .tradition-grid, .contact-grid { grid-template-columns: 1fr; }
  .studio-photo { max-width: 100%; }
  .studio-photo img { min-height: 420px; max-height: 600px; }
  .tradition-grid { gap: 35px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar .site-shell { min-height: 34px; }
  .topbar__contacts { width: 100%; justify-content: space-between; gap: 10px; font-size: 12px; }
  .brand { min-width: 0; gap: 10px; }
  .brand-mark { width: 38px; height: 38px; transform: scale(.9); transform-origin: left center; }
  .brand-title { font-size: 18px; }
  .brand-subtitle { font-size: 9px; letter-spacing: .09em; }
  .header-inner { min-height: 76px; }
  .primary-nav { top: 76px; }
  .hero { min-height: 520px; }
  .hero::before { background: linear-gradient(90deg, rgba(18,24,21,.9), rgba(18,24,21,.67)), url('assets/images/studio-hero.jpg') 58% center/cover no-repeat; }
  .hero-copy { padding: 65px 0 72px; }
  .hero h1 { font-size: 48px; }
  .hero-actions .button { width: 100%; }
  .home-strip .site-shell { grid-template-columns: 1fr; padding: 10px 0; }
  .strip-item, .strip-item:first-child { padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .strip-item:last-child { border-bottom: 0; }
  .section { padding: 70px 0; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice-card { min-height: 210px; }
  .studio-photo::after { right: -10px; bottom: -10px; }
  .entry-content img.alignright, .entry-content img.alignleft { float: none; margin: 20px auto; max-width: 100%; display: block; }
  .entry-content table, .entry-content tbody, .entry-content tr, .entry-content td { display: block; width: 100% !important; }
  .entry-content tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .entry-content td { border: 0; padding: 7px 10px; }
  .entry-content iframe { min-height: 360px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-bottom: 8px; }
}

/* Come raggiungerci */
.directions-section { padding: 72px 0 90px; background: #fff; }
.directions-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(36px,6vw,78px); align-items: start; }
.directions-copy h2 { margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px,3vw,34px); line-height: 1.18; font-weight: 500; letter-spacing: -.02em; }
.directions-copy > p { margin: 0 0 30px; color: var(--muted); font-size: 17px; }
.directions-details { border-top: 1px solid var(--line); }
.directions-detail { display: grid; grid-template-columns: 105px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.directions-detail > span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.directions-detail strong, .directions-detail a { color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.directions-detail a:hover { color: var(--green-dark); }
.directions-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }
.directions-contact-link { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 750; }
.directions-contact-link span { margin-left: 6px; color: var(--green); }
.directions-map { overflow: hidden; min-height: 520px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.directions-map iframe { display: block; width: 100%; height: 520px; border: 0; }

@media (max-width: 860px) {
  .directions-grid { grid-template-columns: 1fr; }
  .directions-map, .directions-map iframe { min-height: 430px; height: 430px; }
}

@media (max-width: 520px) {
  .directions-section { padding: 58px 0 70px; }
  .directions-detail { grid-template-columns: 1fr; gap: 4px; }
  .directions-actions .button { width: 100%; }
  .directions-map, .directions-map iframe { min-height: 360px; height: 360px; }
}


/* Collegamenti */
.links-section { padding: 72px 0 90px; background: #fff; }
.links-intro { max-width: 760px; margin: 0 0 34px; color: var(--muted); font-size: 17px; }
.links-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.link-card { display: flex; justify-content: space-between; gap: 22px; align-items: center; min-height: 108px; padding: 22px 24px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.link-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(25,31,27,.07); border-color: #cbd5bd; }
.link-card strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.25; font-weight: 600; }
.link-card span { flex: 0 0 auto; color: var(--green); font-size: 22px; }
.documents-panel { margin-top: 38px; padding: 28px; background: var(--green-soft); border: 1px solid rgba(80,107,19,.18); }
.documents-panel h2 { margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; }
.document-links { display: flex; flex-wrap: wrap; gap: 12px; }
.document-links .button { font-size: 13px; }
@media (max-width: 720px) { .links-grid { grid-template-columns: 1fr; } .link-card { min-height: 92px; } }

.button--ghost-dark { background: transparent; color: var(--green-dark); border-color: rgba(80,107,19,.45); }
.button--ghost-dark:hover { background: #fff; color: var(--green-dark); }
