:root {
    --primary-color: #0f172a;
    /* Dark Blue from inspiration */
    --primary-light: #1e293b;
    --secondary-color: #c5a059;
    /* Gold from inspiration */
    --secondary-light: #d4b06a;
    --accent-bg: #f8fafc;
    /* Light Slate */
    --text-color: #334155;
    /* Slate 700 */
    --light-text: #fff;
    --font-main: 'Cinzel', serif;
    /* Inspiration Font */
    --font-body: 'Lato', sans-serif;
    /* Inspiration Font */
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-gold: linear-gradient(135deg, var(--secondary-color) 0%, #e6c88b 100%);
}

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

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--accent-bg);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

/* Header */
header {
    background: var(--primary-color);
    color: var(--light-text);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-main);
    color: var(--light-text);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    transition: all 0.3s ease;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {

    /* Navigation */
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        opacity: 0;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 1;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    /* Hero Sections */
    .hero {
        height: 70vh;
        /* Further reduced */
    }

    .hero-content h1 {
        font-size: 3rem;
        /* User requested 3rem */
    }

    .page-hero h1 {
        font-size: 1.5rem;
        /* Reduced to prevent overflow */
    }

    .page-hero {
        height: 35vh;
    }

    /* General Layout */
    section {
        padding: 2.5rem 0;
        /* Further reduced padding */
    }

    .image-text-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Fix for Experience Badge Overlap */
    .profile-container {
        margin-bottom: 3rem;
        /* Make space for the badge */
    }

    .experience-badge {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        /* Center badge on mobile */
        bottom: -30px;
        width: 90%;
        /* Wider badge on mobile */
        max-width: 250px;
        text-align: center;
    }

    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }

    .reverse-mobile .profile-img {
        margin-top: 2rem;
        margin-bottom: 0;
    }

    .profile-img {
        height: auto;
        /* Allow auto height */
        max-height: 350px;
        margin-bottom: 0;
        /* Margin handled by container */
    }

    /* Contact Form */
    .contact-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        /* Reduced padding */
        gap: 2rem;
        width: 100%;
        /* Ensure full width */
    }

    /* Map on Mobile */
    .map-container {
        height: 250px !important;
        /* Force smaller height on mobile */
        margin-top: 2rem !important;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-section {
        width: 100%;
        text-align: center;
    }

    /* Components */
    .quote-box {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        margin-left: 0;
        max-width: 100%;
        border-left: 4px solid var(--secondary-color);
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

.hero {
    /* Fallback image */
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.7)), url('../../Foto/studio.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    /* Adjust opacity as needed */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-content p.subtitle {
    color: var(--secondary-color);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content h1 span {
    font-weight: 400;
    font-style: italic;
    display: block;
    font-size: 0.8em;
}

.hero-content p.desc {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    color: #cbd5e1;
}

/* Page Hero (Inner Pages) */
.page-hero {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    position: relative;
    margin-bottom: 0;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
}

.page-hero .container {
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.page-hero h1 {
    font-size: 2.5rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    font-weight: 300;
}

/* Specific Backgrounds */
.hero-storia {
    background-image: url('../../Foto/studio2.jpeg');
}

/* Library/History */
.hero-servizi {
    background-image: url('../../Foto/studio1.jpeg');
}

/* Scales/Justice */
.hero-contatti {
    background-image: url('../../Foto/studio.jpeg');
}

/* Building/City */

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
}

.image-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.profile-img {
    width: 100%;
    box-shadow: var(--card-shadow);
    object-fit: cover;
    height: 500px;
    border-bottom: 4px solid var(--secondary-color);
}

@media (max-width: 768px) {
    .image-text-grid {
        grid-template-columns: 1fr;
    }

    .profile-img {
        height: 350px;
        margin-bottom: 2rem;
    }
}

.btn {
    display: inline-block;
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 1rem 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Sections General */
section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
}

/* Pattern Backgrounds */
.bg-pattern {
    background-color: #fff;
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
    background-size: 20px 20px;
}

.bg-primary {
    background: var(--primary-color);
    color: var(--light-text);
}

.bg-primary h2,
.bg-primary h3,
.bg-primary p {
    color: var(--light-text);
}

.bg-primary .section-title h2 {
    color: var(--light-text);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    border-bottom: 4px solid var(--secondary-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.card.bg-primary {
    background: #1e293b;
    border-color: #334155;
    color: var(--light-text);
}

.card.bg-primary:hover {
    border-color: var(--secondary-color);
}

/* Testimonials */
.testimonial-card {
    background: #f8fafc;
    padding: 2rem;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--card-shadow);
    text-align: center;
    font-style: italic;
}

.testimonial-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.testimonial-author {
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
    font-family: var(--font-main);
    margin-top: 1rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
}

/* Contact Form */
/* Contact Form */
.contact-container {
    background: #fff;
    padding: 3rem;
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--secondary-color);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-details-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
    text-align: center;
}

.contact-detail-item {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: transform 0.3s;
}

.contact-detail-item:hover {
    transform: translateY(-5px);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.contact-detail-item h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.contact-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: stretch;
}

.contact-image-col {
    display: flex;
    flex-direction: column;
}

.contact-form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form-wrapper {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    font-family: var(--font-body);
    background: #f8fafc;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: #fff;
}

.contact-form button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: background 0.3s;
}

.contact-form button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: #020617;
    /* Darker than primary */
    color: #94a3b8;
    padding: 4rem 0 2rem;
    border-top: 1px solid #1e293b;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* MODIFICA EFFETTUATA QUI: Rimozione forzata punti e pseudo-elementi */
.footer-links {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    list-style: none !important;
    list-style-type: none !important;
    margin-bottom: 0.5rem;
    padding-left: 0 !important;
    margin-left: 0 !important;
    background: none !important;
    border: none !important;
    display: block !important;
}

/* Rimuove eventuali pallini generati da pseudo-elementi (::before/::after) */
.footer-links li::before,
.footer-links li::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
/* FINE MODIFICA */

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s ease-out;
}

