/* --- VARIABILI E SETUP --- */
:root {
    --brand-blue: #0A1C4E;
    --bg-light-blue: #D2E8F9; 
    --bg-gray: #F2F2F2; 
    --text-dark: #1A1A1A;
    --text-gray: #6B7280;
    --white: #FFFFFF;
    --border-color: #E5E7EB;
}

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

body {
    font-family: 'Figtree', sans-serif;
    color: var(--brand-blue);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5%;
}

.container-hero {
    width: 100%;
    padding: 0 32px;
}

/* --- TYPOGRAPHY --- */
h1 {
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--brand-blue);
}

h2 {
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--brand-blue);
}

/* --- BOTTONI --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn span {
    margin-left: 10px;
    font-size: 1.2rem;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: var(--white);
    border: 1px solid var(--brand-blue);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--brand-blue);
    border: 1px solid var(--brand-blue);
}

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

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--brand-blue);
    color: var(--white);
    font-size: 0.8rem;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 14px 14px;
    background-position: center;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,1) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,1) 100%);
    pointer-events: none;
}

.top-bar-inner {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.visitors {
    opacity: 1;
}


/* --- HEADER --- */
.site-header {
    background: var(--white);
    padding: 24px 0;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-text small {
    font-size: 0.6rem;
    vertical-align: super;
}

.main-nav ul {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-gray);
}

.main-nav a.active, .main-nav a:hover {
    color: var(--brand-blue);
}

/* ----------------------------------------------------
   1. HERO SECTION 
------------------------------------------------------- */
.hero-section {
    background-color: var(--white);
    padding: 20px 0 40px 0;
}

.hero-box {
    background-color: var(--bg-light-blue);
    padding: 80px 96px 0 96px; /* 32px (container) + 96px = 128px from edge */
    position: relative;
    overflow: hidden;
    height: 832px;
    display: flex;
    flex-direction: column;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}

.hero-left h1 {
    font-size: 3.5rem;
    color: var(--brand-blue);
    line-height: 1.1;
    margin-bottom: 40px;
    font-weight: 700;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--brand-blue);
    line-height: 1.5;
    opacity: 1;
}

.hero-images-container {
    position: relative;
    height: 350px;
    margin-top: auto;
}

.pillar-left {
    position: absolute;
    bottom: 0;
    left: -40px;
    height: 470px;
    object-fit: contain;
    object-position: bottom left;
    transform: scaleX(-1);
}

.pillar-right {
    position: absolute;
    bottom: 0;
    right: -40px;
    height: 470px;
    object-fit: contain;
    object-position: bottom right;
    transform: scaleX(-1);
}

/* ----------------------------------------------------
   2. TRUST BAR 
------------------------------------------------------- */
.trust-bar {
    padding: 80px 0;
    background-color: var(--bg-gray); 
    text-align: center;
}

.trust-logos {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.trust-title {
    font-size: 1.8rem;
    color: var(--brand-blue);
    font-weight: 600;
    margin-bottom: 16px;
}

.trust-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* ----------------------------------------------------
   SHARED SPLIT LAYOUT 
------------------------------------------------------- */
.split-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.section-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand-blue);
}

/* ----------------------------------------------------
   3. ABOUT SECTION 
------------------------------------------------------- */
.about-section {
    padding: 120px 0;
    background: var(--white);
}

.lead-text {
    font-size: 1.8rem;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 60px;
    font-weight: 400;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.stat-number {
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 16px;
}

.stat-desc {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.4;
}

.carousel-container {
    margin-top: 80px;
}

.carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.carousel-lines {
    display: flex;
    gap: 8px;
}

.carousel-lines .line {
    width: 40px;
    height: 2px;
    background: #EAEAEF;
}

.carousel-lines .line.active {
    background: var(--brand-blue);
}

.carousel-arrows .arrow-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--brand-blue);
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-item {
    flex: 0 0 65%;
    width: 65%;
}

.carousel-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* ----------------------------------------------------
   4. SERVIZI SECTION 
------------------------------------------------------- */
.services-section {
    height: 1042px;
    background-color: var(--bg-light-blue);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 120px 128px 72px 128px;
}

.services-section h2,
.services-subtitle {
    font-size: 32px;
    color: var(--brand-blue);
    font-weight: 400; /* Regular */
    line-height: 1.4;
    font-family: 'Figtree', sans-serif;
    margin-bottom: 8px;
    text-align: left;
}

.services-section .hero-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 40px;
}

