/*
Theme Name: Studio Legale Essential
Author: Studio Legale
Description: Tema One-Page responsive per Studio Legale.
Version: 5.4
*/

:root {
    --primary-color: #27368B;
    --text-color: #1a1a1a;
    --bg-color-1: #DCD0C0; /* Colore 1: Sabbia / Panna caldo */
    --bg-color-2: #C8BCAC; /* Colore 2: Tortora caldo elegante */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Questrial', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color-1);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.8;
    font-size: 16px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

h2.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

/* ==========================================
   HEADER E NAVIGAZIONE
   ========================================== */
header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(220, 208, 192, 0.98);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo {
    height: 70px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.02);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    white-space: nowrap;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

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

/* ==========================================
   SEZIONI GENERALI & ALTERNANZA COLORI
   ========================================== */
section {
    padding: 140px 8% 80px 8%;
}

/* Presentazione */
.presentazione-card p {
    text-align: justify !important;
    text-justify: inter-word;
}

/* Aree di competenza */
.card-spec .spec-desc,
.card-spec .spec-list,
.card-spec .spec-list li {
    text-align: justify !important;
    text-justify: inter-word;
}

/* Interlinea */
.card-spec .spec-desc,
.card-spec .spec-list li,
.presentazione-card p {
    line-height: 1.8;
}

/* HERO */
.hero {
	position: relative;
	overflow: hidden;
	
   background:
    linear-gradient(
        rgba(208,198,186,.88),
        rgba(208,198,186,.88)
    );

    background-repeat: no-repeat, no-repeat;

    background-size: cover, 100%;

    background-position: center, right 0px center;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 85vh;
    padding-top: 150px;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.hero-img {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px;
}

.hero-img::before {
    content: "";
    position: absolute;
    width: 95%;
    height: 95%;
    border-radius: 18px;

    background: radial-gradient(
        circle,
        rgba(39,54,139,.58) 0%,
        rgba(39,54,139,.38) 35%,
        rgba(39,54,139,.18) 60%,
        rgba(39,54,139,0) 88%
    );

    filter: blur(42px);
    transform: translate(18px,18px);
    z-index: 0;
}

.hero-img img{

    position:relative;
    z-index:2;

    width:100%;
    max-width:500px;
    height:auto;

    padding:12px;

    background:#ffffff;

    border:2px solid #27368B;
    border-radius:8px;

    box-shadow:
        0 25px 60px rgba(0,0,0,.25),
        0 12px 32px rgba(39,54,139,.28);

    transition:all .35s ease;
}

.hero-img img:hover{

    transform:translateY(-6px);

    box-shadow:
        0 35px 75px rgba(0,0,0,.30),
        0 18px 45px rgba(39,54,139,.40);

}

.hero-text h1 {
    font-size: 2rem;
    line-height: 1.35;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-style: italic;
    font-weight: 500;
}

.hero-text h1{
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
}

.hero-text,
.hero-img{

    position:relative;
    z-index:2;

}
.hero .hero-bg-logo{
    position:absolute !important;
    top:50% !important;
    right:-200px !important;
    left:auto !important;
    transform:translateY(-50%) !important;
    width:80% !important;
    max-width:8000px !important;
    opacity:.09;
    z-index:0;
}

/* PRESENTAZIONE */
#presentazione {
    background-color: var(--bg-color-1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.presentazione-card {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255,255,255,.65);
    padding: 3rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.presentazione-card p {
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
    line-height: 1.8;
    hyphens: auto;
}

.presentazione-unica{
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.9;
    color: var(--primary-color);
    text-align: justify;
    text-align-last: left;
    margin:0;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* SPECIALIZZAZIONI */
#specializzazioni {
    background-color: var(--bg-color-2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-specializzazioni {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
}

.card-spec {
    padding: 2.5rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 3px solid var(--primary-color);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-spec:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-spec h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-spec .spec-quote {
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0.85;
}

.spec-list{
    margin:0;
    padding-left:22px;
}

.spec-list li{
    margin-bottom:10px;
    line-height:1.7;
}

.spec-list li:last-child{
    margin-bottom:0;
}

.spec-list li::marker{
    color:#27368B;
}
/* CONTATTI */
#contatti {
    background-color: var(--bg-color-1);
}

.contatti-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
    margin-top: 3rem;
    align-items: stretch;
}

.info-contatti {
    background: rgba(255, 255, 255, 0.35);
    padding: 2.5rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-contatti p {
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-contatti p:last-child {
    margin-bottom: 0;
}

.info-contatti i {
    color: var(--primary-color);
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.info-contatti a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-contatti a:hover {
    color: var(--primary-color);
}

/* FORM DI CONTATTO */
.form-contatti {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.form-group-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fafafa;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(39, 54, 139, 0.1);
}

.btn-submit {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background-color: #1c2766;
    transform: translateY(-2px);
}

/* MAPPA GOOGLE */
.map-container {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin-top: 3.5rem;
}

.map-container iframe {
    width: 100% !important;
    height: 450px !important;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: block;
}

/* WHATSAPP FISSO */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* FOOTER */

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

.site-footer{
    background:#C8BCAC;
    color:#000;
    padding:50px 20px;
    margin-top:80px;
    border-top:1px solid rgba(39,54,139,.15);
}

.footer-container{
    max-width:1100px;
    margin:auto;
    text-align:center;
}

.site-footer h3{
    color:#27368B;
    font-size:1.4rem;
    margin-bottom:20px;
    font-family:var(--font-heading);
}

.site-footer p{
    margin:10px 0;
    line-height:1.8;
    color:#000;
}

.site-footer a{
    color:#27368B;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
}

.site-footer a:hover{
    color:#000;
}

.footer-copy{
    margin-top:25px;
    padding-top:20px;
    border-top:1px solid rgba(0,0,0,.15);
    font-size:.9rem;
    color:#444;
}

/* ==========================================
   LAYOUT RESPONSIVE (MOBILE & TABLET)
   ========================================== */

/* TABLET (da 769px a 900px) */
@media (max-width: 900px) {
    .contatti-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* MOBILE (fino a 768px) */
@media (max-width: 768px) {
    header.site-header {
        flex-direction: column !important;
        padding: 0.6rem 10px !important;
        gap: 0.4rem !important;
        text-align: center !important;
    }

    .logo {
        justify-content: center;
        width: 100%;
    }

    .site-logo { 
        height: 45px !important;
        max-width: 85% !important;
        display: block !important;
        margin: 0 auto !important;
    }

    nav { 
        width: 100% !important; 
    }

    nav ul {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.3rem 0.6rem !important;
        padding: 0 !important;
        white-space: normal !important;
    }

    nav li {
        display: inline-block;
    }

    nav a {
        font-size: 0.85rem !important;
        padding: 3px 6px !important;
        white-space: normal !important;
        display: inline-block;
    }

    section { 
        padding: 100px 5% 50px 5%; 
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 180px !important;
        text-align: center;
    }

    .hero-img img { 
        margin: 0 auto; 
    }
    
    .hero-text h1 { 
        font-size: 2.1rem; 
    }

    .presentazione-card {
        padding: 1.8rem;
    }

    .presentazione-lead {
        font-size: 1.3rem;
    }
	.hero-img {
    padding: 15px;
	}

	.hero-img img {
    max-width: 420px;
	}

	.hero-img::before {
    width: 90%;
    height: 90%;
    transform: translate(10px, 12px);
	}

    /* FIX MOBILE SPECIALIZZAZIONI: forza 1 sola colonna e altezza automatica */
    #specializzazioni {
        height: auto !important;
        min-height: auto !important;
    }

    .grid-specializzazioni {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 1.8rem !important;
    }

    .card-spec {
        height: auto !important;
    }

    .form-group-double { 
        grid-template-columns: 1fr; 
    }
    
    .form-contatti, .info-contatti { 
        padding: 1.5rem; 
    }

    h2.section-title { 
        font-size: 2.2rem; 
    }
}

/* MOBILE PICCOLO (fino a 380px) */
@media (max-width: 380px) {
    .site-logo {
        height: 38px !important;
    }
    
    .hero {
        padding-top: 190px !important;
    }

    nav ul { 
        gap: 0.2rem 0.4rem !important; 
    }
    
    nav a { 
        font-size: 0.8rem !important; 
        padding: 2px 4px !important;
    }
}
/* ==========================================
   SELETTORE LINGUA
   ========================================== */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0.25rem;
}
.lang-switch a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary-color);
}
.lang-switch a.is-active {
    background: rgba(39, 54, 139, 0.10);
}
.lang-switch-separator { opacity: 0.45; }
.form-notice {
    margin-bottom: 1.2rem;
    padding: 0.9rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}
.form-notice.success { background: #e9f7ee; border: 1px solid #9bd0aa; }
.form-notice.error { background: #fff0f0; border: 1px solid #e1aaaa; }

@media (max-width: 768px) {
    .lang-switch { margin-left: 0; justify-content: center; width: 100%; }
}

/* GIUSTIFICAZIONE DEFINITIVA DEI TESTI */

/* Presentazione */
#presentazione .presentazione-card p {
    width: 100%;
    text-align: justify !important;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
}

/* Descrizioni delle aree di competenza */
#specializzazioni .card-spec p.spec-desc {
    width: 100%;
    display: block;
    text-align: justify !important;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
}

/* Elenco puntato della consulenza alle imprese */
#specializzazioni .card-spec ul.spec-list,
#specializzazioni .card-spec ul.spec-list li {
    width: 100%;
    text-align: justify !important;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
}

/* Citazioni delle aree di competenza */

.card-spec .spec-quote{
    margin-top:1.2rem;
    padding-top:1rem;
    border-top:1px solid rgba(0,0,0,.1);
}

.card-spec .quote-text{
    display:block;
    font-style:italic;
    line-height:1.7;
    text-align:justify;
    text-align-last:left;
    hyphens:auto;
}

.card-spec .quote-author{
    display:block;
    margin-top:10px;
    text-align:right;
    font-style:normal;
    font-weight:600;
    color:#27368B;
}