/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    --color-bg-primary: #FEFFF1;
    --color-bg-white: #FFFFFF;
    --color-bg-accent: #FFF8E7;
    --color-bg-quote: #F7EDE4;
    --color-bg-button: #F7F8F6;
    --color-text-primary: #000000;
    --color-text-secondary: #333333;
    --color-text-tertiary: #666666;
    --color-border-light: #E5E5E5;
    --color-border-medium: #666666;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 160px;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
}

/* ===================================
   TOP BAR - SOCIAL + CTA
   =================================== */
.top-bar {
    background: var(--color-bg-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.top-bar-content {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 18px;
}

.social-links a {
    color: var(--color-text-primary);
    font-size: 24px;
    transition: opacity 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    opacity: 0.6;
}

.cta-button {
    border: 1px solid var(--color-border-medium);
    padding: 10px 28px;
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    background: var(--color-bg-button);
    display: inline-block;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--color-text-primary);
    color: var(--color-bg-white);
}

/* ===================================
   HEADER - LOGO & NAVIGATION
   =================================== */
header {
    background: var(--color-bg-white);
    position: fixed;
    top: 60px;
    width: 100%;
    z-index: 999;
    border-bottom: 1px solid var(--color-border-light);
}

.header-content {
    max-width: 1220px;
    margin: 0 auto;
    padding: 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 75px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--color-text-tertiary);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    margin-top: 160px;
    padding: 80px 0;
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    background: var(--color-bg-primary);
    width: 100%;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
    align-items: center;
}

.hero-text h1 {
    font-size: 88px;
    font-weight: 300;
    font-family: 'Italiana', Georgia, serif;
    line-height: 1.1;
    margin-bottom: 40px;
    margin-top: 50px;
    margin-left: 40px;
}

.hero-text p {
    font-size: 20px;
    font-weight: 300;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-left: 40px;
    margin-bottom: 30px;
}

.hero-text .cta-button {
    margin-left: 40px;
}

.hero-image {
    width: 100%;
    height: 480px;
    position: relative;
    overflow: hidden;
}

.hero-photo {
    width: 75%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeIn 1.2s ease-in forwards;
    margin: 0 auto;
    display: block;
}

/* FADE-IN ANIMATION */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Placeholder styling se l'immagine non carica */
.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ===================================
   INTRO SERVICES SECTION
   =================================== */
.intro-services {
    padding: 100px 0;
    background: var(--color-bg-white);
    width: 100%;
}

.intro-services-content {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 40px 60px;
    text-align: center;
}

.intro-services h2 {
    font-size: 52px;
    font-weight: 300;
    font-family: 'Italiana', Georgia, serif;
    margin-bottom: 20px;
}

.intro-services h2 .highlight {
    background: var(--color-text-primary);
    color: var(--color-bg-white);
    padding: 8px 20px;
    display: inline-block;
    transform: skewX(-8deg);
}

.intro-services-description {
    max-width: 800px;
    margin: 40px auto 0px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 60px;
    width: 100vw;
    padding: 0 30px;
    box-sizing: border-box;
}

.service-item {
    display: flex;
    flex-direction: column;
}

.service-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    order: 1;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.service-content {
    order: 2;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-content .cta-button {
    margin-top: 20px;
}

.service-item h3 {
    font-size: 22px;
    font-weight: 600;
    font-family: 'Italiana', Georgia, serif;
    margin-bottom: 12px;
    text-transform: uppercase;
    text-align:center;
    letter-spacing: 0;
}

.service-item p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-secondary);
    text-align: center;
}

/* ===================================
   QUOTE SECTION
   =================================== */
.quote-section {
    width: 100%;
    padding: 60px 40px;
    background-color: var(--color-bg-quote);
    background-image: url('../images/quote-bg.jpg');
    background-size: cover;
    background-position: center;
    /* background-blend-mode: lighten; */
}

.quote-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.quote-content blockquote {
    margin: 0;
    padding: 0;
}

.quote-content blockquote p {
    font-family: 'Italiana', Georgia, serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-text-primary);
    margin: 0 0 30px 0;
}

.quote-content cite {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 300;
    font-style: normal;
    color: var(--color-text-secondary);
    letter-spacing: 0.5px;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-section {
    padding: 100px 40px;
    background: var(--color-bg-white);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-content h2 {
    font-family: 'Italiana', Georgia, serif;
    font-size: 52px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 10px;
    color: var(--color-text-primary);
}

.about-content h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: var(--color-text-primary);
    margin: 20px auto 40px;
}

.about-text {
    max-width: 900px;
    margin: 0 auto 60px;
}

.about-text p {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-secondary);
    text-align: center;
}

