:root {
    --dark-bg: #101214;
    --light-text: #f8f9fa;
    --gray-text: #adb5bd;
    --petrol-blue: #005f73;
    --accent-orange: #f97316;
    --accent-serif: 'Playfair Display', serif;
    --body-sans: 'Inter', sans-serif;
    --heading-sans: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--body-sans);
    background-color: var(--dark-bg);
    color: var(--gray-text);
    overflow-x: hidden;
}

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

.container {
    max-width: 93%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- HEADER E NAVIGAZIONE --- */
header {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    padding: 2.5rem 0;
    background-color: transparent;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--heading-sans);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--light-text);
}

.logo .highlight-accent {
    opacity: 0.8;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 500;
    transition: opacity 0.3s ease;
}

nav a:hover {
    opacity: 0.7;
}

/* --- NUOVA SEZIONE HERO --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--light-text);
    overflow: hidden;
}

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

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(16, 18, 20, 0.90) 20%, rgba(16, 18, 20, 0.1) 70%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-content h1 em {
    font-family: var(--accent-serif);
    font-style: italic;
    font-weight: 500;
    display: block;
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: #f3efee;
}

.hero-text {
    max-width: 500px;
}

.hero-cta {
    font-family: var(--body-sans);
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: opacity 0.3s ease;
    border-bottom: 1px solid rgba(248, 249, 250, 0.3);
    padding-bottom: 0.3rem;
}

.hero-cta:hover {
    opacity: 0.8;
    border-bottom-color: var(--light-text);
}

/* --- STILI PER LA SEZIONE SHOWCASE --- */
section {
    padding: 3rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.modern-showcase-container {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    height: 60vh;
    min-height: 500px;
}

.showcase-panel {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: #222;
    /* Fallback color */
}

.showcase-panel.active {
    flex: 2.5;
}

/* NUOVO STILE per le immagini di sfondo dei pannelli */
.panel-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Sotto l'overlay e il contenuto */
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.showcase-panel:hover .panel-background-image {
    transform: scale(1.05);
    /* Effetto zoom su hover */
}

.showcase-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    transition: height 0.5s ease;
    z-index: 2;
    /* Sopra l'immagine di sfondo */
}

.showcase-panel:hover::after {
    height: 85%;
}

.panel-content {
    position: relative;
    z-index: 3;
    padding: 2.5rem;
    color: white;
    width: 100%;
    transition: all 0.5s ease;
    text-align: left;
}

.panel-content p.split-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.panel-content strong {
    padding-right: 10px;
    /* Creates a buffer for the arrow to move into */
}

.panel-content h3 {
    font-size: 2rem;
    color: white;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.panel-content p {
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

.showcase-panel.active .panel-content p {
    opacity: 1;
    max-height: 10em;
}

.panel-content p i {
    transition: transform 0.3s ease;
}

.showcase-panel:hover .panel-content p i {
    transform: translateX(5px);
}

/* --- RESPONSIVE DESIGN --- */
/* Add this new section for mobile-first styles */

/* HAMBURGER MENU */
.menu-toggle {
    display: none;
    /* Hide on desktop */
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 200;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--light-text);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle span:first-child {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 9px;
}

.menu-toggle span:last-child {
    top: 18px;
}

/* Animation for the X icon */
.menu-toggle.active span:first-child {
    transform: rotate(45deg);
    top: 9px;
}

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

.menu-toggle.active span:last-child {
    transform: rotate(-45deg);
    top: 9px;
}

/* MOBILE NAVIGATION MENU */
.main-nav {
    display: flex;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

/* --- SEZIONE PROGETTI --- */
.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray-text);
    max-width: 600px;
    margin: -2rem auto 4rem auto;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--light-text);
    line-height: 1.3;
}

.project-content p {
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* --- SEZIONE CTA --- */
.cta-section {
    background: linear-gradient(135deg, var(--petrol-blue) 0%, #004a5c 100%);
    color: var(--light-text);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="10" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.cta-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-family: var(--body-sans);
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-orange);
    color: white;
    border: 2px solid var(--accent-orange);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

footer {
    background-color: #000000;
    /* Pure black background */
    color: var(--gray-text);
    padding: 4rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--body-sans);
    font-size: 0.95rem;
}

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

.footer-column h4 {
    color: var(--light-text);
    font-family: var(--heading-sans);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

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

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

.footer-links a {
    color: var(--gray-text);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.6;
}

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

/* Logo Column Styles */
.logo-column .footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-text {
    font-family: var(--heading-sans);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
}

.highlight-accent {
    color: var(--accent-orange);
}

.footer-description {
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 350px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--gray-text);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--accent-orange);
    color: white;
    transform: translateY(-3px);
}

