/*        Version: 1.3 - Last Update: 14-07-2026 - h 20:30       */

:root {
    --primary: #0a1f35;
    --accent: #d4af37;
    --accent-hover: #b8962c;
    --text: #2c3e50;
    --light: #f0f2f5;
    --white: #fdfbf7;
    --pure-white: #ffffff;
    --nav-height: clamp(3.5rem, 8vh, 4.5rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem);
    scrollbar-gutter: stable;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
}

/* Prevent hyphenation and word breaking globally across all text elements */
p,
li,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span,
strong {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    /* Permette di andare a capo solo se la parola è più lunga dell'intera riga, altrimenti la sposta intera */
}

section {
    scroll-margin-top: var(--nav-height);
}

.container {
    width: 100%;
    max-width: 100rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 5vh, 3.75rem) 5%;
}

.bg-light {
    background-color: var(--light);
}

.text-center {
    text-align: center;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    z-index: 3000;
    box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.1);
}

.mobile-only-lang {
    display: none;
}

/* Navbar Right Layout */
.nav-right {
    display: flex;
    align-items: center;
}

/* Language Dropdown Styles */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 1.5rem;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: rgba(253, 251, 247, 0.9);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.625rem 0;
    transition: color 0.3s ease;
}

.lang-dropdown-btn:hover {
    color: var(--accent);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--white);
    min-width: 8rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.lang-dropdown-content a {
    color: var(--primary);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-dropdown-content a:hover {
    background-color: var(--light);
    color: var(--accent);
}

.lang-dropdown-content a.active {
    color: var(--accent);
    background-color: rgba(212, 175, 55, 0.05);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: clamp(2.5rem, 7.5vh, 3.6rem);
    width: auto;
    display: block;
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: rgba(253, 251, 247, 0.9);
    margin-left: 1.5rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.hero {
    min-height: 100dvh;
    height: auto;
    background: var(--primary);
    background-image: url('img/hero.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 31, 53, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 1.25rem;
    margin-top: var(--nav-height);
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    font-weight: 300;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.05em;
    border-radius: 0.25rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
}

p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    word-break: break-word;
}

.p-card {
    max-width: 30rem;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.specializzazione {
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.625rem;
}

.abilitazione {
    font-style: italic;
    font-size: 0.95rem;
}

.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.875rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.875rem;
    padding: 0;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-top: 0.25rem solid var(--accent);
    border-radius: 0.5rem;
    box-shadow: 0 0.625rem 2rem rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.12);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.section {
    min-height: calc(100vh - var(--nav-height));
    height: auto;
    padding: clamp(1.25rem, 5vh, 3rem) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.last-section {
    min-height: calc(100dvh - var(--nav-height) - 12rem);
    height: auto;
    padding: clamp(1rem, 3dvh, 2rem) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-section {
    padding: clamp(1rem, 3vh, 2rem) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    margin-top: 0;
    margin-bottom: clamp(1.5rem, 5vh, 2.5rem);
}

.section-title::after {
    content: '';
    display: block;
    width: 3.75rem;
    height: 0.1875rem;
    background: var(--accent);
    margin: 1rem 0;
}

.text-center.section-title::after {
    margin: 1rem auto;
}

.section *:last-child {
    margin-bottom: 0;
}

/* LO STUDIO */
#lo-studio .flex-grid {
    align-items: center;
    justify-content: center;
}

#lo-studio .img-box {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Studio Slider */
.studio-slider {
    position: relative;
    width: 100%;
    max-width: 42rem;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    border-radius: 0.25rem;
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.5s ease-in-out, transform 6s linear;
}

.slider-img.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
}

#lo-studio .text-box {
    flex: 1;
    padding-right: 1.25rem;
}

.main-content-flex {
    display: flex !important;
    flex-direction: row;
    gap: 2.5rem;
    align-items: flex-start;
}


/* ATTIVITA' */
.card-attivita, .card-attivita-bancario {
    background: var(--white);
    padding: 1.875rem;
    border: 1px solid rgba(10, 31, 53, 0.05);
    border-top: 0.25rem solid var(--accent);
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(10, 31, 53, 0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
    cursor: pointer;
}

.card-attivita:hover, .card-attivita-bancario:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(10, 31, 53, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.iconcina {
    margin-bottom: 1rem;
    height: 5rem;
    width: auto;
    mix-blend-mode: multiply;
}


/* PAGINE ATTIVITA' */

.text-box-main {
    flex: 2;
}

aside.text-box {
    flex: 1.2;
}

.activity-list {
    list-style-position: outside;
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
}

.activity-list li {
    margin-bottom: 0.5rem;
}

.two-columns {
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    column-gap: 2.5rem;
}

@media (max-width: 48rem) {
    .two-columns {
        columns: 1;
        -webkit-columns: 1;
        -moz-columns: 1;
    }
}

aside.text-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem !important;
    background-color: #f4f4f4;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05);
}

aside.text-box h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.2;
}

aside.text-box p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.5;
}

