/*
Theme Name: LT Theme
Theme URI: https://lucatomassi.it
Author: Luca Tomassi
Author URI: https://lucatomassi.it
Description: Custom theme for Luca Tomassi - Audio Design & Sound Engineering studio. Rebuilt without Elementor for optimal performance.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lt-theme
Tags: audio, sound-design, portfolio, custom-theme, no-elementor
*/

/* ==========================================================================
   LT THEME - MAIN STYLESHEET
   ========================================================================== */

/* --------------------------------------------------------------------------
   TABLE OF CONTENTS
   --------------------------------------------------------------------------
   1. CSS Variables / Custom Properties
   2. Reset & Base Styles
   3. Typography
   4. Layout
   5. Components
   6. Header & Navigation
   7. Hero Sections
   8. Service Cards
   9. Portfolio Grid
   10. Team Section
   11. Testimonials
   12. Contact Form
   13. Footer
   14. Responsive
   15. Animations
   -------------------------------------------------------------------------- */

/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */

:root {
    /* Colors - From original site */
    --color-primary: #1a1a1a;
    --color-secondary: #222222;
    --color-accent: #c5a059;
    --color-accent-hover: #d4b06a;
    --color-text: #666666;
    --color-text-light: #999999;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-bg-light: #f5f5f5;
    --color-bg-dark: #0a0a0a;
    
    /* Typography */
    --font-primary: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Raleway', Georgia, serif;
    --font-accent: 'Titillium Web', monospace;
    
    /* Font Sizes */
    --fs-xs: 0.85rem;
    --fs-sm: 1rem;
    --fs-base: 1.1rem;
    --fs-md: 1.25rem;
    --fs-lg: 1.4rem;
    --fs-xl: 1.75rem;
    --fs-2xl: 2.25rem;
    --fs-3xl: 2.75rem;
    --fs-4xl: 3.25rem;
    --fs-5xl: 4.5rem;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Layout */
    --container-max: 1200px;
    --container-narrow: 900px;
    --header-height: 80px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
    margin-bottom: var(--space-md);
}

.text-accent {
    color: var(--color-accent);
}

.text-light {
    color: var(--color-text-light);
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-5xl) 0;
}

.section-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
}

.section-light {
    background-color: var(--color-bg-light);
}

/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-base);
}

/* Bottone primario — GOLD bg, testo NERO per massimo contrasto */
.btn-primary {
    background-color: var(--color-accent);
    color: #000000;
    border-color: var(--color-accent);
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-white);
    color: #000000;
    border-color: var(--color-white);
}

/* Bottone outline — bordo GOLD, testo GOLD a riposo (visibile su qualsiasi sfondo) */
.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
    font-weight: 600;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--color-accent);
    color: #000000;
    border-color: var(--color-accent);
}

/* Bottone bianco — bg bianco, testo nero, hover gold bg + nero testo */
.btn-white {
    background-color: var(--color-white);
    color: #000000;
    border-color: var(--color-white);
    font-weight: 600;
}

.btn-white:hover,
.btn-white:focus {
    background-color: var(--color-accent);
    color: #000000;
    border-color: var(--color-accent);
}

/* Bottone accent gold (CTA speciale) — nero su gold = massimo contrasto */
.btn-accent {
    background-color: var(--color-accent);
    color: #000000;
    border-color: var(--color-accent);
    font-weight: 700;
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--color-white);
    color: #000000;
    border-color: var(--color-white);
}

/* ==========================================================================
   6. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: transparent;
    z-index: 1000;
    transition: background-color var(--transition-base);
}

.site-header.scrolled {
    background-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: var(--space-xl);
}

.main-nav a {
    color: var(--color-white);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

.main-nav a:hover::after,
.main-nav a.current::after {
    width: 100%;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-white);
    transition: var(--transition-base);
}

@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: flex;
    }
    
/* DISABLED — conflitto con nav is-open
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--color-primary);
        padding: var(--space-xl);
        transform: translateX(100%);
        transition: transform var(--transition-base);
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: var(--space-lg);
    }
*/
}