/* Footer Bottom Styles */
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.9rem;
    color: var(--gray-text);
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: var(--gray-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--accent-orange);
}

/* --- STILI PER PAGINE DI TESTO (PRIVACY, TERMS) --- */
.text-page {
    padding-top: 150px;
    /* Spazio per l'header assoluto */
    padding-bottom: 5rem;
    min-height: 80vh;
}

.text-page .container {
    max-width: 800px;
    /* Larghezza ottimale per la lettura */
    margin-left: auto;
    margin-right: auto;
}

.text-page h2 {
    font-size: 2.8rem;
    text-align: left;
    /* Allinea a sinistra invece che centrato */
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

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

.text-page p,
.text-page li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.text-page ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.text-page strong {
    color: var(--light-text);
    font-weight: 500;
}

.text-page p:last-child {
    margin-bottom: 0;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 0;
    }

    header nav {
        display: none;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    #hero::before {
        background: linear-gradient(to right, rgba(16, 18, 20, 0.95) 40%, rgba(16, 18, 20, 0.4) 100%);
    }

    section {
        padding: 4rem 0;
    }

    .modern-showcase-container {
        flex-direction: column;
        height: auto;
        gap: 1rem;
    }

    /* Defines the panel itself, making it a flex container */
    .showcase-panel,
    .showcase-panel.active {
        min-height: 250px;
        flex: 1 !important;
        display: flex;
        flex-direction: column;
    }

    /* This is the key container that will hold the text */
    .panel-content {
        padding: 1.5rem;
        width: 100%;
        height: 250px;
        /* Position relative is crucial for positioning child elements absolutely inside it */
        position: relative;
    }

    /* Styles the main title */
    .panel-content h3 {
        font-size: 1.5rem;
    }

    /* This rule positions the paragraph at the bottom right */
    .panel-content p.split-text {
        /* Position absolutely relative to the .panel-content container */
        position: absolute;
        bottom: 1.5rem;
        right: 1.5rem;
        /* Resets other properties to ensure clean positioning */
        width: auto;
        margin-top: 0;
    }

    /* Hides the descriptive span on mobile, leaving only the "Scopri di più" part */
    .panel-content p.split-text span {
        display: none;
    }

    /* Small style adjustments for the "Scopri di più" text on mobile */
    .panel-content p.split-text strong {
        padding-right: 0;
        font-size: 0.9rem;
        margin: 0;
        padding-right: 8px;
    }

    /* Ensures the paragraph is visible, overriding other hiding styles */
    .showcase-panel .panel-content p {
        opacity: 1 !important;
        max-height: none !important;
    }

    /* Responsive per progetti */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 2rem;
    }

    /* Responsive per CTA */
    .cta-content h2 {
        font-size: 2.5rem;
    }

    .cta-content p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

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

    .footer-column {
        min-width: 100%;
    }

    /* Center Products and Company columns */
    .footer-column:not(.logo-column) {
        text-align: center;
    }

    /* Ensure list items inherit center alignment */
    .footer-column:not(.logo-column) .footer-links {
        padding-left: 0;
        /* Remove default list padding */
    }

    .footer-column:not(.logo-column) .footer-links li {
        display: inline-block;
        width: 100%;
        /* Full width for proper centering */
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .legal-links {
        justify-content: center;
    }

    .logo-column .footer-logo {
        justify-content: center;
    }

    .footer-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    /* Main header layout for mobile */
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

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

    /* Show the hamburger menu icon */
    .menu-toggle {
        display: block;
    }

    /* Style the mobile menu */
    .main-nav {
        display: none;
        /* Hide by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--dark-bg);
        z-index: 150;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.4s ease-in-out;
        transform: translateX(100%);
    }

    .main-nav.active {
        display: flex;
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .main-nav a {
        font-size: 1.5rem;
        font-weight: 500;
    }

    /* Hide desktop nav on small screens */
    nav ul {
        display: none;
    }

    /* Rest of your existing mobile styles... */
    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    #hero::before {
        background: linear-gradient(to right, rgba(16, 18, 20, 0.95) 40%, rgba(16, 18, 20, 0.4) 100%);
    }

    section {
        padding: 4rem 0;
    }

    .modern-showcase-container {
        flex-direction: column;
        height: auto;
    }

    .showcase-panel,
    .showcase-panel.active {
        min-height: 250px;
        flex: 1 !important;
    }

    .showcase-panel .panel-content p {
        opacity: 1;
        max-height: 10em;
    }

    .panel-content h3 {
        font-size: 1.8rem;
    }

    /* Responsive per progetti */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 2rem;
    }

    /* Responsive per CTA */
    .cta-content h2 {
        font-size: 2.5rem;
    }

    .cta-content p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

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

    .footer-column {
        min-width: 100%;
    }

    /* Center Products and Company columns */
    .footer-column:not(.logo-column) {
        text-align: center;
    }

    /* Ensure list items inherit center alignment */
    .footer-column:not(.logo-column) .footer-links {
        padding-left: 0;
        /* Remove default list padding */
    }

    .footer-column:not(.logo-column) .footer-links li {
        display: inline-block;
        width: 100%;
        /* Full width for proper centering */
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .legal-links {
        justify-content: center;
    }

    .logo-column .footer-logo {
        justify-content: center;
    }

    .footer-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
    }
}

