/* --- Global Resets and Font Imports --- */
:root {
    --primary-color: #13a4ec;
    --primary-color-dark: #0d7ea3;
    --primary-color-light: #f0f9ff;
    --text-main: #111827;
    --text-secondary: #6b7280;
    --bg-main: #FFFFFF;
    --bg-light-gray: #F9FAFB;
    --font-primary: 'Manrope', 'Noto Sans', sans-serif;
    --font-secondary: 'Manrope', 'Noto Sans', sans-serif;
    /* Colore di accento per la lingua attiva, preso dal vecchio design */
    --accent-color: #34495E; 
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-main);
    background-color: var(--bg-light-gray);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

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

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 800; /* Bolder headings */
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-color-dark); /* Corretto per usare una variabile esistente */
}

/* --- Header --- */
#header {
    background-color: var(--bg-main);
    padding: 1rem 0;
    border-bottom: 1px solid #F1F3F4;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

.logo img {
    height: 75px; /* Increased from 50px */
}

.logo-mobile {
    display: none; /* Hidden by default */
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.lang-selector {
    font-weight: 700;
    cursor: pointer;
}

.lang-option.active {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- Active Navigation Link Styling --- */
.nav-menu .nav-item-active a {
    color: var(--primary-color);
}

.nav-menu .nav-item-active {
    background-color: var(--primary-color-light);
    border-radius: 9999px; /* Pill shape */
}

/* Adjust padding for the active state to look good */
.nav-menu li a {
    display: block;
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .nav-menu li a {
        padding: 1rem 0; /* Keep mobile padding as it was */
    }
}

/* --- Language Toggle Switch --- */
.lang-toggle {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 34px;
    cursor: pointer;
}

.lang-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lang-toggle .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.lang-toggle .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.lang-toggle input:checked + .slider {
    background-color: var(--primary-color);
}

.lang-toggle input:checked + .slider:before {
    transform: translateX(36px);
}

.lang-toggle .lang-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    user-select: none;
}

.lang-toggle .lang-text.de {
    left: 8px;
}

.lang-toggle .lang-text.en {
    right: 8px;
}


/* --- Hero Section --- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 6rem 1rem;
    text-align: center;
    color: #1a202c;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: linear-gradient(to top, rgba(13, 126, 163, 0.2) 0%, rgba(255, 255, 255, 0) 50%), url("images/hero-background.webp");
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    color: #1a202c;
}

.hero p {
    font-size: 1.25rem;
    font-weight: 500;
    color: #4a5568;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.hero .btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease-in-out;
    transform: translateY(0);
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.btn .material-symbols-outlined {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn:hover .material-symbols-outlined {
    transform: translateX(4px);
}

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

.btn-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
    color: var(--primary-color-light);
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* --- Content Sections --- */
.content-section {
    padding: 4rem 0;
    text-align: center;
}

.content-section.bg-light {
    background-color: var(--bg-main);
}

.content-section .container {
    max-width: 800px;
}

#work-with-us .contact-info {
    margin-top: 2rem;
    font-size: 1.2rem;
}

#work-with-us .contact-info a {
    font-weight: bold;
}

/* --- Footer --- */
#contact {
    background-color: var(--text-main);
    color: #ecf0f1;
    padding: 3rem 0 1rem;
}

#contact a, #contact .btn-link {
    color: #FFFFFF;
    text-decoration: none;
}

#contact a:hover {
    color: #bdc3c7;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    color: var(--bg-main);
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #3e5771;
    padding-top: 1rem;
    font-size: 0.9rem;
}

.hero-logo {
    display: block;
    margin: 0 auto 2rem auto;
    max-width: 180px;
    animation: heartbeat-pulse 6s infinite ease-in-out;
}

@keyframes heartbeat-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}


/* --- Tablet Responsive Design --- */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-menu li {
        margin-left: 1.5rem;
    }

    .hero {
        padding: 5rem 0;
    }

    .slides {
        height: 400px; /* Adjust slider height */
    }
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }
    .nav-menu li {
        margin-left: 1rem;
    }
    #header .container {
        position: relative;
    }
}

/* --- Mobile Menu Styles --- */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle .icon-close {
    display: none;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}


