/* 
    Studio Legale Santoro - 2026 Design System 
    High-End | Authoritative | Modern
*/

:root {
    /* Palette - Deep Navy & Muted Gold */
    --primary-dark: #0b1c2c;
    --primary-light: #1a3a52;
    --accent-gold: #c5a059;
    --accent-gold-hover: #d4af6a;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --bg-light: #ffffff;
    --bg-offwhite: #f9f9f9;
    --bg-dark: #07121d;
    
    /* Tech / Cyber Accents */
    --cyber-blue: #00f2ff;
    --cyber-gradient: linear-gradient(135deg, #0b1c2c 0%, #162d42 100%);
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 2px; /* Sharp edges for authority */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

.btn-outline:hover {
    background-color: #fff;
    color: var(--primary-dark);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.section-title.center {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(11, 28, 44, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-sub {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-menu a:hover, .nav-menu a.highlight-link {
    color: var(--accent-gold);
}

.btn-nav {
    padding: 10px 20px;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold) !important;
    border-radius: 2px;
}

.btn-nav:hover {
    background: var(--accent-gold);
    color: var(--primary-dark) !important;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 600px;
    background-color: var(--primary-dark); /* Fallback */
    background-image: url('https://images.unsplash.com/photo-1589829085413-56de8ae18c73?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(11, 28, 44, 0.85), rgba(11, 28, 44, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding-top: 60px;
}

.eyebrow {
    display: block;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.hero h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
    display: flex;
    gap: 1rem;
}

/* --- Trust Bar --- */
.trust-bar {
    background-color: var(--primary-light);
    padding: 40px 0;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.trust-item h3 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 5px;
}

.trust-item p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- About Section --- */
.about {
    padding: 100px 0;
    background: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.lead {
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-gold);
    padding-left: 20px;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.visual-card {
    background: var(--bg-offwhite);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    position: relative;
}

.visual-card::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--accent-gold);
    z-index: 0;
}

.icon-large {
    font-size: 5rem;
    z-index: 1;
}

/* --- Areas (Bento Grid) --- */
.areas {
    padding: 100px 0;
    background-color: var(--bg-offwhite);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 25px;
}

.bento-card {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Layout Spans */
.bento-card.penale {
    grid-column: span 2;
    background: linear-gradient(to right, #fff, #fcfcfc);
    border-left: 4px solid var(--primary-dark);
}

.bento-card.civile {
    grid-column: span 1;
    grid-row: span 2;
    border-top: 4px solid var(--accent-gold);
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 1.5rem;
}

.bento-card ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
}

.bento-card ul li::before {
    content: '•';
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- Cyber Section --- */
.cyber-section {
    padding: 100px 0;
    background-color: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Abstract bg element */
.cyber-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.05) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.cyber-content {
    position: relative;
    z-index: 1;
}

.cyber-badge {
    display: inline-block;
    background: rgba(0, 242, 255, 0.1);
    color: var(--cyber-blue);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.cyber-section h2 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cyber-section p {
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin-bottom: 3rem;
}

.cyber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cyber-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: var(--transition);
}

.cyber-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--cyber-blue);
    transform: translateY(-5px);
}

.cyber-card h4 {
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.cyber-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Contacts --- */
.contacts {
    padding: 100px 0;
    background: #fff;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 40px;
}

.location-card {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.location-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-family: 'Manrope', sans-serif;
}

.location-card p {
    margin-bottom: 5px;
    color: var(--text-muted);
}

.digital-contacts a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Modern Form */
.modern-form {
    background: var(--bg-offwhite);
    padding: 40px;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: #fff;
    font-family: 'Manrope', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.full-width {
    width: 100%;
}

.privacy-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 15px;
    text-align: center;
}

/* --- Footer --- */
footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.6);
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* --- Animations --- */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Blog Section --- */
.blog-hero {
    height: 60vh; /* Smaller header for blog */
    min-height: 400px;
}

.blog-section {
    padding: 80px 0;
    background-color: var(--bg-offwhite);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Featured Article (First one spans full width on desktop) */
@media (min-width: 992px) {
    .blog-card.featured {
        grid-column: span 2; /* Or full width depending on grid */
        display: grid;
        grid-template-columns: 1fr 1.5fr;
    }
    
    .blog-card.featured .blog-content {
        justify-content: center;
    }
}

.blog-image {
    background-color: var(--primary-light);
    height: 200px;
    position: relative;
    /* Placeholder image logic or actual img tag inside */
    background-image: url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80'); /* Generic legal abstract */
    background-size: cover;
    background-position: center;
}

.blog-card.featured .blog-image {
    height: 100%;
    min-height: 300px;
}

.blog-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-content .date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.blog-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--primary-dark);
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    margin-top: auto; /* Push to bottom */
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    width: fit-content;
}

.read-more:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Lang Switcher */
.lang-switch {
    margin-left: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.active-lang {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

.lang-switch .sep {
    color: rgba(255,255,255,0.3);
}

.lang-switch a {
    color: rgba(255,255,255,0.6);
}

.lang-switch a:hover {
    color: #fff;
}

/* --- Floating Elements --- */

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1002;
    transition: var(--transition);
    animation: floatIn 1s ease 1s backwards;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes floatIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Hidden by default */
    left: 20px;
    right: 20px;
    background: rgba(11, 28, 44, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: bottom 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #fff;
    font-size: 0.9rem;
}

.cookie-content a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* --- Mobile Responsive --- */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 1.5rem;
    }
    .nav-menu a {
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-card.penale, 
    .bento-card.civile {
        grid-column: span 1;
        grid-row: auto;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }
    
    .hamburger span {
        display: block;
        width: 25px;
        height: 2px;
        background: #fff;
        margin: 5px 0;
        transition: var(--transition);
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        padding: 40px;
    }
    
    .nav-menu.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem; /* Smaller title for small screens */
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about, .areas, .cyber-section, .contacts {
        padding: 60px 0; /* Reduce vertical spacing */
    }
    
    .bento-card, .cyber-card, .modern-form {
        padding: 25px; /* Reduce card padding */
    }
    
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    .trust-grid {
        grid-template-columns: 1fr; /* Stack trust indicators */
        gap: 30px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}