/* ============================================
   FONT LOCALI
   ============================================ */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/montserrat-v31-latin-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/montserrat-v31-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/montserrat-v31-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/montserrat-v31-latin-800.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/open-sans-v44-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/open-sans-v44-latin-600.woff2') format('woff2');
}

/* ============================================
   RESET E BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f9fafb; /* gray-50 */
    color: #1f2937; /* gray-800 */
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

/* ============================================
   VARIABILI CSS (Colori istituzionali)
   ============================================ */
:root {
    --cn-blue: #0d1e4c;
    --cn-yellow: #ffe600;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --white: #ffffff;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3, h4, .font-heading {
    font-family: 'Montserrat', sans-serif;
}

strong {
    font-weight: 600;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
    background-color: var(--cn-blue);
    padding: 0.5rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-logo {
    height: 4rem;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-title {
    display: block;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.25;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.navbar-title span {
    color: var(--cn-yellow);
}

/* Desktop Menu */
.nav-menu {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--cn-yellow);
}

.nav-link-cta {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--cn-yellow);
    color: var(--cn-yellow);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.nav-link-cta:hover {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.nav-social {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.nav-social a {
    color: var(--white);
    transition: color 0.2s ease;
}

.nav-social a:hover {
    color: var(--cn-yellow);
}

.nav-social i {
    font-size: 1.125rem;
}

.nav-social .fa-envelope {
    font-size: 1.25rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    color: var(--white);
    font-size: 1.5rem;
}

/* Mobile Menu Dropdown */
.mobile-menu {
    display: block;
    background-color: var(--cn-blue);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.mobile-menu.open {
    max-height: 400px;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    text-align: center;
}

.mobile-menu-link {
    color: var(--white);
    font-weight: 600;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.mobile-menu-link:hover {
    color: var(--cn-yellow);
}

.mobile-menu-link.active,
.mobile-menu-link[aria-current="page"] {
    color: var(--cn-yellow);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(13, 30, 76, 0.6), rgba(13, 30, 76, 0.8));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    padding: 5rem 1.5rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hero-title span {
    color: var(--cn-yellow);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    color: #e5e7eb;
}

.hero-cta {
    display: inline-block;
    background-color: var(--cn-yellow);
    color: var(--cn-blue);
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background-color: var(--white);
    transform: scale(1.05);
}

/* ============================================
   CHI SIAMO SECTION
   ============================================ */
.chi-siamo {
    padding: 6rem 0;
    background-color: var(--white);
}

.chi-siamo-container,
.pagina-container {
    padding: 0 1.5rem;
}

.chi-siamo-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.chi-siamo-text {
    width: 100%;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-line {
    width: 4rem;
    height: 0.25rem;
    background-color: var(--cn-yellow);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cn-blue);
    text-transform: uppercase;
}

.chi-siamo-paragraphs,
.pagina-testo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.75;
}

.chi-siamo-image-wrapper {
    width: 100%;
    position: relative;
}

.chi-siamo-image {
    width: 100%;
    border-radius: 0.5rem;
    position: relative;
    z-index: 10;
}

.image-shadow {
    box-shadow: 20px 20px 0px var(--cn-yellow);
}

/* ============================================
   STORIA SECTION
   ============================================ */
.storia {
    padding: 6rem 0;
    background-color: var(--cn-blue);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.storia-decoration {
    position: absolute;
    right: -5rem;
    bottom: -5rem;
    color: var(--white);
    opacity: 0.05;
    font-size: 30rem;
    transform: rotate(12deg);
}

.storia-container {
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
}

.storia-header {
    text-align: center;
    margin-bottom: 4rem;
}

.storia-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.storia-line {
    width: 6rem;
    height: 0.25rem;
    background-color: var(--cn-yellow);
    margin: 0 auto;
}

.storia-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.storia-image-wrapper {
    order: 2;
}

.storia-image {
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 4px solid var(--white);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.storia-image:hover {
    opacity: 1;
}

.storia-content {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.storia-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--cn-yellow);
    backdrop-filter: blur(4px);
}

.storia-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cn-yellow);
    margin-bottom: 1rem;
}

.storia-card-title i {
    margin-right: 0.5rem;
}

.storia-card p {
    line-height: 1.75;
    margin-bottom: 1rem;
}

.storia-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-left: 0.5rem;
}

.storia-list li {
    display: flex;
    align-items: flex-start;
}

.storia-list i {
    color: var(--cn-yellow);
    margin-top: 0.25rem;
    margin-right: 0.75rem;
}

.storia-extra {
    color: var(--gray-300);
}

.storia-footer {
    margin-top: 4rem;
    display: grid;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--gray-300);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

/* ============================================
   STAFF SECTION
   ============================================ */
.staff {
    padding: 5rem 0;
    background-color: var(--gray-100);
}

.staff-container {
    padding: 0 1.5rem;
}

.staff-card {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    background-color: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    align-items: center;
}

.staff-image-wrapper {
    width: 100%;
}

.staff-image {
    border-radius: 0.5rem;
    width: 100%;
    height: 16rem;
    object-fit: cover;
}

.staff-content {
    width: 100%;
}

.staff-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--cn-blue);
    margin-bottom: 1rem;
    padding: 0.75rem;
}

.staff-text {
    font-size: 1.125rem;
    color: var(--gray-600);
    padding: 0.75rem;
}

.staff-tags {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.staff-tag {
    padding: 0.5rem 1rem;
    background-color: var(--blue-100);
    color: var(--cn-blue);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   SOCIETA SECTION
   ============================================ */
.societa {
    padding: 6rem 0;
    background-color: var(--white);
}

.societa-container {
    padding: 0 1.5rem;
    text-align: center;
}

.societa-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cn-blue);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.societa-subtitle {
    font-size: 1.25rem;
    color: var(--gray-500);
    margin-bottom: 3rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

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

.societa-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.societa-card:hover {
    border-color: var(--cn-yellow);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.5rem);
}

.societa-card-icon {
    width: 6rem;
    height: 6rem;
    background-color: var(--blue-50);
    color: var(--cn-blue);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: background-color 0.2s ease;
}

.societa-card:hover .societa-card-icon {
    background-color: var(--cn-yellow);
}

.societa-card-icon i {
    font-size: 2rem;
}

.societa-card-logo {
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.societa-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.societa-card:hover .societa-card-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.societa-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
}

.societa-image {
    margin-top: 4rem;
}

.societa-image img {
    width: 100%;
    height: 20rem;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    filter: brightness(0.9);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--cn-blue);
    color: var(--white);
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 4px solid var(--cn-yellow);
}

.footer-container {
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    align-items: center;
}

.footer-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-info .subtitle {
    color: var(--cn-yellow);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-info p {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social-link {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.footer-social-link:hover {
    background-color: var(--cn-yellow);
    color: var(--cn-blue);
}

.footer-social-link i {
    font-size: 1.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.footer-bottom a {
    color: var(--gray-300);
    font-weight: 600;
}

.footer-bottom a:hover {
    color: var(--cn-yellow);
}

/* ============================================
   PAGINA SAFEGUARDING
   ============================================ */
.pagina {
    padding: 10rem 0 6rem;
    background-color: var(--white);
}

.pagina-testo {
    max-width: 48rem;
}

.pagina-testo h2 {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cn-blue);
    text-transform: uppercase;
}

.pagina-testo ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.pagina-testo a {
    color: var(--cn-blue);
    font-weight: 600;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE - TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
    .navbar-logo {
        height: 5rem;
    }

    .navbar-title {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

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

    .storia-image-wrapper {
        order: 1;
    }

    .storia-content {
        order: 2;
    }

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

    .staff-card {
        flex-direction: row;
    }

    .staff-image-wrapper {
        width: 33.333%;
    }

    .staff-content {
        width: 66.666%;
    }

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

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ============================================
   RESPONSIVE - DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .mobile-menu {
        display: none;
    }

    .chi-siamo-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }

    .chi-siamo-text {
        width: 50%;
    }

    .chi-siamo-image-wrapper {
        width: 50%;
    }

    .societa-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   RESPONSIVE - IPHONE 12+ (390px+)
   Ottimizzazioni per schermi piccoli moderni
   ============================================ */
@media (max-width: 430px) {
    /* Hero */
    .hero-title {
        font-size: 2.75rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .hero-cta {
        padding: 0.875rem 2rem;
        font-size: 0.875rem;
    }

    /* Navbar */
    .navbar-container {
        padding: 0 1rem;
    }

    .navbar-logo {
        height: 3.5rem;
    }

    .navbar-title {
        font-size: 0.8rem;
    }

    .navbar-brand {
        gap: 0.5rem;
    }

    /* Sezioni */
    .chi-siamo,
    .storia,
    .staff,
    .societa {
        padding: 4rem 0;
    }

    .pagina {
        padding: 8rem 0 4rem;
    }

    .chi-siamo-container,
    .pagina-container,
    .storia-container,
    .staff-container,
    .societa-container {
        padding: 0 1rem;
    }

    .section-title,
    .storia-title,
    .societa-title {
        font-size: 1.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-line {
        width: 3rem;
    }

    .chi-siamo-paragraphs,
    .pagina-testo {
        font-size: 1rem;
    }

    /* Image shadow ridotto su mobile */
    .image-shadow {
        box-shadow: 12px 12px 0px var(--cn-yellow);
    }

    /* Riduce spazio tra testo Chi Siamo e immagine */
    .chi-siamo-image-wrapper {
        margin-top: 1.5rem;
    }

    /* Storia */
    .storia-card {
        padding: 1.5rem;
    }

    .storia-card-title {
        font-size: 1.25rem;
    }

    .storia-list li {
        font-size: 0.9375rem;
    }

    .storia-decoration {
        font-size: 15rem;
        right: -3rem;
        bottom: -3rem;
    }

    /* Staff */
    .staff-card {
        padding: 1.5rem;
    }

    .staff-title {
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .staff-text {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .staff-tags {
        gap: 0.5rem;
    }

    .staff-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Società cards */
    .societa-card {
        padding: 1.5rem;
    }

    .societa-card-icon {
        width: 3.5rem;
        height: 3.5rem;
        margin-bottom: 1rem;
    }

    .societa-card-icon i {
        font-size: 1.25rem;
    }

    .societa-card-title {
        font-size: 1rem;
    }

    .societa-subtitle {
        font-size: 1rem;
    }

    .societa-image img {
        height: 14rem;
    }

    /* Footer */
    .footer {
        padding-top: 3rem;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer-info h4 {
        font-size: 1.25rem;
    }

    .footer-social-link {
        width: 2.5rem;
        height: 2.5rem;
    }

    .footer-social-link i {
        font-size: 1rem;
    }

    /* Mobile menu */
    .mobile-menu-inner {
        padding: 1rem;
    }

    .mobile-menu-link {
        font-size: 0.9375rem;
    }
}

/* ============================================
   RESPONSIVE - IPHONE SE / Schermi molto piccoli
   ============================================ */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .navbar-logo {
        height: 2.5rem;
    }

    .navbar-title {
        font-size: 0.6875rem;
    }

    .section-title,
    .storia-title,
    .societa-title {
        font-size: 1.5rem;
    }

    .storia-card-title {
        font-size: 1.125rem;
    }

    .staff-title {
        font-size: 1.375rem;
    }
}