aside.text-box .btn {
    align-self: flex-start;
    text-align: center;
    padding: 0.75rem 1.5rem !important;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    margin: 0;
}

main {
    width: 100%;
}

main,
.main-content-flex,
section.section,
section.last-section,
section.page-section {
    flex: 1 0 auto;
}

.footer {
    margin-top: auto;
}




/* PAGINA CONTATTI */
.flex-grid.align-start {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5rem;
    width: 100%;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 20rem;
}

.map-container {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 0;
    margin-top: 1.25rem;
    min-height: clamp(12rem, 35dvh, 18rem);
}

.map-placeholder-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    color: var(--primary);
    font-size: 0.95rem;
    z-index: 1;
    line-height: 1.4;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
    /* Il bordo ora è qui */
    border-radius: 8px;
}

.map-placeholder-text p {
    margin-bottom: 0.75rem;
}

.map-placeholder-text a {
    display: inline-block;
    font-weight: 600;
}

.map-placeholder-text::before {
    content: '📍';
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

.map-container iframe {
    position: relative;
    z-index: 2;
    width: 100%;
    height: clamp(12rem, 35dvh, 18rem);
    border: 0;
    background: transparent;
}

.contact-info .details {
    margin-top: 1.25rem;
    text-align: left;
}

.contact-info .details p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: normal;
}

.contact-info .details a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
}

.contact-info .details a:hover {
    color: var(--accent);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-form input {
    width: 100%;
    padding: clamp(0.5rem, 1.5dvh, 0.75rem) !important;
    border: 1px solid #ccc;
    border-radius: 0.125rem;
    font-family: inherit;
    font-size: 0.9rem;
    height: clamp(2.5rem, 5dvh, 3rem);
}

.contact-form textarea {
    width: 100%;
    padding: clamp(0.5rem, 1.5dvh, 0.75rem) !important;
    border: 1px solid #ccc;
    border-radius: 0.125rem;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: clamp(6rem, 18dvh, 12rem);
}

.btn-full {
    width: 100%;
}


/* MODAL INVIO MAIL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 31, 53, 0.80);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 0.5rem;
    text-align: center;
    max-width: 28rem;
    width: 90%;
    border-top: 0.3125rem solid var(--accent);
    box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.2);
}

.modal-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-top: 0.625rem;
    margin-bottom: 0.625rem;
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #666;
}



/* FOOTER */
.footer {
    background: var(--primary);
    color: var(--white);
    border-top: 0.1875rem solid var(--accent);
    font-size: 0.85rem;
    text-align: center;
    padding: 0;
}

.footer .container {
    padding: 1.875rem 5%;
}

.footer p {
    margin-bottom: 3px;
    text-align: center;
    text-justify: none;
    hyphens: none;
}

.footer strong {
    font-size: 0.95rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    transition: 0.3s;
}

.footer a:hover {
    text-decoration: underline;
}

.f-links {
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.f-links a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 31.25em) {
    .f-bar-1 {
        display: none;
    }

    .f-piva {
        display: block;
        margin-top: 0.2rem;
    }
}

@media (max-width: 27.19em) {
    .f-bar-2 {
        display: none;
    }

    .f-copy {
        display: block;
        margin-bottom: 0.3rem;
    }
}


/* AVVOCATO */
#avvocato .flex-grid {
    align-items: stretch;
    justify-content: center;
}

