/* BE LAW LAB - CSS */

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

:root {
    --color-background: #ffffff;
    --color-foreground: #1a1a1a;
    --color-secondary: #f5f5f5;
    --color-muted: #666666;
    --color-warm-gray: #a89f91;
    --color-warm-gray-dark: #8b7f6f;
    --color-border: #e5e5e5;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-foreground);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h1::before {
    content: '';
    position: absolute;
    left: 0.15em;
    bottom: -0.3em;
    width: 1.2em;
    height: 1.2em;
    background-color: var(--color-warm-gray);
    border-radius: 50%;
    z-index: -1;
}

h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

h2::before {
    content: '';
    position: absolute;
    left: 0.15em;
    bottom: -0.25em;
    width: 1em;
    height: 1em;
    background-color: var(--color-warm-gray);
    border-radius: 50%;
    z-index: -1;
}

h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h1::before { width: 1.4em; height: 1.4em; bottom: -0.35em; }
    h2 { font-size: 2.25rem; }
    h2::before { width: 1.2em; height: 1.2em; bottom: -0.3em; }
}

p { margin-bottom: 1rem; }

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover { opacity: 0.7; }

/* === HEADER === */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

#main-header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height 0.3s ease;
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 0 3rem;
    }
}

#main-header.scrolled .header-container {
    height: 70px;
}

.header-logo-container {
    flex-shrink: 0;
}

.header-logo {
    height: 60px;
    width: auto;
    transition: height 0.3s ease;
}

#main-header.scrolled .header-logo {
    height: 50px;
}

/* Desktop Nav - Scrollabile con frecce */
.desktop-nav-wrapper {
    position: relative;
    flex: 1;
    margin: 0 1rem;
    overflow: hidden;
}

.desktop-nav {
    display: none;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    white-space: nowrap;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--color-foreground);
}

.nav-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid var(--color-border);
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-arrow:hover {
    background: var(--color-secondary);
}

.nav-arrow-left {
    left: 0;
}

.nav-arrow-right {
    right: 0;
}

.nav-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
    
    .nav-arrow {
        display: flex;
    }
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-link {
    display: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-foreground);
    transition: opacity 0.3s ease;
}

.header-link:hover {
    opacity: 0.7;
}

.header-link-primary {
    background-color: var(--color-foreground);
    color: white;
    padding: 0.5rem 1.25rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-link-primary:hover {
    opacity: 0.9;
}

@media (min-width: 768px) {
    .header-link {
        display: block;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--color-foreground);
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile Nav - NASCOSTO SU DESKTOP */
.mobile-nav {
    display: none; /* NASCOSTO di default */
    flex-direction: column;
    position: fixed;
    top: 80px;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: calc(100vh - 80px);
    background-color: white;
    border-left: 1px solid var(--color-border);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 999;
}

/* Mostra solo su tablet e mobile */
@media (max-width: 1023px) {
    .mobile-nav {
        display: flex;
    }
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    padding: 1rem 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-foreground);
    border-bottom: 1px solid var(--color-border);
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--color-warm-gray);
}

.mobile-nav-header {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-header a {
    font-weight: 600;
}

.mobile-nav-primary {
    background-color: var(--color-foreground);
    color: white !important;
    padding: 1rem !important;
    text-align: center;
    margin: 1rem 0;
}

.mobile-nav-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 1rem 0;
}