.about-text em {
    font-style: italic;
    font-weight: 400;
}

.dropcap {
    font-family: 'Italiana', Georgia, serif;
    font-size: 72px;
    font-weight: 400;
    float: left;
    line-height: 1;
    margin-right: 8px;
    margin-top: -5px;
    color: var(--color-text-primary);
}

.about-images {
    display: flex;
    justify-content: center;
    max-width: 655px;
    margin: 0 auto;
}

.about-image-item {
    width: 655px;
    height: 483px;
    overflow: hidden;
    border: 4px solid var(--color-bg-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===================================
   PARTNERS SECTION
   =================================== */
.partners-section {
    padding: 100px 0;
    background-color: var(--color-bg-white);
    overflow: hidden;
}

.partners-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.partners-content h2 {
    font-family: 'Italiana', Georgia, serif;
    font-size: 52px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 80px;
    color: var(--color-text-primary);
}

.partners-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.partners-slider {
    display: flex;
    gap: 30px;
    animation: slideLeft 36s linear infinite;
    will-change: transform;
}

.partners-slider:hover {
    animation-play-state: paused;
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.partner-circle {
    flex-shrink: 0;
    width: 123px;
    height: 123px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.partner-circle:hover {
    transform: scale(1.05);
}

.partner-circle img {
    width: 123px;
    height: 123px;
    object-fit: contain;
    filter: grayscale(0%);
    opacity: 0.9;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.partner-circle:hover img {
    opacity: 1;
}

/* ===================================
   CONTACT FORM SECTION
   =================================== */
.contact-section {
    padding: 100px 40px;
    background: var(--color-bg-primary);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h2 {
    font-family: 'Italiana', Georgia, serif;
    font-size: 52px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.contact-intro {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 50px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid var(--color-border-medium);
    background: transparent;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-tertiary);
    opacity: 0.6;
}

.form-group input[required]::placeholder::after,
.form-group textarea[required]::placeholder::after {
    content: ' *';
    color: #d32f2f;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="%23666666" stroke-width="1.5" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0 center;
    cursor: pointer;
    padding-right: 25px;
}

.form-group select option {
    background: var(--color-bg-white);
    color: var(--color-text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-bottom-color: var(--color-text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-button {
    padding: 18px 50px;
    background: var(--color-text-primary);
    color: var(--color-bg-white);
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    align-self: center;
}

.submit-button:hover {
    background: var(--color-text-tertiary);
}

.submit-button:disabled {
    background: var(--color-border-medium);
    cursor: not-allowed;
}

.form-message {
    margin-top: 30px;
    padding: 20px;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 300;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ===================================
   LEGAL PAGES (Cookie Policy, Privacy, etc.)
   =================================== */
.legal-page {
    margin-top: 160px;
    padding: 80px 0;
    background: var(--color-bg-white);
    min-height: calc(100vh - 160px);
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.legal-content h1 {
    font-family: 'Italiana', Georgia, serif;
    font-size: 52px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.legal-content .last-update {
    font-size: 14px;
    color: var(--color-text-tertiary);
    margin-bottom: 40px;
    font-style: italic;
}

.legal-content h2 {
    font-family: 'Italiana', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.legal-content h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--color-text-secondary);
}

.legal-content p {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.legal-content ul {
    margin: 20px 0;
    padding-left: 25px;
}

.legal-content ul li {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.legal-content a {
    color: var(--color-text-primary);
    text-decoration: underline;
    transition: opacity 0.3s;
}

.legal-content a:hover {
    opacity: 0.7;
}

.legal-content strong {
    font-weight: 500;
}

/* ===================================
   FOOTER SECTION
   =================================== */
.qodef-page-footer {
    background: var(--color-bg-white);
    padding: 80px 0 0;
    border-top: 1px solid var(--color-border-light);
}

.footer-content {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 40px 60px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
}

.footer-column h3 {
    font-family: 'Italiana', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 25px;
    color: var(--color-text-primary);
}

.footer-column p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.footer-brand .footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-text-primary);
}

.footer-bottom {
    max-width: 1220px;
    margin: 0 auto;
    padding: 30px 40px;
    border-top: 1px solid var(--color-border-light);
}

.footer-bottom p {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: var(--color-text-tertiary);
    margin: 0;
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background: transparent;
    border: 1px solid var(--color-text-primary);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-text-primary);
    transform: rotate(45deg) scale(1.05);
}

.back-to-top span {
    font-family: 'Italiana', Georgia, serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-primary);
    transform: rotate(-45deg);
    letter-spacing: 1px;
    transition: color 0.3s;
}

.back-to-top:hover span {
    color: var(--color-bg-white);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 0 30px;
    }
}

@media (max-width: 968px) {
    html {
        scroll-padding-top: 160px;
    }
    
    .top-bar-content {
        padding: 0 20px;
    }

    .header-content {
        padding: 20px;
    }

    .logo {
        height: 48px;
    }

    nav {
        position: fixed;
        top: 160px;
        left: -100%;
        width: 100%;
        background: var(--color-bg-white);
        transition: left 0.3s;
        border-bottom: 1px solid var(--color-border-light);
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 30px;
        gap: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        margin-top: 160px;
        padding: 40px 20px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 56px;
    }

    .hero-text p {
        font-size: 20px;
    }

    .hero-image {
        height: 400px;
    }

    .intro-services {
        padding: 60px 0;
    }
    
    .intro-services-content {
        padding: 0 20px 40px;
    }

    .intro-services h2 {
        font-size: 36px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
    
    .service-item {
        display: flex;
        flex-direction: column;
    }
    
    .service-content {
        order: 1;
        padding: 30px 20px;
    }
    
    .service-image {
        order: 2;
        height: 500px;
    }
    
    .quote-section {
        padding: 80px 20px;
    }
    
    .quote-content blockquote p {
        font-size: 32px;
    }
    
    .quote-content cite {
        font-size: 16px;
    }
    
    .about-section {
        padding: 80px 20px;
    }
    
    .about-content h2 {
        font-size: 36px;
    }
    
    .about-text p {
        font-size: 16px;
        text-align: left;
    }
    
    .about-image-item {
        width: 100%;
        height: auto;
        max-width: 500px;
        aspect-ratio: 655/483;
    }
    
    .partners-section {
        padding: 80px 0;
    }
    
    .partners-content {
        padding: 0 20px;
    }
    
    .partners-content h2 {
        font-size: 36px;
        margin-bottom: 60px;
    }
    
    .partner-circle {
        width: 100px;
        height: 100px;
    }
    
    .partner-circle img {
        width: 100px;
        height: 100px;
    }
    
    .contact-section {
        padding: 80px 20px;
    }
    
    .contact-content h2 {
        font-size: 36px;
        margin-bottom: 50px;
    }
    
    .contact-intro {
        font-size: 15px;
        margin-bottom: 40px;
    }
    
    .legal-page {
        padding: 60px 0;
    }
    
    .legal-content {
        padding: 0 20px;
    }
    
    .legal-content h1 {
        font-size: 36px;
    }
    
    .legal-content h2 {
        font-size: 28px;
        margin-top: 40px;
    }
    
    .legal-content h3 {
        font-size: 18px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px 40px;
    }
    
    .footer-column h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .footer-column p {
        font-size: 14px;
    }
    
    .footer-brand .footer-logo {
        height: 50px;
    }
    
    .footer-bottom p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .social-links {
        gap: 12px;
    }

    .social-links a {
        font-size: 20px;
    }

    .cta-button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .logo {
        height: 40px;
    }

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-text p {
        font-size: 18px;
    }

    .intro-services h2 {
        font-size: 28px;
    }

    .intro-services-description {
        font-size: 16px;
    }
    
    .quote-content blockquote p {
        font-size: 26px;
    }
    
    .quote-content cite {
        font-size: 14px;
    }
    
    .about-content h2 {
        font-size: 28px;
    }
    
    .about-text p {
        font-size: 15px;
    }
    
    .dropcap {
        font-size: 56px;
    }
    
    .about-images {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .about-image-item {
        width: 100%;
        height: auto;
        aspect-ratio: 655/483;
    }
    
    .partners-content h2 {
        font-size: 28px;
        margin-bottom: 50px;
    }
    
    .partner-circle {
        width: 80px;
        height: 80px;
    }
    
    .partner-circle img {
        width: 80px;
        height: 80px;
    }
    
    .contact-content h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .contact-intro {
        font-size: 14px;
        margin-bottom: 35px;
    }
    
    .contact-form {
        gap: 30px;
    }
    
    .submit-button {
        width: 100%;
        align-self: stretch;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 0 20px 50px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    .footer-bottom {
        padding: 25px 20px;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        right: 20px;
        bottom: 20px;
    }
    
    .back-to-top span {
        font-size: 12px;
    }
}