/* ==========================================================================
   7. HERO SECTIONS
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-white);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.5) 0%,
        rgba(0,0,0,0.7) 100%
    );
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    padding: var(--space-xl);
}

.hero-title {
    font-size: var(--fs-5xl);
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: var(--fs-xl);
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--space-2xl);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Header */
.page-header {
    position: relative;
    padding: var(--space-5xl) 0 var(--space-3xl);
    background-size: cover;
    background-position: center;
    text-align: center;
    color: var(--color-white);
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
}

.page-header .container {
    position: relative;
}

.page-title {
    font-size: var(--fs-4xl);
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.page-subtitle {
    font-size: var(--fs-lg);
    color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   8. SERVICE CARDS
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background-color: var(--color-white);
    padding: var(--space-2xl);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-title {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-md);
}

.service-description {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
}

/* ==========================================================================
   9. PORTFOLIO GRID
   ========================================================================== */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 991px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.8) 0%,
        transparent 50%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-size: var(--fs-lg);
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.portfolio-category {
    font-size: var(--fs-sm);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Portfolio Filters */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: none;
    border: 1px solid var(--color-text-light);
    color: var(--color-text);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

/* ==========================================================================
   10. TEAM SECTION
   ========================================================================== */

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 991px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.team-member {
    text-align: center;
}

.team-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--space-lg);
    border-radius: 50%;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xs);
}

.team-role {
    font-size: var(--fs-sm);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   11. TESTIMONIALS
   ========================================================================== */

.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    text-align: center;
    padding: var(--space-2xl);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    border-radius: 50%;
    overflow: hidden;
}

.testimonial-content {
    font-size: var(--fs-lg);
    font-style: italic;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

.testimonial-author {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--color-primary);
}

.testimonial-role {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
}

/* ==========================================================================
   12. CONTACT FORM
   ========================================================================== */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--color-text-light);
    background-color: var(--color-white);
    font-size: var(--fs-base);
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 767px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
}

.contact-info-item {
    text-align: center;
}

.contact-info-icon {
    font-size: var(--fs-2xl);
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.contact-info-label {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.contact-info-value {
    font-size: var(--fs-md);
    font-weight: 500;
    color: var(--color-primary);
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */

.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    margin-top: var(--space-md);
}

.footer-title {
    font-size: var(--fs-md);
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright {
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.4);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-white);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ==========================================================================
   14. RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 1199px) {
    :root {
        --fs-5xl: 3.5rem;
        --fs-4xl: 2.5rem;
    }
}

@media (max-width: 991px) {
    :root {
        --fs-5xl: 3rem;
        --fs-4xl: 2rem;
        --fs-3xl: 1.75rem;
    }
    
    .section {
        padding: var(--space-4xl) 0;
    }
}

@media (max-width: 767px) {
    :root {
        --fs-5xl: 2.5rem;
        --fs-4xl: 1.75rem;
        --fs-3xl: 1.5rem;
    }
    
    .section {
        padding: var(--space-3xl) 0;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}

/* ==========================================================================
   15. ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background-color: var(--color-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-logo {
    max-width: 150px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================================================
   HERO OVERLAY FIX — Matching original lucatomassi.it
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.25) 40%,
        rgba(0, 0, 0, 0.45) 100%
    );
    backdrop-filter: saturate(1.1) contrast(1.05);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--space-xl);
    max-width: 800px;
}
.hero-label {
    font-family: var(--font-accent);
    font-size: var(--fs-md);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}
.hero-title {
    font-family: var(--font-secondary);
    font-size: var(--fs-5xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}
.hero-subtitle {
    font-family: var(--font-primary);
    font-size: var(--fs-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}
.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}
.hero-buttons .btn {
    min-width: 180px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: var(--fs-3xl);
    }
    .hero-subtitle {
        font-size: var(--fs-base);
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Header logo sizing — più grande */
.header-logo {
    height: 60px;
    width: auto;
    max-width: 280px;
}
@media (max-width: 768px) {
    .header-logo {
        height: 40px;
        max-width: 180px;
    }
}

/* Footer logo sizing — ancora più grande */
.footer-logo {
    height: 80px;
    width: auto;
    max-width: 350px;
    margin-bottom: var(--space-lg);
}
@media (max-width: 768px) {
    .footer-logo {
        height: 55px;
        max-width: 240px;
    }
}

/* ==========================================================================
   ACCENT GOLD (#c5a059) — Color coding globale per usabilita
   ========================================================================== */

/* Link globali — accent gold */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover, a:focus {
    color: var(--color-accent-hover);
}

/* Titoli sezione — accent border-bottom */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-md);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
}
.section-title.text-left::after {
    left: 0;
    transform: none;
}