/* --- MERGED PRODUCTS SHOWCASE STYLES --- */
.products-showcase {
    padding-top: 6rem;
    padding-bottom: 4rem;
    position: relative;
    background-color: var(--dark-bg);
}

/* Variant for museum page if needed, or just use the same */
.products-showcase.museum-variant {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: transparent;
    /* productsmuseod.css didn't have bg color */
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-family: var(--heading-sans);
    color: var(--light-text);
    margin-bottom: 1rem;
}


.secondary-products-full-width {
    width: 100%;
}

.product-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 8rem;
    position: relative;
}

.product-row-image {
    grid-column: 1 / span 8;
    grid-row: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
}

.product-row-image:hover {
    transform: scale(1.03);
}

.layout-image-right .product-row-image {
    grid-column: 5 / span 8;
}

.product-row-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-row-text {
    grid-column: 8 / span 5;
    grid-row: 1;
    background-color: #1a1c1e;
    padding: 3rem;
    border-radius: 16px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.layout-image-right .product-row-text {
    grid-column: 1 / span 5;
    text-align: left;
}

.product-row-text h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.product-row-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-text);
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.product-link {
    font-family: var(--body-sans);
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-link:hover {
    color: var(--accent-orange);
}

.product-link i {
    transition: transform 0.3s ease;
}

.product-link:hover i {
    transform: translateX(5px);
}

/* --- RESPONSIVE DESIGN FOR PRODUCTS --- */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.5rem;
    }

    .product-row,
    .product-row.layout-image-right {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-bottom: 5rem;
    }

    .product-row-image,
    .layout-image-right .product-row-image {
        width: 100%;
        margin-bottom: -60px;
        /* Pull the text block up over the image */
        z-index: 1;
    }

    .product-row-text,
    .layout-image-right .product-row-text {
        width: 90%;
        margin: 0 auto;
        z-index: 2;
        text-align: center;
    }

    .product-row-text h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .products-showcase {
        padding-top: 4rem;
    }

    .product-row-text {
        padding: 2.5rem 2rem;
    }

    .product-row-text h3 {
        font-size: 1.8rem;
    }
}

/* --- ABOUT US PAGE STYLES (Moved from aboutFinale.html) --- */

/* --- PARTNERS & COLLABORATIONS LOGO SECTION --- */
.partners-section {
    background-color: #141618;
    padding: 6rem 0;
}

.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 4rem;
}

.logo-item {
    flex-basis: 180px;
    text-align: center;
}

.logo-item img {
    max-width: 220px;
    height: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-item img:hover {
    transform: scale(1.1);
}

/* --- NEW CLIENTS & STATS SECTION --- */
.clients-section {
    background-color: var(--dark-bg);
    padding: 6rem 0;
}

.clients-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    margin-top: 4rem;
}

.clients-map img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.stat-item {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item .stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-item .stat-description {
    font-size: 1rem;
    color: var(--gray-text);
    line-height: 1.5;
}

.client-list {
    margin-top: 6rem;
}

/* --- VALUES SECTION --- */
.values-section {
    padding: 8rem 0;
    background-color: var(--dark-bg);
}

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

.value-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.value-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 1.8rem;
    color: var(--accent-orange);
}

.value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
}

.value-card p {
    color: var(--gray-text);
    line-height: 1.7;
}

/* --- IMPROVED PARTNERS SECTION --- */
.partners-section {
    background: linear-gradient(135deg, #0f1113 0%, #1a1d21 100%);
    position: relative;
    overflow: hidden;
}

.partners-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 95, 115, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
    position: relative;
    z-index: 2;
}

.partner-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--petrol-blue) 0%, var(--accent-orange) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.partner-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.partner-card:hover::before {
    opacity: 0.05;
}

.partner-image {
    width: 100%;
    height: 280px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.partner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.9) contrast(1.1);
}

.partner-card:hover .partner-image img {
    transform: scale(1.08);
}

