/*
Theme Name: Studio Consulenza Legale Pilati V3
Version: 3.1.9
*/

:root {
    --navy: #14243a;
    --gold: #b79a5a;
    --ink: #202733;
    --muted: #667085;
    --paper: #faf9f6;
    --soft: #f3f1eb;
    --line: #e6e0d4;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.68;
}

a {
    color: inherit;
}

/* =========================
   HEADER
   ========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.header-inner {
    max-width: 1180px;
    margin: auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    color: var(--navy);
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border: 1px solid var(--gold);
    display: grid;
    place-items: center;
    font: 700 18px Georgia, serif;
    color: var(--gold);
    flex: none;
}

.brand-copy strong {
    display: block;
    font: 600 1.08rem Georgia, serif;
}

.brand-copy span {
    display: block;
    color: var(--gold);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
}

/* =========================
   LOGO PERSONALIZZATO
   ========================= */

.custom-logo-link {
    display: flex;
    align-items: center;
    flex: none;
    width: 300px;
    max-width: 300px;
}

.custom-logo {
    width: 300px;
    height: auto;
    max-height: 75px;
    object-fit: contain;
    display: block;
}

/* =========================
   MENU
   ========================= */

.nav {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav ul {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    display: block;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--gold);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    padding: 7px 10px;
}

/* =========================
   STRUMENTI HEADER
   ========================= */

.header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: none;
}

/* =========================
   LINGUA
   ========================= */

.pilati-language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.language-active {
    color: var(--navy);
}

.language-separator {
    color: var(--line);
}

.language-disabled {
    color: #a0a7b0;
    cursor: default;
}

/* =========================
   PLAYER MUSICA
   ========================= */

.pilati-music-player {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 175px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
}

.pilati-music-player button {
    width: 29px;
    height: 29px;
    padding: 0;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 0.72rem;
    line-height: 1;
    flex: none;
}

.pilati-music-player button:hover {
    opacity: 0.88;
}

.pilati-music-info {
    min-width: 0;
    flex: 1;
}

.pilati-music-info > span {
    display: block;
    color: var(--navy);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pilati-music-progress {
    width: 100%;
    height: 2px;
    margin-top: 5px;
    background: #e8e4dc;
    overflow: hidden;
}

.pilati-music-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--gold);
    transition: width 0.1s linear;
}

/* =========================
   HERO
   ========================= */