.mobile-contact {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.mobile-contact p {
    margin-bottom: 0.75rem;
    font-size: 14px;
}

.mobile-contact a {
    border: none;
    padding: 0;
    color: var(--color-warm-gray);
}

/* === LAYOUT === */
.max-w-2xl { max-width: 42rem; margin: 0 auto; }
.max-w-4xl { max-width: 1400px; margin: 0 auto; }
.max-w-6xl { max-width: 1400px; margin: 0 auto; }
.max-w-7xl { max-width: 1400px; margin: 0 auto; }

.section-padding { padding: 4rem 1.5rem; }

@media (min-width: 768px) {
    .section-padding { padding: 6rem 2rem; }
}

@media (min-width: 1024px) {
    .section-padding { padding: 6rem 3rem; }
}

.pt-28 { padding-top: 80px; }

/* === GRID === */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* === BACKGROUNDS === */
.bg-background { background-color: var(--color-background); }
.bg-secondary { background-color: var(--color-secondary); }

/* === HERO === */
.hero {
    padding: 12rem 1.5rem 6rem;
    text-align: left;
}

@media (min-width: 768px) {
    .hero {
        padding: 14rem 2rem 8rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 14rem 3rem 8rem;
    }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content h1 {
    margin-bottom: 2rem;
    max-width: 56rem;
}

.hero-text {
    margin: 2rem 0;
    text-align: left;
    max-width: 56rem;
}

.hero-text p {
    color: var(--color-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

/* === PAGE HEADER === */
.page-header {
    padding: 4rem 1.5rem 3rem;
    text-align: left;
    background-color: var(--color-background);
}

@media (min-width: 768px) {
    .page-header {
        padding: 5rem 2rem 4rem;
    }
}

@media (min-width: 1024px) {
    .page-header {
        padding: 5rem 3rem 4rem;
    }
}

.page-header > div {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header h1 {
    margin-bottom: 1rem;
    max-width: 56rem;
}

.page-header p {
    color: var(--color-muted);
    font-size: 1.125rem;
    line-height: 1.7;
    max-width: 56rem;
}

/* === BRAND LINE === */
.brand-line {
    width: 48px;
    height: 3px;
    background-color: var(--color-warm-gray);
}

.brand-line-long {
    width: 100%;
    height: 2px;
    background-color: var(--color-warm-gray);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--color-foreground);
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.85;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* === CARDS === */
.card {
    padding: 2rem;
    background-color: var(--color-background);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card-icon {
    margin-bottom: 1.5rem;
    color: var(--color-warm-gray);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--color-muted);
    line-height: 1.7;
}

/* === SERVICE CARDS === */
.service-card {
    display: block;
    padding: 2rem;
    background-color: var(--color-background);
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: var(--color-warm-gray);
    transform: translateX(8px);
}

.service-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.service-card p {
    color: var(--color-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.service-card .arrow {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--color-warm-gray);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .arrow {
    opacity: 1;
}

/* === TARGET BOXES === */
.target-box {
    padding: 2rem;
    background-color: var(--color-background);
}

.target-box h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.target-list {
    list-style: none;
}

.target-list li {
    padding: 0.5rem 0;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
}

.target-list li:last-child {
    border-bottom: none;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-foreground);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 16px;
    border: 1px solid var(--color-border);
    background-color: var(--color-background);
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-warm-gray);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* === FOOTER === */
footer {
    background-color: var(--color-secondary);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-logo {
    height: 56px;
    width: auto;
    margin-bottom: 1rem;
    mix-blend-mode: multiply;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-warm-gray-dark);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.footer-links a:hover {
    color: var(--color-foreground);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-warm-gray);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--color-warm-gray-dark);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-muted);
    letter-spacing: 0.05em;
}

.footer-copyright a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-copyright a:hover {
    opacity: 0.7;
}

/* === UTILITIES === */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }

/* === DROPDOWN MENU === */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    padding: 0.5rem 0.75rem;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.dropdown-toggle:hover {
    color: var(--color-foreground);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: white;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 13px;
    color: var(--color-foreground);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--color-secondary);
    color: var(--color-foreground);
}

/* === HEADER ICONS === */
.header-icons {
    display: none;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 768px) {
    .header-icons {
        display: flex;
    }
}

.header-icon {
    color: var(--color-muted);
    transition: color 0.3s ease;
}

.header-icon:hover {
    color: var(--color-foreground);
}

.header-icon svg {
    display: block;
}

/* === MOBILE ICONS === */
@media (max-width: 767px) {
    .header-icons {
        display: flex;
        order: -1;
    }
}

/* === DROPDOWN MOBILE === */
@media (max-width: 1023px) {
    .dropdown.active .dropdown-menu {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        margin: 0;
        padding-left: 1rem;
    }
    
    .dropdown-toggle::after {
        content: ' ▼';
        font-size: 10px;
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: ' ▲';
    }
}