/* Service card — accent hover */
.service-card {
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.service-card:hover {
    border-bottom-color: var(--color-accent);
}
.service-card:hover .service-title {
    color: var(--color-accent);
}

/* Service icon — accent tint on hover */
.service-icon img {
    transition: filter 0.3s ease;
}
.service-card:hover .service-icon img {
    filter: brightness(0) saturate(100%) invert(72%) sepia(25%) saturate(700%) hue-rotate(10deg) brightness(90%) contrast(90%);
}

/* Portfolio overlay — accent color */
.portfolio-overlay {
    background: rgba(197, 160, 89, 0.9);
}
.portfolio-overlay .portfolio-title {
    color: var(--color-primary);
}
.portfolio-overlay .portfolio-category {
    color: var(--color-primary);
    opacity: 0.8;
}

/* Footer links — accent on hover */
.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--color-accent);
}

/* Footer titles — accent color */
.footer-title {
    color: var(--color-accent);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

/* Social links — gold bg on hover, icone NERE per contrasto */
.social-links a {
    color: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s ease;
}
.social-links a:hover {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
    color: #000000 !important;
}
.social-links a svg {
    transition: fill 0.3s ease;
}
.social-links a:hover svg {
    fill: #000000 !important;
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY & PAGE CONSISTENCY
   Coerenza tipografica su TUTTO il sito, mobile-first
   ========================================================================== */

/* Page header per pagine interne (come originale TheRatio) */
.page-header {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: var(--color-primary);
}
.page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}
.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-xl);
}
.page-header-title {
    font-family: var(--font-secondary);
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
}
@media (max-width: 768px) {
    .page-header { min-height: 250px; }
    .page-header-title { font-size: var(--fs-3xl); }
}

/* Section label (come ot-heading subtitle originale: Josefin Sans) */
.section-label {
    font-family: var(--font-accent);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light, #9f9e9e);
    margin-bottom: var(--space-sm);
}

/* Grid 2 colonne responsive */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}
@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* Services grid 3-4 colonne responsive */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

/* Skill bars (come ot-progress originale) */
.skill-bar {
    margin-bottom: var(--space-lg);
}
.skill-info {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-accent);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.skill-track {
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 1s ease;
}

/* Testimonial cards */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}
.testimonial-card {
    background: rgba(255,255,255,0.05);
    border-left: 3px solid var(--color-accent);
    padding: var(--space-xl);
    border-radius: 0 4px 4px 0;
}
.testimonial-card blockquote {
    font-family: var(--font-secondary);
    font-size: var(--fs-base);
    font-style: italic;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin: 0 0 var(--space-lg) 0;
    padding: 0;
    border: none;
}
.testimonial-author strong {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.testimonial-author span {
    color: rgba(255,255,255,0.5);
    font-size: var(--fs-xs);
}

/* ==========================================================================
   GUTENBERG BLOCKS — Stile coerente con il tema
   ========================================================================== */

/* Headings nei blocchi Gutenberg */
.wp-block-heading {
    font-family: var(--font-secondary);
    color: var(--color-white);
    line-height: 1.2;
}
.wp-block-heading:is(h2) {
    font-size: var(--fs-3xl);
    font-weight: 700;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-md);
}
.wp-block-heading:is(h2)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
}
.wp-block-heading:is(h3) {
    font-size: var(--fs-xl);
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

/* Paragraphs nei blocchi */
.entry-content p,
.wp-block-paragraph {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: 1.875;
    color: rgba(255,255,255,0.75);
    margin-bottom: var(--space-lg);
}

/* Lists nei blocchi */
.entry-content ul,
.wp-block-list {
    color: rgba(255,255,255,0.75);
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}
.entry-content li,
.wp-block-list li {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}
.entry-content li strong {
    color: var(--color-accent);
}

/* Blockquote nei blocchi */
.wp-block-quote {
    border-left: 3px solid var(--color-accent);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
    background: rgba(255,255,255,0.03);
    border-radius: 0 4px 4px 0;
}
.wp-block-quote p {
    font-family: var(--font-secondary);
    font-style: italic;
    font-size: var(--fs-md);
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
}
.wp-block-quote cite {
    display: block;
    margin-top: var(--space-md);
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-style: normal;
    color: var(--color-accent);
}

/* Separator */
.wp-block-separator {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: var(--space-2xl) 0;
}

/* Buttons (Gutenberg) */
.wp-block-button__link {
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background-color: var(--color-accent) !important;
    color: #000000 !important;
    padding: var(--space-md) var(--space-xl);
    border-radius: 0;
    transition: all 0.3s ease;
}
.wp-block-button__link:hover {
    background-color: var(--color-white) !important;
    color: #000000 !important;
}

/* Embed (Vimeo) responsive */
.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: var(--space-xl);
}
.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   PAGE CONTENT WRAPPER — dark background per tutte le pagine interne
   ========================================================================== */
