:root {
    --primary-color: #1e3a8a;
    --secondary-color: #334155;
    --accent-color: #f59e0b;
    --light-gray: #f3f4f6;
    --darker-gray: #64748b;
    --white: #ffffff;
    --black: #111827;
    --text-color: #374151;
    --link-color: #1e40af;
    --success-color: #10b981;
    --error-color: #ef4444;
    --footer-bg: #1f2937;
    --font-primary: 'Roboto', 'Segoe UI', Tahoma, sans-serif;
    --font-secondary: 'Montserrat', 'Arial', sans-serif;
    --container-width: 1200px;
    --header-height: 100px;
    --footer-height: auto;
    --spacing-xs: 0.25rem;
    --spacing-s: 0.5rem;
    --spacing-m: 1rem;
    --spacing-l: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    --border-radius-s: 4px;
    --border-radius-m: 8px;
    --border-radius-l: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--accent-color);
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--spacing-l);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius-m);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #e67e22;
    border-color: #e67e22;
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #2c3e50;
    border-color: #2c3e50;
    color: var(--white);
    text-decoration: none;
}

header {
    background-color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s, box-shadow 0.3s;
    height: var(--header-height);
}

header.scrolled {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: calc((var(--header-height) - var(--spacing-s))* 1.2);
    width: auto;
    max-height: none;
}

header nav ul {
    display: flex;
    gap: var(--spacing-l);
}

header nav ul li a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: var(--spacing-s) 0;
    position: relative;
}

header nav ul li a:hover, header nav ul li a.active {
    color: var(--primary-color);
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

header nav ul li a:hover::after, header nav ul li a.active::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: color 0.3s ease;
    z-index: 1010;
}

.hamburger-menu.active {
    color: var(--accent-color);
}

.hero {
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/sfondo-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: calc(var(--header-height) + var(--spacing-xl)) 0 var(--spacing-xl);
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero .container {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-l);
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-gray);
}

.services h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--primary-color);
    position: relative;
    font-weight: 700;
}

.services h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: var(--spacing-s) auto 0;
}

.service-items {
    display: flex;
    gap: 1.2rem;
    width: max-content;
    align-items: stretch;
}

.service-item {
    background-color: var(--white);
    border-radius: var(--border-radius-m);
    padding: var(--spacing-l);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-m);
    display: inline-block;
}

.service-item h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-m);
    color: var(--primary-color);
    font-weight: 600;
}

.service-item p {
    color: var(--darker-gray);
    font-size: 0.95rem;
}

.service-carousel-container {
    position: relative;
    padding: 1.5rem 0;
    margin: 0 auto;
    max-width: 95%;
}

.service-carousel {
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 0 3rem 0;
    position: relative;
    border-radius: var(--border-radius-l);
}

.service-items.carousel {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll-services 30s linear infinite;
    animation-play-state: running;
    align-items: stretch;
}

.service-items.carousel:hover {
    animation-play-state: paused;
}

.service-item.carousel-card {
    min-width: 220px;
    max-width: 220px;
    flex: 0 0 220px;
    background: var(--white);
    border-radius: var(--border-radius-m);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 1.2rem 1rem;
    margin: 0;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
    border: 2px solid transparent;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    overflow: hidden;
}

.service-item.carousel-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 2px solid var(--accent-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s;
}

.service-icon i {
    font-size: 1.5rem !important;
    color: var(--white) !important;
    margin-bottom: 0 !important;
}

.service-item.carousel-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-item.carousel-card h3 {
    font-size: 1rem;
    margin-bottom: 0.7rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    word-wrap: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
    padding: 0 5px;
}