.services-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.service-card {
    text-align: center;
    padding: 24px 24px 72px 24px;
    height: 468px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-card img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.service-card h4 {
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.2;
}

.service-card:hover img {
    transform: translateY(-10px);
}

/* ----------------------------------------------------
   5. MID CALLOUT (Gestione Completa)
------------------------------------------------------- */
.mid-callout {
    padding: 60px 0;
    background: var(--white);
}

.callout-box {
    background-color: var(--bg-gray);
    background-image: url('../Materiali/Campo_di_calcio.png');
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    padding: 0 60px;
    text-align: center;
    position: relative;
    color: var(--brand-blue);
    height: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.callout-box .label {
    display: block;
    padding-top: 34px;
    margin-bottom: 24px;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 1.1rem;
}

.callout-box h2.black-text {
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 40px;
    line-height: 1.2;
}

.callout-actions {
    margin-top: 20px;
}

/* ----------------------------------------------------
   6. PROJECTS AREA 
------------------------------------------------------- */
.projects-section {
    padding: 120px 0;
    background: var(--white);
}

.projects-section .container {
    padding: 0 128px;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.projects-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand-blue);
}

.project-card {
    margin-bottom: 120px;
}

.project-main-title {
    font-size: 1.8rem;
    color: var(--brand-blue);
    margin-bottom: 40px;
    font-weight: 500;
    max-width: 800px;
}

.project-layout-grid {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.project-card.reversed .project-layout-grid {
    flex-direction: row-reverse;
}

.project-images-complex {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

/* No row-reverse here, let Large stay Left if defined first in HTML */

.images-col-small {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.images-col-small img {
    width: 250px;
    height: 137px;
    object-fit: cover;
}

.images-col-large img {
    width: 516px;
    height: 290px;
    object-fit: cover;
}

.project-info-complex {
    display: flex;
    flex-direction: column;
    height: 290px;
}

.project-year-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.project-anno {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.project-desc-text {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-top: auto; /* Pushes the text to the bottom of the container */
    margin-bottom: 0;
}

.project-tags-horizontal {
    display: grid;
    grid-template-columns: 250px 250px 250px;
    gap: 120px;
    margin-top: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid #F0F0F0;
}

.project-card:last-of-type .project-tags-horizontal {
    border-bottom: none;
}

.tag-h-item strong {
    display: block;
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.tag-h-item span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ----------------------------------------------------
   7. QUALIFICATIONS SECTION 
------------------------------------------------------- */
.qualifications-section {
    padding: 0 0 120px 0;
    background-color: var(--white);
}

.qualifications-box {
    background-color: var(--bg-light-blue);
    height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 120px;
    width: 100%;
}

.qualifications-content {
    max-width: 650px;
    position: relative;
    z-index: 2;
}

.qualifications-content .label {
    display: block;
    color: var(--text-gray);
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 1.1rem;
}

.qualifications-content h2 {
    font-size: 2.8rem;
    color: var(--brand-blue);
    margin-bottom: 40px;
    line-height: 1.2;
    font-weight: 700;
}

.qualifications-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 503px;
    pointer-events: none;
}

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

.btn-outline-blue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue);
    font-weight: 600;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.btn-outline-blue:hover {
    background: var(--brand-blue);
    color: var(--white);
}


/* ----------------------------------------------------
   8. FOOTER 
------------------------------------------------------- */
.site-footer {
    background-color: var(--brand-blue);
    color: var(--white);
    padding: 80px 0 40px;
}

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

.logo-container.white {
    color: var(--white);
}

.footer-tagline {
    font-size: 1.5rem;
    color: var(--white);
    margin: 40px 0;
    font-weight: 500;
}

.footer-copy-small {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-copy-small p {
    margin-top: 8px;
}

.footer-nav {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 40px;
}

.footer-nav a {
    font-size: 0.95rem;
    font-weight: 400;
}

.footer-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.info-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 8px;
}

.info-block p {
    font-size: 0.95rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 32px;
}

.btn-outline-white {
    border: 1px solid var(--white);
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
}

.copyright-center {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ----------------------------------------------------
   PAGE: CHI SIAMO 
------------------------------------------------------- */

.about-hero-section {
    background-color: var(--white);
    padding: 20px 0 40px 0;
}

.about-hero-box {
    background-color: var(--bg-light-blue);
    padding: 120px 96px; 
    position: relative;
    overflow: hidden;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-hero-box .hero-faro-image {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
    object-position: right bottom;
    z-index: 1;
}

.about-hero-box .hero-grid {
    z-index: 2;
    position: relative;
    max-width: 60%;
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid var(--brand-blue);
    background: transparent;
    color: var(--brand-blue);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-dark:hover {
    background: var(--brand-blue);
    color: var(--white);
}

.btn-outline-dark span {
    margin-left: 10px;
    font-size: 1.2rem;
}

.mission-section {
    padding: 120px 0;
    background: var(--white);
}

.mission-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.mission-images-grid img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.stats-strip {
    background-color: var(--brand-blue);
    padding: 80px 0;
    color: var(--white);
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stats-grid-4 .stat-item {
    padding: 0 20px;
}

.border-right {
    border-right: 1px solid rgba(255,255,255,0.2);
}

.stats-strip .stat-number {
    color: var(--bg-light-blue);
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 16px;
}

.stats-strip .stat-desc {
    color: var(--white);
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.4;
}

.pillars-section {
    padding: 120px 0;
    background-color: var(--bg-gray);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.pillar-card {
    background: var(--white);
    padding: 50px 40px;
    border-top: 4px solid var(--brand-blue);
}

.pillar-card h4 {
    font-size: 1.5rem;
    color: var(--brand-blue);
    margin-bottom: 20px;
}

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

.team-section {
    padding: 120px 0;
    background: var(--white);
}

.team-banner-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    margin-bottom: 60px;
}

.team-departments {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.dept-card h5 {
    font-size: 1.2rem;
    color: var(--brand-blue);
    margin-bottom: 16px;
    font-weight: 600;
}

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

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 1200px) {
    .container {
        padding: 0 5%;
    }
    .hero-box {
        padding: 60px 48px 0 48px;
    }
    .services-section {
        padding: 80px 80px 40px 80px;
        height: auto;
    }
    .qualifications-box {
        padding: 0 60px;
    }
    .projects-section .container {
        padding: 0 60px;
    }
}

@media (max-width: 1024px) {
    .hero-grid {
        gap: 20px;
    }
    .hero-box {
        height: auto;
        min-height: 700px;
    }
    .pillar-left, .pillar-right {
        height: 350px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-card {
        height: auto;
        padding-bottom: 40px;
    }
    .project-tags-horizontal {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .qualifications-box {
        height: auto;
        padding: 60px;
        flex-direction: column;
        text-align: center;
    }
    .qualifications-image {
        position: relative;
        transform: none;
        top: 0;
        margin-top: 40px;
        height: auto;
    }
    .qualifications-image img {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .callout-box {
        height: auto;
        min-height: 600px;
        padding-top: 60px;
        padding-bottom: 60px;
        background-size: cover;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .project-layout-grid {
        flex-direction: column !important;
    }
    .project-images-complex {
        width: 100%;
    }
    .images-col-small img, .images-col-large img {
        width: 100%;
        height: auto;
    }
    .images-col-large {
        flex: 2;
    }
    .images-col-small {
        flex: 1;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .header-inner {
        flex-direction: column;
        gap: 20px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-box {
        padding: 40px 24px 0 24px;
        height: auto;
        min-height: auto;
    }
    .container-hero {
        padding: 0 16px;
    }
    .hero-images-container {
        display: none;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .services-section .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
    }
    .split-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .services-cards-grid {
        grid-template-columns: 1fr;
    }
    .services-section {
        padding: 60px 24px;
        height: auto;
    }
    .projects-section .container {
        padding: 0 24px;
    }
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .project-images-complex {
        flex-direction: column;
    }
    .project-info-complex {
        height: auto;
        margin-top: 24px;
    }
    .project-tags-horizontal {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 30px;
        margin-top: 30px;
    }
    .callout-box {
        padding-left: 24px;
        padding-right: 24px;
    }
    .callout-box h2.black-text {
        font-size: 2rem;
    }
    .callout-actions {
        width: 100%;
    }
    .qualifications-box {
        padding: 40px 24px;
    }
    .footer-nav {
        flex-direction: column;
        gap: 20px;
    }
    .footer-info-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .carousel-item {
        flex: 0 0 85%;
        width: 85%;
    }
    .trust-logos {
        gap: 30px;
    }
}

/* --- CHI SIAMO RESPONSIVE --- */
@media (max-width: 1024px) {
    .mission-images-grid { grid-template-columns: 1fr; }
    .stats-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .border-right { border-right: none; }
    .pillars-grid { grid-template-columns: repeat(2, 1fr); }
    .team-departments { grid-template-columns: repeat(2, 1fr); }
    .team-banner-img { height: 400px; }
    .about-hero-box .hero-faro-image { opacity: 0.3; }
    .about-hero-box .hero-grid { max-width: 100%; }
}

@media (max-width: 768px) {
    .stats-grid-4 { grid-template-columns: 1fr; gap: 24px; }
    .pillars-grid { grid-template-columns: 1fr; }
    .team-departments { grid-template-columns: 1fr; }
    .about-hero-box { padding: 40px 24px; min-height: 500px; }
    .team-banner-img { height: 300px; }
}