/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
        height: 60px;
        width: auto;
    }

    .hero-logo {
        max-width: 140px;
        margin-bottom: 1.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }

    .mobile-menu-toggle {
        display: block; /* Show hamburger on mobile */
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 80%;
        height: 100vh;
        padding-top: 5rem;
        background-color: var(--bg-main);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease-in-out;
    }

    body.mobile-nav-open .nav-container {
        right: 0; /* Slide in */
    }

    body.mobile-nav-open .mobile-menu-toggle .icon-open {
        display: none;
    }

    body.mobile-nav-open .mobile-menu-toggle .icon-close {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-menu li {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1.2rem;
        padding: 1rem 0;
        display: block;
    }

    .lang-selector {
        margin-top: 2rem;
        font-size: 1.2rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .cta-buttons {
        flex-direction: column;
    }

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

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

    .scroller[data-speed="fast"] {
        --_duration: 15s;
    }

    .scroller[data-speed="slow"] {
        --_duration: 25s;
    }
}

/* --- Gallery Slider --- */
.slider {
    position: relative;
    max-width: 900px;
    margin: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slides {
    display: block;
    position: relative;
    height: 500px;
}

.slide {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
    border: none;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 44px; /* Set a fixed width */
    height: 44px; /* Set a fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.slider-btn .material-symbols-outlined {
    font-size: 24px; /* Adjust icon size */
}

.slider-btn.prev {
    left: 15px;
}

.slider-btn.next {
    right: 15px;
}

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

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: white;
}

/* --- Features Grid (Work With Us Page) --- */
.features-section {
    padding: 4rem 1rem;
}

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

.feature-card {
    background-color: var(--bg-main);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    width: 3rem;
    border-radius: 9999px;
    background-color: var(--primary-color-light);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

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

/* --- Services Scroller Section --- */
#services {
    padding: 4rem 0;
    overflow-x: hidden;
}

#services .services-container {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#services.in-view .services-container {
    opacity: 1;
    transform: translateY(0);
}

.scroller {
    max-width: 100%;
    margin-top: 2rem;
}

/* This rule allows the scroller to break out of the main container */
#services .scroller {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

.scroller {
    cursor: grab;
}

.scroller.is-dragging {
    cursor: grabbing;
}

.scroller__inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    padding-block: 1rem;
    /* Rimuoviamo l'animazione CSS per darne il controllo a JS */
}

.scroller[data-animated="true"] .scroller__inner:hover {
    /* Manteniamo la pausa al passaggio del mouse come fallback */
    animation-play-state: paused;
}

.scroller__inner span {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background-color: var(--primary-color-light);
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

@keyframes scroll {
    to {
        transform: translate(calc(-50% - 0.5rem));
    }
}

/* --- Contact Form Styles --- */
.contact-form {
    margin-top: 2rem;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color-light);
}

.contact-form button[type="submit"] {
    margin-top: 1rem;
    width: 100%;
}

/* --- Modal Styles --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* --- Scroll Lock Styling --- */
/* Used to prevent body scrolling when modal or mobile nav is open */
body.scroll-locked {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* --- Cookie Consent Banner --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--text-main);
    color: var(--bg-main);
    padding: 1rem 2rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    display: none; /* Hidden by default, shown by JS */
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 2001; /* Higher than modal overlay */
}

.cookie-consent-banner p {
    margin: 0;
    color: var(--bg-light-gray);
    font-size: 0.9rem;
}

.cookie-consent-banner a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-consent-banner .btn-group {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-consent-banner .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 768px) {
    .cookie-consent-banner {
        flex-direction: column;
        padding: 1rem;
    }
    .cookie-consent-banner .btn-group {
        width: 100%;
        justify-content: space-around;
    }
}


.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content .contact-form {
    margin-top: 1rem;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
}

.modal-close:hover {
    color: #333;
}

/* --- Utility & Component Classes --- */
.page-section {
    padding: 6rem 1rem;
}

.page-section-legal {
    padding-top: 6rem;
    padding-bottom: 6rem;
    text-align: left;
}

.max-width-800 {
    max-width: 800px;
}

.fourofour-title {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.fourofour-subtitle {
    margin-bottom: 2rem;
}

.link-underline {
    text-decoration: underline;
    color: inherit;
}

.modal-divider {
    margin: 1.5rem 0;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.gallery-note {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.max-width-42rem {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.feature-group-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 3rem;
}
