/* Condensed */
@font-face {
    font-family: 'Futura';
    src: url('futura/Futura-CondensedLight.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-LightCondensed.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-MediumCondensed.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-BoldCondensed.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-ExtraBlackCondItalic.woff2') format('woff2');
    font-weight: 900;
    font-style: italic;
    font-stretch: condensed;
    font-display: swap;
}

/* Normal */
@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-LightItalic.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-BookItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-MediumItalic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/Futura-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-Heavy.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-HeavyItalic.woff2') format('woff2');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/FuturaBT-ExtraBlack.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('futura/Futura-Black-Bold.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


* {
  -webkit-tap-highlight-color: transparent;
}

:root {
    --navy: #08121a; 
    --dark-blue: #0b2130; /* darker variant for gradients */
    --light-blue: #123047; /* lighter variant for accents */
    --BLUTEAM : #1F3A6E;
    --ARANCIOTEAM: #EF8620; /* ARANCIO (provided) */
    --orange-hover: #F39B43; /* hover variant (adjustable) */
    --text-light: #E8EAF6;
    --text-gray: #B0BEC5;
}

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

body {
    font-family: 'Futura', sans-serif;
    background: var(--navy);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100vw;
}

/* Floating pill navbar (positioned above the page) */
.floating-nav{
    position:fixed;
    left:50%;
    top:14px;
    transform:translateX(-50%);
    z-index:1400;
    background: rgba(8,18,26,0.8);
    border-radius:999px;
    padding:6px 10px; /* slightly increased vertical padding to be less thin */
    /* enforce fixed visual height so large children (e.g. logo img) don't grow the bar */
    height:56px;
    min-height:56px;
    box-shadow:0 10px 28px rgba(8,18,26,0.55), 0 3px 10px rgba(0,0,0,0.18);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
    width: min(1100px, calc(100% - 48px));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.floating-nav-inner{display:flex;align-items:center;gap:12px;position:relative;padding:0 8px;height:100%}
/* nav-logo container should not increase navbar height */
.floating-nav .nav-logo{display:flex;align-items:center;height:100%;overflow:hidden;padding-right:8px}
.floating-nav .nav-logo img{max-height:40px;width:auto;display:block}

/* Social icons to the right of the nav */
.nav-socials{display:flex;align-items:center;gap:8px;}
.nav-social{display:inline-flex;align-items:center;justify-content:center;color:rgba(255,255,255,0.88);text-decoration:none;border-radius:8px;padding:6px}
.nav-social svg,
.nav-social img{display:block;width:18px;height:18px;object-fit:contain}
.nav-social:hover{color:var(--ARANCIOTEAM);background:rgba(255,255,255,0.04)}

/* Ensure contatti uses same visual style as other links */
.floating-nav-links .floating-nav-item{background:transparent}
.floating-nav-links{display:flex;gap:10px;list-style:none;margin:0;padding:0;margin-right:auto}


.floating-nav-item{color:rgba(255,255,255,0.94);text-decoration:none;padding:6px 8px;border-radius:999px;font-weight:800;font-size:14px;position:relative;z-index:2}
.floating-nav-item:hover{color:var(--ARANCIOTEAM);background:rgba(255,255,255,0.04)}

.floating-nav-inner .nav-indicator{
    position:absolute;
    top:50%;
    left:0;
    transform:translateY(-50%);
    height:38px;
    border-radius:999px;
    background:rgba(255,255,255,0.12);
    box-shadow:0 8px 20px rgba(0,0,0,0.2);
    pointer-events:none;
    transition:transform 260ms cubic-bezier(.2,.9,.2,1),width 260ms cubic-bezier(.2,.9,.2,1),opacity 180ms;
    opacity:0.95;
    width:30px;
}

/* New Boat Page Layout */
.boats-list {
    display: flex;
    flex-direction: column;
    gap: 6rem; /* Increased gap for more breathing room */
    max-width: 1200px;
    margin: 3rem auto 0;
}

.boat-card-new {
    display: flex;
    gap: 3rem;
    align-items: center;
}

/* Alternate layout for every second card */
.boat-card-new:nth-child(even) {
    flex-direction: row-reverse;
}

.boat-render-container {
    flex: 1 1 55%;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 400px;
}
.boat-render-container:hover {
    transform: scale(1.03);
}

.boat-render-container img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    object-fit: cover;
    display: block;
}