.partner-content {
    padding: 2.5rem;
    position: relative;
    z-index: 2;
}

.partner-content h3 {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.partner-specialty {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.partner-specialty::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--accent-orange);
    border-radius: 1px;
}

.partner-description {
    color: var(--gray-text);
    line-height: 1.7;
    font-size: 1rem;
    opacity: 0.9;
}

/* --- HERO SECTION LEFT ALIGNMENT (Specific for About Us) --- */
/* Using a specific class to avoid conflict with main #hero if needed, 
   but aboutFinale.html uses #hero. I'll add a modifier class in HTML later 
   or just use specificity. For now, I'll use #hero.about-hero */

#hero.about-hero {
    justify-content: flex-start;
    /* Align left */
}

#hero.about-hero .hero-content {
    margin-left: 0;
    padding-left: 2rem;
    max-width: 650px;
}

/* --- SPLIT LAYOUT PARTNERS SECTION --- */
.partners-grid.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.partner-card.split {
    display: flex;
    min-height: auto;
    padding: 2rem;
    gap: 2rem;
    align-items: flex-start;
}

.partner-card.split.left-aligned {
    flex-direction: row;
    margin-right: 15%;
}

.partner-card.split.right-aligned {
    flex-direction: row-reverse;
    margin-left: 15%;
}

.partner-image.split {
    width: 260px;
    height: 200px;
    border-radius: 12px;
    flex-shrink: 0;
}

.partner-image.split img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.partner-content.split {
    padding: 0;
    flex: 1;
}

.partner-card.split:hover {
    transform: translateY(-5px);
}

.partner-card.split:hover .partner-image.split img {
    transform: scale(1.03);
}

/* Mobile adjustments for split layout */
@media (max-width: 768px) {
    .partner-card.split {
        flex-direction: column !important;
        padding: 1.5rem;
        gap: 1.5rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .partner-image.split {
        width: 100%;
        height: 200px;
    }
}

/* ========== MOBILE OPTIMIZATIONS FOR ABOUT PAGE ========== */

@media (max-width: 768px) {

    /* Values section mobile improvements */
    .values-section {
        padding: 4rem 0;
    }

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

    .value-card {
        padding: 2rem 1.5rem;
    }

    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

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

    /* Partners section mobile improvements */
    .partners-section {
        padding: 4rem 0;
    }

    .partners-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }

    .partner-image {
        height: 200px;
    }

    .partner-content {
        padding: 1.5rem;
    }

    .partner-content h3 {
        font-size: 1.3rem;
    }

    .partner-description {
        font-size: 0.95rem;
    }

    /* Clients section mobile improvements */
    .clients-section {
        padding: 4rem 0;
    }

    .clients-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-top: 3rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-item .stat-number {
        font-size: 2.2rem;
    }

    .client-list {
        margin-top: 3rem;
    }

    .logo-grid {
        gap: 2rem;
        margin-top: 2rem;
    }

    .logo-item {
        flex-basis: 120px;
    }

    .logo-item img {
        max-width: 100px;
    }

    /* Mobile hero adjustments */
    #hero.about-hero .hero-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        text-align: center;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .values-header h2 {
        font-size: 1.8rem;
    }

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

    .partner-image {
        height: 180px;
    }

    .logo-item {
        flex-basis: 100px;
    }

    .logo-item img {
        max-width: 80px;
    }
}

/* Fix for iOS Safari viewport height issue */
@supports (-webkit-touch-callout: none) {
    .about-hero-section {
        height: -webkit-fill-available;
    }
}

/* --- SOLUTIONS PAGE STYLES (Moved from soluzioni.html) --- */

.product-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--light-text);
    overflow: hidden;
}

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

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(16, 18, 20, 0.85) 20%, rgba(16, 18, 20, 0.3) 70%);
    z-index: 2;
}

.product-hero-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
}

.product-hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.product-hero-content h1 em {
    font-family: var(--accent-serif);
    font-style: italic;
    font-weight: 500;
    display: block;
}

.product-hero-content p {
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

/* Product showcase grid */
.product-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.product-showcase-item {
    position: relative;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-showcase-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.product-showcase-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
}

.product-showcase-item:hover .product-showcase-image {
    transform: scale(1.05);
}

.product-showcase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 3rem;
    z-index: 2;
}

.product-showcase-content {
    color: white;
    width: 100%;
}

.product-showcase-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.product-showcase-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 90%;
}

.product-showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 0.2rem;
}

.product-showcase-link:hover {
    color: var(--light-text);
    border-bottom-color: var(--accent-orange);
}

.product-showcase-link i {
    transition: transform 0.3s ease;
}