.service-item.carousel-card p {
    color: var(--darker-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

@keyframes scroll-services {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    :root {
        --spacing-l: 1rem;
        --spacing-xl: 1.5rem;
        --spacing-xxl: 2rem;
        --header-height: 60px;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        z-index: 1000;
        border-bottom: 1px solid var(--light-gray);
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    header nav.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
    }

    header nav ul li {
        margin: 0;
        width: 100%;
    }

    header nav ul li a {
        display: block;
        padding: var(--spacing-s) var(--spacing-l);
        border-bottom: 1px solid var(--light-gray);
        transition: background-color 0.3s ease;
    }

    header nav ul li a:hover {
        background-color: #f8fafc;
    }

    header nav ul li:last-child a {
        border-bottom: none;
    }

    header nav ul li a::after {
        display: none;
    }

    .hamburger-menu {
        display: block;
        position: relative;
        z-index: 1010;
    }

    .hero {
        min-height: 60vh;
        padding: calc(var(--header-height) + var(--spacing-xl)) 0 var(--spacing-xl);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .service-items {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-l);
    }

    .footer-column {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-m: 0.75rem;
        --spacing-l: 0.85rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .service-item {
        padding: var(--spacing-m);
    }

    .service-item h3 {
        font-size: 1.1rem;
    }

    .container {
        padding-inline: var(--spacing-m);
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-m);
    margin-top: var(--spacing-xl);
    padding: var(--spacing-m);
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-s);
    transition: transform var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
}

.about-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-image: url('../img/1 (26).jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 80px 0 80px 0;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: var(--header-height);
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20,20,20,0.65);
    z-index: 1;
}

.about-section .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-section h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.about-section p {
    color: var(--white);
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-section {
        padding: 40px 0;
    }
    .about-section .container {
        padding: 0 1rem;
    }
    .about-section h1 {
        font-size: 1.5rem;
    }
    .about-section p {
        font-size: 1rem;
    }
}

.about-hero {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-image: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.8)), url('../img/1 (26).jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: calc(var(--header-height) + 3rem) 0 3rem 0;
    text-align: center;
}

.about-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.about-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

.about-intro {
    padding: 4rem 0 2.5rem;
    background: var(--white);
}

.about-intro .container {
    max-width: 900px;
}

.about-intro h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.about-intro h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

.about-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-content {
    padding: 4rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-image img {
    transition: transform 0.5s, box-shadow 0.5s;
}

.about-image img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.team-section {
    padding: 4rem 0 5rem;
    background-color: var(--white);
}

.team-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.team-heading h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.team-heading h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

.team-heading p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--darker-gray);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.team-member {
    background: var(--white);
    border-radius: var(--border-radius-l);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.team-member:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.team-photo {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.team-member:hover .team-photo img {
    transform: scale(1.05);
}

.team-info {
    padding: 1.5rem 1.5rem 1.8rem;
    text-align: center;
    position: relative;
}

.team-info::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--white);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.team-member h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.team-member .role {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: block;
}

.team-member p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--darker-gray);
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.2rem;
}

.team-social a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.team-social a:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
}

.history-section {
    padding: 4rem 0 5rem;
    background-color: var(--light-gray);
}

.history-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.history-heading h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.history-heading h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

.history-heading p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--darker-gray);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 50px 0;
    box-sizing: border-box;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding: 0 0 50px 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-content {
    padding: 25px;
    background: var(--white);
    border-radius: var(--border-radius-m);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    transform: rotate(45deg);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: var(--border-radius-s);
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 25px;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.timeline-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--darker-gray);
}

.values-section {
    padding: 4rem 0 5rem;
    background-color: #f8fafc;
}

.values-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.values-heading h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.values-heading h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

.values-heading p {
    color: var(--darker-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.value-card {
    background-color: var(--white);
    border-radius: var(--border-radius-l);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.value-card:hover .value-icon {
    transform: scale(1.1) rotate(5deg);
}

.value-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.value-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.value-card p {
    color: var(--darker-gray);
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .timeline::before {
        left: 40px;
    }
    
    .timeline-item {
        width: 100%;
        padding-right: 0;
        padding-left: 80px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        padding: 0 0 50px 80px;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-item:nth-child(odd) .timeline-marker {
        right: auto;
        left: 30px;
    }
    
    .timeline-item .timeline-content::before {
        left: -10px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before {
        right: auto;
        left: -10px;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: calc(var(--header-height) + 2rem) 0 2rem 0;
    }
    
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-hero p {
        font-size: 1.1rem;
    }
    
    .about-intro {
        padding: 3rem 0 2rem;
    }
    
    .about-intro h2, .team-heading h2, .history-heading h2, .values-heading h2 {
        font-size: 1.7rem;
    }
    
    .team-grid, .values-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .philosophy-graphic {
        height: 220px;
        transform: scale(0.75);
        margin: -20px auto;
    }
    
    .main-circle {
        width: 70px;
        height: 70px;
    }
    
    .circle-1, .circle-2, .circle-3, .circle-4 {
        width: 55px;
        height: 55px;
    }
    
    .graphic-circle i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
    
    .graphic-circle span {
        font-size: 0.7rem;
    }
    
    .main-circle i {
        font-size: 1.6rem;
    }
}

.philosophy-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.philosophy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.philosophy-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
}

.philosophy-central {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.central-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.philosophy-card:hover .central-icon {
    transform: scale(1.1) rotate(5deg);
}

.central-icon i {
    font-size: 2.2rem;
    color: #ffffff;
}

.philosophy-central h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.philosophy-central p {
    color: var(--darker-gray);
    font-size: 0.95rem;
    font-style: italic;
}

.philosophy-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.philosophy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.philosophy-item:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-5px);
}

.philosophy-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}

.philosophy-item:hover i {
    transform: scale(1.1);
}

.philosophy-item span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.philosophy-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s);
}