.boat-details-container {
    flex: 1 1 45%;
    padding: 1rem;
}

.boat-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 1.5px solid rgba(239, 134, 32, 0.5);
    padding-bottom: 1rem;
}

.boat-title h2 {
    font-size: 4.5rem;
    margin: 0;
    color: var(--text-light);
    line-height: 1;
    font-weight: 800;
}

.boat-title .boat-code {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ARANCIOTEAM);
    transform: translateY(0);
    margin-top: -1.8rem;
}

.boat-specs {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 1rem;
}

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

.spec-item span {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-item strong {
    font-size: 1.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.boat-description p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.7;
}

    /* Styles for imbarcazioni.php, replacing inline styles */
    .boats-section .lead-text {
        text-align: center;
        max-width: 900px;
        margin: 0 auto 2rem;
        color: var(--text-gray);
    }

    /* Removed duplicated nav block (kept the primary definition earlier). */

    /* Hero Section */
    .hero {
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        background-image: url('media/sfondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    }

    .hero::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at 20% 50%, rgba(239,134,32,0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 50%, rgba(239,134,32,0.05) 0%, transparent 50%);
    }

    .hero-content {
        text-align: center;
        position: relative;
        z-index: 2;
        padding: 2rem;
    }

    .hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);z-index:1;pointer-events:none}

    .hero h1 {
        /* When using an image logo, ensure the container keeps spacing for layout */
        font-size: 6rem;
        font-weight: 900;
        margin-bottom: 1rem;
        line-height: 1.1;
        letter-spacing: 0.05em;
    }

    /* Hero logo image */
    .hero-logo{
        display:block;
        width: 100%;
        max-width: 500px;
        height: auto;
        margin: 0 auto;
    }

    .hero p {
        font-size: 1.3rem;
        color: var(--text-gray);
        max-width: 600px;
        margin: 0 auto;
    }

    /* Sections */
    section {
        padding: 6rem 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    .boats-section,
    .contact-section,
    section[id="team"] {
        padding-top: 120px;
    }

    h2 {
        font-size: 5rem;
        margin-bottom: 3rem;
        text-align: center;
        color: var(--text-light);
        font-weight: 800;
    }

    h2::after {
        content: '';
        display: block;
        width: 80px;
        height: 4px;
        margin: 1rem auto 0;
    }
    
    /* About Section */
    .about {
        padding-top: 4rem;
    }

    .about-content {
        max-width: 900px;
        margin: 0 auto;
        /* increase text size by 150% as requested */
        font-weight: normal;
        font-size: 1.5rem; /* 1.1rem * 1.5 = 1.65rem */
        line-height: 1.8;
        color: var(--text-light);
    }

    .about-content p {
        margin-bottom: 1.5rem;
    }

    /* Make <mark> highlights in About match the emphasized "principale" word */
    .about-content mark{
        background:transparent;
        font-weight:800;
        color: var(--ARANCIOTEAM);

    }

    .boat-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: var(--ARANCIOTEAM);
    }

    .boat-info p {
        color: var(--text-gray);
        font-size: 0.95rem;
    }

    /* Team Section */
    .division {
        margin-bottom: 4rem;
    }

    .division h3 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        color: var(--ARANCIOTEAM);
        text-align: left;
    }

    .team-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }

    .member-card {
        background: #000;
        border-radius: 12px;
        border: 1px solid rgba(239, 134, 32, 0.1);
        display: flex;
        overflow: hidden;
        position: relative;
        transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    }
    
    .member-card:not(.simplified) {
        align-items: stretch;
    }
    .member-card:not(.simplified):hover {
        transform: translateY(-3px);
        border-color: var(--ARANCIOTEAM);
        box-shadow: 0 8px 20px rgba(239, 134, 32, 0.3);
    }

    .member-photo {
        width: 100px;
        min-height: 140px;
        background: linear-gradient(135deg, var(--light-blue) 0%, var(--dark-blue) 100%);
        flex-shrink: 0;
    }
    .member-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .member-info {
        display: flex;
        flex-grow: 1;
        text-align: left;
    }
    .member-card:not(.simplified) .member-info {
        flex-direction: column;
        padding: 1.2rem;
    }

    .member-role {
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--ARANCIOTEAM);
        letter-spacing: 0.1em;
        text-transform: uppercase;
        margin-bottom: 0.5rem;
    }

    .member-name {
        font-weight: 600;
        color: var(--text-light);
    }
    .member-card:not(.simplified) .member-name {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
    }

    .member-course {
        color: var(--text-gray);
    }
    .member-card:not(.simplified) .member-course {
        font-size: 0.8rem;
        margin-bottom: auto; /* Pushes links down */
    }

    .member-links {
        display: flex;
        gap: 0.8rem;
    }
    .member-card:not(.simplified) .member-links {
        margin-top: 0.8rem;
        opacity: 0;
        transform: translateY(5px);
        transition: opacity 0.3s, transform 0.3s;
    }
    .member-card:not(.simplified):hover .member-links {
        opacity: 1;
        transform: translateY(0);
    }

    .member-links a {
        color: var(--ARANCIOTEAM);
        font-size: 1.2rem;
        text-decoration: none;
        transition: color 0.3s, transform 0.2s;
    }
    .member-links a:hover {
        color: var(--orange-hover);
        transform: scale(1.15);
    }

    /* Simplified Card */
    .member-card.simplified {
        padding: 0.8rem 1rem;
        align-items: center;
    }
    .member-card.simplified .member-photo,
    .member-card.simplified .member-role {
        display: none;
    }
    .member-card.simplified .member-info {
        align-items: baseline;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .member-card.simplified .member-name {
        font-size: 0.95rem;
    }
    .member-card.simplified .member-course {
        font-size: 0.75rem;
    }
    .member-card.simplified .member-links {
        margin-left: auto;
    }

    /* Contact Section */
    .contact-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 3rem;
        max-width: 1200px;
        margin: 4rem auto 0;
        align-items: flex-start;
    }

    .contact-info-container {
        background: #000;
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .form-container {
        grid-column: 2/2;
        grid-row: 1 / 2;
        background: #fff;
        border-radius: 12px;
        border: 1px solid #fff;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .form-container iframe {
        width: 100%;
        max-width: 640px;
        height: 800px;
        border-radius: 8px;
    }

    .contact-form-container,
    .contact-info-container {
        background: rgba(8, 18, 26, 0.65);
        -webkit-backdrop-filter: blur(12px) saturate(150%);
        backdrop-filter: blur(12px) saturate(150%);
        border-radius: 12px;
        padding: 3rem;
        border: 1px solid rgba(239, 134, 32, 0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .contact-form-container h3 {
        font-size: 1.8rem;
        color: var(--text-light);
        margin-bottom: 2rem;
        text-align: left;
    }

    .contact-info-container .contact-card {
        background: transparent;
        border: none;
        padding: 0;
        text-align: left;
        margin-bottom: 2.5rem;
        border-radius: 0;
        transition: transform 0.3s;
    }

    .contact-info-container .contact-card:hover {
        transform: translateX(5px);
    }

    .contact-info-container .contact-card:last-child {
        margin-bottom: 0;
    }

    .contact-info-container .contact-card h3 {
        font-size: 1.4rem;
        margin-bottom: 0.7rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        color: var(--ARANCIOTEAM);
    }

    .contact-card p {
        color: var(--text-gray);
        margin-bottom: 0.5rem;
        padding-left: 0; /* Align with h3 text */
    }
    .contact-card p:last-child {
        margin-bottom: 0;
    }

    .contact-card a {
        color: var(--text-light);
        text-decoration: none;
        transition: color 0.3s;
    }

    .contact-card a:hover {
        color: var(--ARANCIOTEAM);
    }

    .contact-form .form-group {
        margin-bottom: 1.5rem;
    }

    .contact-form label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--text-gray);
        font-size: 0.9rem;
    }

    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        width: 100%;
        padding: 0.9rem 1.1rem;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.25);
        color: var(--text-light);
        font-size: 1rem;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

    .contact-form input[type="text"]:focus,
    .contact-form input[type="email"]:focus,
    .contact-form textarea:focus {
        outline: none;
        border-color: var(--ARANCIOTEAM);
        box-shadow: 0 0 0 3px rgba(239, 134, 32, 0.25);
    }

    .contact-form textarea {
        resize: vertical;
        min-height: 140px;
    }