.site-content {
    background-color: var(--color-bg-dark, #0a0a0a);
}

/* Entry content padding e max-width */
.entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl);
}

/* Page title nel template default */
.page-title {
    font-family: var(--font-secondary);
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: var(--color-white);
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-xl);
    position: relative;
}
.page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: var(--space-md) auto 0;
}

/* ==========================================================================
   ACCESSIBILITY — ARIA & Focus states
   ========================================================================== */

/* Focus visible per keyboard navigation */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--color-accent);
    color: #000;
    padding: var(--space-sm) var(--space-lg);
    z-index: 10000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--fs-xs);
    border-radius: 0 0 4px 4px;
    transition: top 0.3s ease;
}
.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   MOBILE-FIRST REFINEMENTS
   ========================================================================== */

/* Touch targets minimo 48px */
.btn, a.btn, button {
    min-height: 48px;
    min-width: 48px;
}

/* Mobile nav improvements */
@media (max-width: 768px) {
    .site-header .container {
        padding: var(--space-sm) var(--space-md);
    }

    .entry-content {
        padding: var(--space-xl) var(--space-md);
    }

    .page-title {
        font-size: var(--fs-2xl);
        padding: var(--space-xl) var(--space-md) var(--space-lg);
    }

    .wp-block-heading:is(h2) {
        font-size: var(--fs-2xl);
    }

    .wp-block-heading:is(h3) {
        font-size: var(--fs-lg);
    }

    .wp-block-quote {
        padding: var(--space-md) var(--space-lg);
        margin: var(--space-lg) 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Spacing reduction mobile */
    .section {
        padding: var(--space-2xl) 0;
    }

    /* Stack hero buttons vertically */
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-buttons .btn {
        text-align: center;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .entry-content {
        padding: var(--space-lg) var(--space-md);
    }
    
    .page-title {
        font-size: var(--fs-xl);
    }
    
    .wp-block-heading:is(h2) {
        font-size: var(--fs-xl);
    }
}

/* ==========================================================================
   NAV MENU — Desktop + Mobile hamburger
   ========================================================================== */

/* Nav menu desktop — orizzontale */
.nav-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}
.nav-menu li {
    margin: 0;
}
.nav-menu li a {
    font-family: var(--font-primary) !important;
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-white) !important;
    text-decoration: none;
    padding: var(--space-sm) 0;
    transition: color 0.3s ease;
    display: block;
    min-height: 48px;
    display: flex;
    align-items: center;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li a[aria-current="page"] {
    color: var(--color-accent) !important;
}

/* Mobile hamburger */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}
.mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    margin: 5px 0;
    transition: all 0.3s ease;
}
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--color-primary);
        z-index: 1000;
        transition: right 0.3s ease;
        padding: 80px var(--space-xl) var(--space-xl);
        overflow-y: auto;
    }
    .main-nav.is-open {
        right: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
    }
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .nav-menu li a {
        padding: var(--space-md) 0;
        font-size: var(--fs-sm);
    }

    /* Overlay quando menu aperto */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .nav-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Nascondi CTA header su mobile */
    .header-cta {
        display: none;
    }
}

/* Header layout fix */
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   ABOUT GRID — Testo prima, immagine dopo su mobile
   ========================================================================== */
.about-grid {
    gap: var(--space-2xl);
}
.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    /* Testo prima (order 1), immagine dopo (order 2) */
    .about-text {
        order: 1;
    }
    .about-image {
        order: 2;
    }
}