.product-showcase-link:hover i {
    transform: translateX(5px);
}

/* Product features section */
.product-features {
    margin-top: 8rem;
    padding: 4rem 0;
    border-radius: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--petrol-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.feature-card p {
    color: var(--gray-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- RESPONSIVE DESIGN FOR SOLUTIONS --- */
@media (max-width: 1024px) {
    .product-showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-hero {
        min-height: 100vh;
        margin-bottom: 4rem;
    }

    .product-hero-content h1 {
        font-size: 2.5rem;
    }

    .product-hero-content p {
        font-size: 1.1rem;
        max-width: 100%;
    }

    /* Mobile-specific product showcase improvements */
    .product-showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .product-showcase-item {
        height: 350px;
        border-radius: 12px;
    }

    .product-showcase-overlay {
        padding: 2rem;
        background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    }

    .product-showcase-content h3 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .product-showcase-content p {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 1.2rem;
        line-height: 1.5;
    }

    .product-showcase-link {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    .feature-card h4 {
        font-size: 1.3rem;
    }

    .product-features {
        margin-top: 5rem;
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .product-hero {
        min-height: 100vh;
        margin-bottom: 3rem;
    }

    .product-hero-content h1 {
        font-size: 2.2rem;
    }

    .product-hero-content p {
        font-size: 1rem;
    }

    .product-showcase-item {
        height: 300px;
    }

    .product-showcase-overlay {
        padding: 1.5rem;
    }

    .product-showcase-content h3 {
        font-size: 1.6rem;
    }

    .product-showcase-content p {
        font-size: 0.95rem;
    }

    .product-showcase-link {
        font-size: 0.95rem;
    }
}

/* --- CONTACT PAGE STYLES (Moved from contatti.html) --- */

/* Contact Page Specific Styles */
.contact-layout {
    padding-top: 110px;
    padding-bottom: 6rem;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.contact-hero-section {
    position: relative;
    margin-bottom: 4rem;
    background-image:
        linear-gradient(rgba(16, 18, 20, 0.85), rgba(16, 18, 20, 0.9)),
        url('https://images.pexels.com/photos/460961/pexels-photo-460961.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 4rem 2rem;
}

.contact-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    position: relative;
    z-index: 1;
}

.contact-header h1 {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.contact-header h1 .highlight {
    color: var(--accent-orange);
    font-family: var(--accent-serif);
    font-style: italic;
    font-weight: 500;
}

.contact-header .subtitle {
    font-size: 1.1rem;
    color: var(--gray-text);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.contact-cards-fullwidth {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card-square {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-card-square:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-orange);
    box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.25);
}

.contact-card-square-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--petrol-blue), #004a5c);
}

.contact-card-square-icon i {
    font-size: 1.4rem;
    color: white;
}

.contact-card-square-content {
    text-align: left;
}

.contact-card-square-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-text);
}

.contact-card-square-content p {
    margin: 0;
    color: var(--gray-text);
    font-size: 0.85rem;
}

.map-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.map-section {
    background: radial-gradient(circle at top, var(--card-bg), var(--dark-bg) 90%);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: invert(100%) grayscale(80%);
}

.location-info-modern {
    padding: 2.5rem;
    background: radial-gradient(circle at top, var(--card-bg), var(--dark-bg) 90%);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.location-info-modern h2 {
    text-align: left;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.location-info-modern h2:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-orange);
}

.location-info-modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.location-info-modern li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.location-info-modern li:hover {
    background: rgba(255, 255, 255, 0.06);
}

.location-info-modern li i {
    font-size: 1.5rem;
    color: var(--accent-orange);
    margin-top: 4px;
    width: 24px;
}

.location-info-modern h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--light-text);
}

.location-info-modern p {
    font-size: 1rem;
    margin: 0;
    color: var(--gray-text);
    line-height: 1.6;
}

/* Responsive Design for Contact Page */
@media (max-width: 1024px) {
    .contact-layout {
        padding-top: 120px;
    }

    .contact-header h1 {
        font-size: 3rem;
    }

    .map-info-grid {
        gap: 3rem;
    }

    .map-section,
    .location-info-modern {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-layout {
        padding-top: 100px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .contact-hero-section {
        padding: 3rem 1.5rem;
    }

    .contact-header h1 {
        font-size: 2.5rem;
    }

    .contact-header .subtitle {
        font-size: 1rem;
    }

    .contact-cards-fullwidth {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-card-square {
        text-align: center;
        gap: 1.5rem;
        height: 100px;
    }

    .contact-card-square-icon {
        margin-bottom: 0;
        width: 60px;
        height: 60px;
    }

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

    .map-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}