#avvocato .card {
    flex: 1;
    min-width: 18.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: none;
    cursor: default;
}

#avvocato .card:hover {
    transform: none;
    box-shadow: 0 0.625rem 2rem rgba(0, 0, 0, 0.08);
}

.p-card p {
    text-align: center;
    text-justify: none;
    hyphens: none;
}

.avvocato-desc {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.img-avvocato {
    width: 15.625rem;
    height: 21rem;
    object-fit: cover;
    border: none;
    box-shadow: 0 0.625rem 2rem rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
}

.p-card h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
}


/*COLLABORAZIONI */
.collaboration-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.625rem 2rem rgba(0, 0, 0, 0.05);
    border-top: 0.25rem solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
}

.collaboration-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.0625rem;
}

.collaboration-card .details {
    font-size: 0.9rem;
}

.collaboration-card .details+.details {
    margin-top: 0.75rem;
}

.collaboration-card .details p {
    margin-bottom: 0.25rem;
}

.collaboration-card .details .partner-name {
    color: var(--primary);
    font-size: 1rem;
}

.collaboration-inner {
    width: 100%;
}

.appuntamento {
    font-size: 0.9rem;
    text-align: justify;
}

/* MOBILE */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 1.5rem;
    height: 0.1875rem;
    background: var(--white);
    margin: 0.3125rem;
}

@media (max-width: 88.44em) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primary);
        transition: 0.4s;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
    }

    .nav-link {
        margin: 1rem 0;
        font-size: 1.2rem;
    }

    .desktop-only-lang {
        display: none !important;
    }

    .mobile-only-lang {
        margin-top: 2rem;
        display: block;
        padding: 1.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .language-switcher-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .mobile-lang-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--white);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        opacity: 0.7;
    }

    .mobile-lang-options {
        display: flex;
        gap: 1.25rem;
    }

    .mobile-lang-options a {
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        color: var(--white);
        transition: 0.3s;
    }

    .mobile-lang-options a.active {
        color: var(--accent);
    }

    .section {
        padding: 2.5rem 0;
    }

    .hero-content h1 {
        font-size: 3rem;
        line-height: 1.2;
    }

    .hero-content p {
        text-align: center;
        text-justify: none;
        font-size: 1.5rem;
        padding: 0 0.625rem;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    #lo-studio .flex-grid {
        flex-direction: column;
        text-align: center;
    }

    #lo-studio .text-box {
        padding-right: 0;
        margin-bottom: 1.875rem;
    }

    #lo-studio .img-box {
        width: 100%;
    }

    .flex-grid.align-start {
        flex-direction: column !important;
        align-items: stretch;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    #avvocato .flex-grid {
        flex-direction: column;
    }

    #avvocato .card {
        min-width: 100%;
    }

    .img-avvocato {
        width: 100%;
        max-width: 21.875rem;
        height: auto;
        aspect-ratio: 2/3;
    }

    .main-content-flex {
        flex-direction: column !important;
    }

    .text-box-main,
    aside.text-box {
        width: 100% !important;
        flex: none !important;
    }

    aside.text-box {
        padding: 1.875rem !important;
        margin-top: 1.875rem;
        text-align: center;
    }

    aside.text-box .btn {
        align-self: center;
        width: 100%;
    }

    .page-section {
        padding: 0;
    }

    .appuntamento {
        text-align: center;
    }
}

/* ANIMATIONS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(1.875rem);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(1.875rem);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.fade-in {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 88.44em) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 56.25em) {
    .grid-3 {
        grid-template-columns: 1fr;
        padding: 0.3125rem;
        /* allarga leggermente il riquadro */
    }

    .collaboration-card {
        align-items: center;
        text-align: center;
    }

    .collaboration-inner {
        text-align: center;
    }
}

/* SEO UTILITIES */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* CROSS-LINKING SECTION */
.cross-linking-section {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(10, 31, 53, 0.08);
}

.cross-linking-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cross-linking-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cross-link-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.cross-link-item:hover {
    color: var(--accent-hover);
}

.cross-link-item svg {
    transition: transform 0.3s;
}

.cross-link-item:hover svg {
    transform: translateX(4px);
}