.map-container {
    background: rgba(8, 18, 26, 0.65);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(239, 134, 32, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-container .google-map {
    border-radius: 8px;
    width: 100%;
    height: 300px;
}

/* Footer */
.main-footer {
    background: var(--dark-blue);
    padding: 2rem;
    color: var(--text-gray);
    border-top: 1px solid rgba(239,134,32,0.1);
    margin-top: 4rem;
}

.main-footer .footer-content {
    display: flex;
    justify-content: space-between; /* Aligns items to left and right */
    align-items: center; /* Vertically center items */
    max-width: 1400px; /* Same max-width as sections */
    margin: 0 auto; /* Center the content */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 1rem; /* Space between copyright and language switcher on wrap */
}

.main-footer .footer-left p {
    margin: 0; /* Remove default paragraph margin */
    text-align: left; /* Ensure copyright is left-aligned */
    font-size: 0.9rem;
}

.main-footer .footer-right {
    text-align: right; /* Ensure language switcher is right-aligned */
}

.main-footer .language-switcher span {
    margin-right: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.main-footer .lang-link {
    color: var(--ARANCIOTEAM);
    text-decoration: none;
    font-weight: bold;
    margin: 0 0.2rem;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.main-footer .lang-link:hover {
    color: var(--orange-hover);
}

.main-footer .lang-link.active-lang {
    color: var(--text-light); /* Make active language white */
    text-decoration: underline;
}

    /* CTA button */
    .cta-button{
        background: rgba(50, 50, 50, 0.7);
        color: var(--ARANCIOTEAM);
        border: 2px solid var(--ARANCIOTEAM);
        padding: 0.8rem 1.2rem;
        border-radius: 8px;
        font-weight:700;
        cursor:pointer;
        transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
    }

    .cta-button:hover{
        background: var(--ARANCIOTEAM);
        color: #08121a;
        transform:translateY(-3px);
        box-shadow:0 8px 20px rgba(239,134,32,0.16);
    }

    /* Section fade-in for content blocks */
    section {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

    section.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* More prominent animation for the About section */
    section.about {
        opacity: 0;
        transform: translateY(50px) scale(0.98);
        transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1), transform 1s cubic-bezier(0.19, 1, 0.22, 1);
    }

    section.about.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    /* Video modal overlay */
    .video-modal{display:none;position:fixed;inset:0;z-index:2000;align-items:center;justify-content:center}
    .video-modal.open{display:flex}
    .modal-open .video-modal{display:flex}
    .video-modal-backdrop{position:fixed;inset:0;background:rgba(2,6,12,0.65);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
    .video-modal-close{position:absolute;top:0.5rem;right:0.5rem;z-index:3;background:transparent;border:0;color:#fff;font-size:1.4rem;padding:0.4rem;cursor:pointer}

    /* When modal open, blur the page content behind it */
    .modal-open body > *:not(.video-modal) {
        filter: blur(6px);
        transition: filter 0.25s;
    }

    /* Additional video modal helpers (used by index.php script) */
    .video-modal-content { position: relative; width: min(95vw, 1200px); max-width: 100%; background: transparent; z-index: 2; }
    .video-wrapper { width: 100%; display:flex; align-items:center; justify-content:center; }
    .video-wrapper iframe { width: min(90vw, 1200px); height: calc(min(90vw, 1200px) * 9 / 16); max-height: 85vh; border: 0; display: block; background: #000; }
    .video-modal-close { position: absolute; right: -10px; top: -10px; z-index:3; background: #fff; border-radius:50%; border: none; width:38px; height:38px; font-size:20px; cursor:pointer; }

/* Gallery styles */
.gallery{padding:0 1.5rem 4rem;max-width:1400px;margin:0 auto}
.gallery-inner h2{color:var(--text-light);text-align:center;margin-bottom:0.5rem}
.gallery-inner .lead{color:var(--text-gray);text-align:center;margin-bottom:1.8rem}
.gallery-grid {
    display: flex;
    flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
    gap: 16px;
}

.gallery-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 22%; /* Flex-grow, flex-shrink, and base width for ~4 columns */
}

/* Apply stagger to every second column */
.gallery-column:nth-child(2n) {
    margin-top: 50px;
}

.tile{
    width:100%;
    border-radius:10px;
    overflow:hidden;
    position:relative;
    box-shadow:0 8px 20px rgba(0,0,0,0.35);
    background:linear-gradient(180deg,rgba(0,0,0,0.18),rgba(0,0,0,0.06));
}
.tile--image img{width:100%;height:auto;object-fit:cover;display:block}

.tile--stat {
    position: absolute; /* Overlay on top of parent */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent overlay for readability */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light); /* Ensure text color is visible */
    /* Always visible, no hover effect */
}

/* Wrapper for number and plus sign to keep them inline */
.number-and-plus {
    display: flex;
    align-items: center; /* Align the bottom of the text */
    justify-content: center;
    gap: 0.2em; /* Small space between number and plus */
}

/* Style for the plus sign */
.plus-sign {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem); /* Responsive font size */
    font-weight: 800; /* Match the number's weight */
    color: var(--ARANCIOTEAM); /* Match the number's color */
}

.tile--stat .number-card .number {
    font-size: clamp(2.5rem, 6vw, 5rem); /* Responsive font size */
    font-weight: 800;
    color: var(--ARANCIOTEAM);
    line-height: 1.1;
}

.tile--stat .number-card p {
    font-size: clamp(0.8rem, 2.2vw, 1.5rem); /* Responsive font size */
    color: var(--text-gray);
    margin-top: 0.5rem;
}

.team-banner {
    width: 100%;
    margin-bottom: 3rem;
}

.team-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

.politecnico-logo {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 150px;
}

.politecnico-logo img {
    width: 100%;
    height: auto;
    display: block;
}

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

.sponsor-carousel-track {
    display: inline-flex;
    animation: scroll 25s linear infinite;
}

.sponsor-carousel-track img {
    width: 100px;
    height: 40px;
    object-fit: contain;
    margin-right: 40px;
}

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

.sponsor-carousel-section {
    padding: 2rem 0;
    background-color: var(--navy);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Ensure it's above other nav elements */
    transform:translateX(-50%);
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position:relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 4px;
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Active state for hamburger */
.hamburger-menu.is-active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger-menu.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(90deg);
}

.hamburger-menu.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(90deg);
    opacity: 0;
}

.nav-links-container {
    display: contents;
    align-items: center;
    margin-left: auto;
}

/* UNIFIED MOBILE BREAKPOINT */

@media (max-width: 600px) {

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    h2 {
        font-size: 2rem;
    }

    .member-card.leader .member-info {
        padding: 1rem;
    }

    .member-card.leader .member-role {
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }

    .member-card.leader .member-name {
        font-size: 1rem;
    }

    .hero-logo{
        display:block;
        width: 70%;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .boats-grid {
        grid-template-columns: 1fr;
    }

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

    .main-footer .footer-left p,
    .main-footer .footer-right {
        text-align: center;
    }

    .boat-card-new,
    .boat-card-new:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
    }

    .boat-render-container,
    .boat-details-container {
        flex-basis: 100%;
    }

    .boat-render-container {
        height: 500px;
    }

    .boat-title h2 {
        font-size: 3rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 3rem;
    }
    .contact-info-container,
    .map-container,
    .form-container {
        grid-column: 1 / 2;
    }
    .contact-info-container {
        grid-row: 1 / 2;
    }
    .map-container {
        grid-row: 2 / 3;
    }
    .form-container {
        grid-row: 3 / 4;
    }

    /* 600px video modal rules */
    .video-modal-inner {
        width: 95vw;
        height: 56.25vw;
    }
    .video-modal-close {
        font-size: 1.1rem;
    }

    /* 600px gallery rules */
    .gallery {
        padding: 0 0.75rem 4rem;
    }
    
    .gallery-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .gallery-column {
        width: 100%; /* Reset width for grid item */
        gap: 16px;
    }
    
    .gallery-column:nth-child(2n) {
        margin-top: 0;
    }

    .tile--stat .number-card .number {
    font-size: clamp(3.5rem, 6vw, 5rem); /* Responsive font size */
    font-weight: 800;
    color: var(--ARANCIOTEAM);
    line-height: 1.1;
    }
    
    .floating-nav-inner {
        gap: 8px;
        padding: 0 4px;
    }

    .floating-nav {
        top: 12px;
        padding: 6px 8px;
    }

    .floating-nav-item {
        font-size: 13px;
        padding: 5px 7px;
    }

    .floating-nav-inner .nav-indicator {
        display: none;
    }

    .nav-socials {
        display: none;
    }
    
    .politecnico-logo {
        width: 100px;
        bottom: 15%;
    }

    .sponsor-carousel-track img {
        width: 80px;
        height: 32px;
        margin-right: 30px;
    }

    .hero {
        background-image: url('media/sfondomobile.jpg');
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: 3; /* Move to the end */
        margin-left: auto; /* Add some space from the edge */
    }

    .floating-nav .nav-logo {
        flex-grow: 0; /* Allow logo to take up space */
    }

    .floating-nav-links,
    .nav-socials {
        display: none; /* Hide original links on mobile */
    }

    .nav-links-container {
        display: flex; /* Use flex for layout */
        flex-direction: column;
        align-items: stretch; /* Override desktop 'center' to allow full-width children */
        position: absolute;
        top: calc(100% + 5px); /* Position below the navbar with a small gap */
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(8, 18, 26, 0.9); /* Dark, blurred background */
        -webkit-backdrop-filter: blur(8px) saturate(120%);
        backdrop-filter: blur(8px) saturate(120%);
        border-radius: 0 0 12px 12px; /* Rounded bottom corners */
        box-shadow: 0 10px 28px rgba(8, 18, 26, 0.55);
        padding: 1rem;
        z-index: 1000;
        
        /* Animation */
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
        transform-origin: top center;
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }

    .nav-links-container.is-active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .nav-links-container .floating-nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: flex-end; /* Align items to the right */
        gap: 0.5rem; /* Space between links */
    }

    .nav-links-container .floating-nav-item {
        padding: 0.75rem 1rem;
        color: var(--text-light); /* White text for contrast */
        font-size: 1.2rem;
        font-weight: 700;
        width: 100%;
        text-align: right; /* Align text to the right */
        border-radius: 8px;
    }

    .nav-links-container .floating-nav-item:hover {
        background: transparent;
        color: var(--ARANCIOTEAM);
    }

    .nav-links-container .nav-socials {
        display: flex;
        justify-content: flex-end; /* Align social icons to the right */
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-left:auto;
    }
}



.boat-render-container canvas {
    width: 100% !important;
    height: 100% !important;
}

#preloader {
  position: fixed;
  inset: 0;
  background-color: var(--navy); /* Ho messo nero perché le tue curve sono bianche (#fff) */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease-out;
  opacity: 1;
}



.loader-wrapper {
  width: 80px; /* Regola la grandezza del logo */
}

.curva {
  fill: #ffffff; 
  opacity: 0;
  animation: fadeSequence 1.6s infinite;
}

/* Ritardi per la comparsa in successione */
.curva-1 { animation-delay: 0.0s; }
.curva-2 { animation-delay: 0.1s; }
.curva-3 { animation-delay: 0.2s; }
.curva-4 { animation-delay: 0.3s; }

@keyframes fadeSequence {
  0%, 10% { opacity: 0; transform: translateY(5px); }
  30%, 70% { opacity: 1; transform: translateY(0); }
  90%, 100% { opacity: 0; }
}

/* Sponsor Page Styles */
.sponsor-section {
    padding-top: 120px;
    opacity: 1;
    transform: translateY(0);
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.sponsor-card {
    position: relative;
    background-color: transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-card.has-photo .sponsor-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.5);
    transition: filter 0.3s ease;
}

.sponsor-card .sponsor-logo {
    position: relative;
    z-index: 2;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.sponsor-card:hover .sponsor-logo,
.sponsor-card.is-active .sponsor-logo {
    opacity: 0.1;
}

.sponsor-card.has-photo:hover .sponsor-photo,
.sponsor-card.has-photo.is-active .sponsor-photo {
    filter: brightness(0.2);
}

.sponsor-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(8, 18, 26, 0.9);
    color: var(--text-light);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.sponsor-card:hover .sponsor-card-overlay,
.sponsor-card.is-active .sponsor-card-overlay {
    opacity: 1;
}

.sponsor-card-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--ARANCIOTEAM);
}

.sponsor-card-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sponsor-card-overlay .button {
    background-color: var(--ARANCIOTEAM);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.sponsor-card-overlay .button:hover {
    background-color: var(--orange-hover);
}

@media (max-width: 600px) {
    .sponsor-grid {
        grid-template-columns: 1fr;
    }
}

.sponsor-carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
}