.hero {
    background: linear-gradient(135deg, var(--navy), #253c59);
    color: #fff;
}

.hero-inner {
    max-width: 1180px;
    margin: auto;
    padding: 92px 24px 84px;
}

.eyebrow {
    color: #dbc48f;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.73rem;
    font-weight: 700;
}

.hero h1 {
    font: 400 clamp(2.35rem, 5vw, 4.35rem) / 1.08 Georgia, serif;
    max-width: 900px;
    margin: 15px 0;
}

.hero p {
    max-width: 760px;
    font-size: 1.08rem;
    color: #e9edf3;
}

.gold-rule {
    height: 2px;
    width: 76px;
    background: var(--gold);
    margin: 24px 0;
}

.btn {
    display: inline-block;
    padding: 11px 18px;
    border: 1px solid var(--gold);
    text-decoration: none;
    border-radius: 2px;
    margin: 7px 8px 0 0;
}

.btn.primary {
    background: var(--gold);
    color: #fff;
}

/* =========================
   SEZIONI
   ========================= */

.section {
    max-width: 1180px;
    margin: auto;
    padding: 70px 24px;
    background: var(--paper);
}

.section.soft {
    max-width: none;
    background: var(--soft);
}

.section.soft > .section-inner {
    max-width: 1180px;
    margin: auto;
}

.section h2 {
    font: 400 clamp(1.85rem, 3vw, 2.7rem) / 1.15 Georgia, serif;
    color: var(--navy);
    margin: 0 0 14px;
}

.lead {
    max-width: 820px;
    color: #4d5968;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.card {
    border: 1px solid var(--line);
    padding: 25px;
    background: #fff;
    text-decoration: none;
}

.card h3 {
    margin-top: 0;
    color: var(--navy);
    font: 600 1.12rem Georgia, serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================
   ICONE AREE PRINCIPALI
   ========================= */

/* Base comune */
.grid .card h3::before {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    flex: 0 0 25px !important;
    color: var(--gold) !important;
    font-family: "Segoe UI Symbol", "Arial Unicode MS", Georgia, serif !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Diritto amministrativo — bilancia */
.grid .card:nth-child(1) h3::before {
    content: "⚖";
    font-size: 23px;
}

/* Terzo Settore — comunità / rete */
.grid .card:nth-child(2) h3::before {
    content: "♧";
    font-size: 25px;
}

/* Consulenza stragiudiziale — documento */
.grid .card:nth-child(3) h3::before {
    content: "▱";
    font-size: 25px;
}

.card p {
    color: var(--muted);
    margin-bottom: 0;
}

.tag {
    display: inline-block;
    border: 1px solid #d8cfbd;
    padding: 5px 9px;
    margin: 4px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.contact-box {
    border-left: 3px solid var(--gold);
    padding: 8px 0 8px 22px;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    background: var(--navy);
    color: #eef2f6;
}

.footer-inner {
    max-width: 1180px;
    margin: auto;
    padding: 42px 24px;
}

.footer-inner a {
    color: #fff;
}

.footer-meta {
    color: #c7d0db;
    font-size: 0.88rem;
}

.notice {
    padding: 16px 20px;
    background: var(--soft);
    border: 1px solid var(--line);
    margin-top: 20px;
}

/* =========================
   TARIFFE
   ========================= */

.tariffe-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0 3rem;
    -webkit-overflow-scrolling: touch;
}

.tariffe-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.tariffe-table th,
.tariffe-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

.tariffe-table th {
    font-weight: 600;
    border-bottom: 2px solid var(--gold);
    white-space: nowrap;
}

.tariffe-table th:first-child,
.tariffe-table td:first-child {
    width: 55px;
    text-align: center;
}

.tariffe-table th:nth-child(3),
.tariffe-table td:nth-child(3) {
    width: 180px;
}

.tariffe-table th:nth-child(4),
.tariffe-table td:nth-child(4) {
    width: 190px;
}

.tariffe-table tbody tr:hover {
    background: #faf8f3;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1100px) {

    .header-inner {
        gap: 20px;
    }

    .custom-logo-link {
        width: 270px;
        max-width: 270px;
    }

    .custom-logo {
        width: 270px;
        max-height: 68px;
    }

    .nav,
    .nav ul {
        gap: 13px;
    }

    .nav a {
        font-size: 0.86rem;
    }

    .header-tools {
        gap: 10px;
    }

    .pilati-music-player {
        min-width: 150px;
    }
}

@media (max-width: 900px) {

    .header-inner {
        align-items: center;
        padding: 12px 18px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        flex: none;
    }

    .nav {
        display: none;
        width: 100%;
        order: 10;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
        padding: 8px 0 4px;
        border-top: 1px solid var(--line);
    }

    .nav.open ul {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .header-tools {
        margin-left: auto;
        gap: 9px;
    }

    .pilati-language-switcher {
        font-size: 0.74rem;
    }

    .pilati-music-player {
        min-width: 145px;
        padding: 5px 7px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding: 70px 22px;
    }

    .section {
        padding: 55px 22px;
    }

    .custom-logo-link {
        width: 200px;
        max-width: 200px;
    }

    .custom-logo {
        width: 200px;
        max-height: 50px;
    }

    .brand-copy strong {
        font-size: 0.95rem;
    }

    .brand-copy span {
        font-size: 0.68rem;
    }
}

@media (max-width: 600px) {

    .header-inner {
        padding: 10px 14px;
        gap: 8px;
    }

    .brand {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .custom-logo-link {
        width: 165px;
        max-width: 165px;
    }

    .custom-logo {
        width: 165px;
        max-height: 44px;
    }

    .brand-copy strong {
        font-size: 0.82rem;
    }

    .brand-copy span {
        font-size: 0.6rem;
        letter-spacing: 0.03em;
    }

    .menu-toggle {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .header-tools {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
        order: 5;
        padding-top: 3px;
    }

    .pilati-music-player {
        flex: 1;
        min-width: 0;
        max-width: 210px;
    }

    .pilati-music-info > span {
        font-size: 0.67rem;
    }

    .tariffe-table {
        min-width: 760px;
        font-size: 0.95rem;
    }

    .tariffe-table th,
    .tariffe-table td {
        padding: 12px 13px;
    }

    .tariffe-table-wrap {
        margin-left: 0;
        margin-right: 0;
    }
}