/* Chi Siamo Refactor Styles */
.profile-container {
    position: relative;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    max-width: 200px;
    border-left: 4px solid var(--secondary-color);
}

.experience-badge .years {
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.experience-badge .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-box i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.feature-box h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.feature-box p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .experience-badge {
        right: 0;
        bottom: -30px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* History Page Styles */
.history-section {
    margin-bottom: 6rem;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.quote-box {
    position: absolute;
    bottom: 30px;
    left: -30px;
    background: white;
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--card-shadow);
    max-width: 250px;
}

.quote-box i {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.quote-box p {
    font-family: var(--font-main);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.section-heading {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    margin-top: 0.5rem;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.feature-list li i {
    color: var(--secondary-color);
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.collaboration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.collab-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: background 0.3s;
}

.collab-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.collab-item i {
    display: block;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.collab-item span {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

.collab-item small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    font-weight: 300;
}

.category-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .quote-box {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: -20px;
        margin-left: 20px;
        max-width: 90%;
    }

    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }

    .reverse-mobile .profile-img {
        margin-top: 2rem;
        margin-bottom: 0;
    }
}

/* Fix for Hero Font Size on Mobile - Overriding Desktop Styles */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem !important;
    }
}

/* Logo Image Styles */
.logo-img {
    height: 100px;
    width: auto;
    vertical-align: middle;
}

/* Contact Page Mobile Fix */
@media (max-width: 768px) {
    .contact-top-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-details-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-container {
        padding: 1.5rem;
    }

    .contact-intro img {
        margin-bottom: 1rem;
    }

    .contact-container {
        padding: 1.5rem;
    }

    .contact-intro img {
        margin-bottom: 1rem;
    }

    .container {
        width: 100%;
        padding: 0 20px;
    }
}