/* ==========================================================================
   CONTACT FORM — Stile anthilla.com
   ========================================================================== */
.lt-form .form-group {
    margin-bottom: var(--space-lg);
}
.lt-form .form-label {
    display: block;
    font-family: var(--font-primary);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
    margin-bottom: var(--space-xs);
}
.lt-form .form-input {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    color: var(--color-white);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    transition: border-color 0.3s ease, background 0.3s ease;
    min-height: 48px;
    -webkit-appearance: none;
}
.lt-form .form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255,255,255,0.1);
}
.lt-form .form-input::placeholder {
    color: rgba(255,255,255,0.3);
}
.lt-form select.form-input {
    cursor: pointer;
}
.lt-form textarea.form-input {
    resize: vertical;
    min-height: 120px;
}
.lt-form .form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--fs-xs);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    line-height: 1.5;
}
.lt-form .form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-accent);
}

/* Breadcrumb */
.breadcrumb {
    font-family: var(--font-primary);
    font-size: var(--fs-xs);
    color: rgba(255,255,255,0.5);
    margin-top: var(--space-md);
}
.breadcrumb a {
    color: var(--color-accent) !important;
}
.breadcrumb span[aria-hidden] {
    margin: 0 var(--space-xs);
    color: rgba(255,255,255,0.3);
}

/* Contact info items */
.contact-info-list {
    margin-top: var(--space-xl);
}

/* ==========================================================================
   FLOATING ACTION BUTTONS — WhatsApp + Back to Top
   ========================================================================== */

/* WhatsApp FAB — sempre visibile in basso a destra */
.fab-whatsapp {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 900;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none !important;
}
.fab-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}
.fab-whatsapp svg {
    pointer-events: none;
}

/* Back to Top FAB — appare dopo scroll */
.fab-backtop {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-decoration: none !important;
}
.fab-backtop.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.fab-backtop:hover {
    transform: scale(1.1);
    background: var(--color-accent-hover);
}
.fab-backtop svg {
    pointer-events: none;
}

/* Mobile: FABs un po' più piccoli */
@media (max-width: 768px) {
    .fab-whatsapp {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 16px;
    }
    .fab-whatsapp svg {
        width: 24px;
        height: 24px;
    }
    .fab-backtop {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 16px;
    }
    .fab-backtop svg {
        width: 18px;
        height: 18px;
    }
}

/* ==========================================================================
   FOOTER LEGAL MENU — separato, inline
   ========================================================================== */
.footer-legal {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}
.legal-menu {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}
.legal-menu li {
    margin: 0;
}
.legal-menu li a {
    font-family: var(--font-primary);
    font-size: var(--fs-xs) !important;
    color: rgba(255,255,255,0.4) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}
.legal-menu li a:hover {
    color: var(--color-accent) !important;
}

/* ==========================================================================
   WHATSAPP LINKS — verde WhatsApp #25D366 ovunque
   ========================================================================== */
a[href*="wa.me"],
a[href*="whatsapp"] {
    color: #25D366 !important;
}
a[href*="wa.me"]:hover,
a[href*="whatsapp"]:hover {
    color: #128C7E !important;
}

/* Portfolio section — grigio canna di fucile, stacca dal dark */
.section-gunmetal {
    background-color: #2a2d32 !important;
}

/* Section title su gunmetal — force white */
.section-gunmetal .section-title {
    color: var(--color-white) !important;
}
.section-gunmetal .section-subtitle {
    color: rgba(255,255,255,0.6) !important;
}

/* FIX: Mobile nav overflow — contenuto non esce dal viewport */
.main-nav .nav-menu {
    width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
}
@media (max-width: 768px) {
/* DISABLED — conflitto con nav is-open
    .main-nav {
        overflow-x: hidden;
        max-width: 100%;
    }
*/
    .nav-menu li a {
        white-space: normal;
        word-break: break-word;
        font-size: var(--fs-sm) !important;
        padding: var(--space-md) var(--space-md) !important;
    }
    /* Fix: body non scorre orizzontalmente */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* Section buttons — centrati, gap, responsive */
.section-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
    flex-wrap: wrap;
}
@media (max-width: 480px) {
    .section-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .section-buttons .btn {
        text-align: center;
    }
}