.philosophy-item:nth-child(1) { --item-index: 1; }
.philosophy-item:nth-child(2) { --item-index: 2; }
.philosophy-item:nth-child(3) { --item-index: 3; }
.philosophy-item:nth-child(4) { --item-index: 4; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.philosophy-item i {
    display: inline-block;
}

.philosophy-item:hover i {
    animation: pulse 0.6s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

@media (max-width: 768px) {
    .philosophy-card {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .philosophy-card-inner {
        padding: 1.2rem;
    }
    
    .philosophy-central {
        margin-bottom: 1.5rem;
        padding-bottom: 1.2rem;
    }
    
    .central-icon {
        width: 70px;
        height: 70px;
    }
    
    .central-icon i {
        font-size: 1.8rem;
    }
    
    .philosophy-central h3 {
        font-size: 1.2rem;
    }
    
    .philosophy-items {
        gap: 1rem;
    }
    
    .philosophy-item {
        padding: 0.8rem 0.4rem;
    }
    
    .philosophy-item i {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }
    
    .philosophy-item span {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .philosophy-items {
        gap: 0.8rem;
    }
    
    .philosophy-item {
        padding: 0.7rem 0.3rem;
    }
    
    .philosophy-item i {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }
    
    .philosophy-item span {
        font-size: 0.8rem;
    }
}

/* FOOTER */
footer.footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-m);
    font-family: var(--font-primary);
    font-size: 1rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}
.footer-column {
    flex: 1;
    min-width: 220px;
    margin-right: var(--spacing-l);
    font-size: 0.95rem;
}
.footer-column h4, .footer-column h5 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-s);
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-m) 0;
}
.footer-column ul li {
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}
.footer-column a {
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.95rem;
}
.footer-column a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
.footer-column p,
.footer-column .motto {
    font-size: 0.95rem;
    line-height: 1.55;
}
.footer-bottom {
    border-top: 1px solid var(--secondary-color);
    margin-top: var(--spacing-l);
    padding: var(--spacing-m) var(--spacing-m) var(--spacing-xs) var(--spacing-m);
    text-align: center;
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
}
.footer-bottom p,
.footer-bottom .disclaimer {
    font-size: inherit;
}
.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lightbox-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    color: white;
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    font-weight: bold;
}

.lightbox-close:hover {
    transform: scale(1.2);
    text-shadow: 2px 2px 12px rgba(0,0,0,1);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    font-weight: bold;
}

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.2);
    text-shadow: 2px 2px 12px rgba(0,0,0,1);
}

.lightbox-nav.prev {
    left: 30px;
}

.lightbox-nav.next {
    right: 30px;
}

.lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    z-index: 10000;
}

@media (max-width: 768px) {
    /* Nascondi i controlli desktop su mobile */
    .lightbox-nav:not(.lightbox-controls-mobile .lightbox-nav) {
        display: none !important;
    }
    
    .lightbox-counter:not(.lightbox-controls-mobile .lightbox-counter) {
        display: none !important;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
        width: 45px;
        height: 45px;
    }
    
    /* Layout mobile: frecce ai lati del contatore */
    .lightbox-controls-mobile {
        position: fixed;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 60px;
        z-index: 10000;
        width: auto;
        padding: 10px 20px;
        white-space: nowrap;
        flex-wrap: nowrap;
        min-width: max-content;
    }
    
    .lightbox-controls-mobile .lightbox-nav {
        position: static !important;
        transform: none !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        font-size: 2.5rem !important;
        width: 50px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: none !important;
        border: none !important;
        color: white !important;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.9) !important;
        font-weight: bold !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .lightbox-controls-mobile .lightbox-counter {
        position: static !important;
        transform: none !important;
        bottom: auto !important;
        left: auto !important;
        margin: 0 !important;
        color: white !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.9) !important;
        padding: 0 !important;
        white-space: nowrap !important;
        min-width: max-content !important;
        flex-shrink: 0 !important;
    }
}
.footer-bottom a:hover {
    text-decoration: underline;
}
.motto {
    margin-bottom: var(--spacing-m);
    font-size: 1em;
}
@media (max-width: 900px) {
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-l);
        padding: 0 var(--spacing-m);
    }
    .footer-column {
        min-width: 100%;
        margin-right: 0;
    }
    .footer-bottom {
        padding: var(--spacing-m) var(--spacing-xs) var(--spacing-xs) var(--spacing-xs);
    }
}

/* ===== GALLERY PAGE ===== */
.header-center-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    white-space: nowrap;
}

.gallery-hero {
    position: relative;
    width: 100%;
    background-image: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.8)), url('../img/Santa Maria.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: calc(var(--header-height) + 2rem) 0 2rem;
    text-align: center;
    margin-bottom: 0;
}

.gallery-hero h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gallery-hero p {
    font-size: clamp(0.85rem, 2.5vw, 1.2rem);
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
    padding: 0 1rem;
}

.navigation-section {
    background-color: #f8fafc;
    padding: 1rem 0;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.gallery-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    justify-content: flex-start;
    padding: 0.3rem 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    white-space: nowrap;
}

.gallery-nav::-webkit-scrollbar {
    display: none;
}

.gallery-nav-item {
    padding: 0.6rem 1rem;
    background-color: #f8fafc;
    color: #1e3a8a;
    border: 1px solid #1e3a8a;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    white-space: nowrap;
    display: inline-block;
    min-width: 90px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.gallery-nav-item.active,
.gallery-nav-item:hover {
    background-color: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

.gallery-section {
    padding: 3rem 0;
}

.gallery-section--white {
    background-color: #ffffff;
}

.gallery-section--gray {
    background-color: #f8fafc;
}

.gallery-section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.gallery-section-header h2 {
    color: #1e3a8a;
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background-color: #f59e0b;
    margin: 0 auto 1.5rem;
}

.gallery-section-header p {
    max-width: 800px;
    margin: 0 auto;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    color: #4b5563;
    padding: 0 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-grid--single {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.featured-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-grid--single .featured-gallery-item img {
    height: clamp(200px, 50vw, 450px);
}

.featured-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1rem;
    color: white;
}

.featured-gallery-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
}

.featured-gallery-overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.gallery-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.hidden-gallery {
    display: none;
}

/* Home projects slider mobile */
.project-slider .slider-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0.5rem;
}

.project-slider .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 250px;
    text-decoration: none;
}

.project-slider .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-slider .gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.project-slider .gallery-item-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

/* Mobile gallery improvements */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    header {
        height: 60px;
    }

    .header-center-title {
        font-size: 0.85rem;
        letter-spacing: 1px;
        max-width: 40%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo img {
        height: 40px;
    }

    .navigation-section {
        top: 60px;
        padding: 0.5rem 0;
    }

    .gallery-nav {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .gallery-nav-item {
        padding: 0.4rem 0.7rem;
        min-width: auto;
        font-size: 0.75rem;
    }

    .gallery-section {
        padding: 2rem 0;
    }

    .featured-gallery-item img {
        height: 200px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero {
        background-attachment: scroll;
        min-height: 60vh;
        padding-top: calc(var(--header-height) + 1.5rem);
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .project-slider .slider-slide {
        grid-template-columns: 1fr !important;
    }

    .project-slider .gallery-item {
        height: 200px !important;
    }

    .lightbox-image {
        max-height: 75vh;
        object-fit: contain;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .project-slider .slider-slide {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 769px) {
    .navigation-section {
        top: 100px;
    }
}

@media (max-width: 600px) {
    .footer-column h4, .footer-column h5 {
        font-size: 1.05rem;
    }
    .footer-column,
    .footer-column p,
    .footer-column ul,
    .footer-column li,
    .footer-column a,
    .footer-column .motto {
        font-size: 0.95rem;
    }
    .footer-bottom,
    .footer-bottom p,
    .footer-bottom .disclaimer {
        font-size: 0.8rem;
    }
}

.footer-admin-link {
    font-size: 0.75em;
    color: #94a3b8;
    text-decoration: none;
    margin-left: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-admin-link:hover {
    opacity: 1;
    color: #cbd5e1;
    text-decoration: underline;
}
