/* RESET E VARIABILI GENERALI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ktm-orange: #FF6600;
    --cfmoto-blue: #0088CC;
    --ktm-black: #111111;
    --ktm-dark-gray: #1E1E1E;
    --ktm-light-gray: #F4F4F4;
    --ktm-white: #FFFFFF;
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--ktm-black);
    color: var(--ktm-white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER & LOGO */
.main-header {
    background-color: rgba(17, 17, 17, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--ktm-orange);
    overflow: visible;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
    filter: drop-shadow(0px 0px 3px rgba(255, 255, 255, 0.85));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.03);
}

/* MENU NAVIGAZIONE */
.main-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-right: 230px; /* Spazio riservato ai due loghi a destra */
}

.main-nav a {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}

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

.nav-highlight {
    background-color: var(--ktm-orange);
    color: var(--ktm-black) !important;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

.nav-highlight:hover {
    background-color: var(--ktm-white);
}

/* MARCHI NELL'HEADER (KTM + CFMOTO) */
.header-brands-badges {
    position: absolute;
    right: 0;
    top: 0;
    height: 75px;
    z-index: 999;
    display: flex;
    align-items: center;
    background-color: var(--ktm-black);
}

.brand-badge-link {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Badge KTM */
.ktm-badge-img {
    height: 75px !important;
    width: auto !important;
    max-height: 75px !important;
    border-radius: 0 !important;
    border-left: 2px solid var(--ktm-orange);
    border-bottom: 2px solid var(--ktm-orange);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.6);
    display: block;
    cursor: pointer;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.ktm-badge-img:hover {
    filter: brightness(1.1);
}

/* Badge CFMOTO */
.cfmoto-badge-img {
    height: 75px !important;
    width: auto !important;
    max-height: 75px !important;
    padding: 5px 8px;
    background-color: var(--cfmoto-blue);
    border-left: 1px solid #005588;
    border-bottom: 2px solid var(--cfmoto-blue);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.6);
    display: block;
    cursor: pointer;
    object-fit: contain;
    filter: none !important;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cfmoto-badge-img:hover {
    background-color: #0077b3;
    transform: scale(1.02);
}

/* Logo KTM PowerParts */
.powerparts-logo-img {
    height: 36px;
    width: auto;
    max-width: 230px;
    object-fit: contain;
    display: block;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.powerparts-logo-img:hover {
    transform: scale(1.03);
}

/* HERO SECTION */
.hero {
    position: relative;
    background: linear-gradient(180deg, rgba(17,17,17,0.6) 0%, rgba(17,17,17,0.95) 100%), 
                url('images/hero-bg.jpg') center/cover no-repeat;
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 550px;
}

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

.hero-dealer-badge {
    margin-bottom: 0px;
}

.dealer-banner-img {
    max-width: 480px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0px 4px 12px rgba(0,0,0,0.8));
}

/* BADGE 10° ANNIVERSARIO */
.hero-anniversary-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: -10px auto 25px auto;
}

.hero-anniversary-img {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: invert(1) hue-rotate(180deg) drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.9));
    transition: transform 0.3s ease;
}

.hero-anniversary-box:hover .hero-anniversary-img {
    transform: scale(1.05);
}

.hero-anniversary-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ktm-white);
    letter-spacing: 3px;
    margin-top: -4px;
    text-shadow: 0px 2px 6px rgba(0, 0, 0, 0.9);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #DDDDDD;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* BOTTONI KTM */
.btn-ktm {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    padding: 10px 25px;
    letter-spacing: 1px;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 700;
    border-radius: 3px;
}

.btn-orange {
    background-color: var(--ktm-orange);
    color: var(--ktm-black);
}

.btn-orange:hover {
    background-color: var(--ktm-white);
    color: var(--ktm-black);
}

.btn-outline {
    border-color: var(--ktm-white);
    color: var(--ktm-white);
}

.btn-outline:hover {
    border-color: var(--ktm-orange);
    color: var(--ktm-orange);
}

.btn-black {
    background-color: var(--ktm-black);
    color: var(--ktm-orange);
    border: 2px solid var(--ktm-orange);
}

.btn-black:hover {
    background-color: var(--ktm-orange);
    color: var(--ktm-black);
}

/* BANNER STORE MOTO.IT */
.store-banner {
    background-color: var(--ktm-orange);
    color: var(--ktm-black);
    padding: 40px 0;
}

.store-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.store-info h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.store-info p {
    font-weight: 500;
}

/* GAMMA SECTIONS & BRAND LOGOS NEI TITOLI */
.gamma-section {
    padding: 80px 0;
    background-color: var(--ktm-dark-gray);
}

.gamma-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.section-title span {
    color: var(--ktm-white);
}

/* Stile Base per i Loghi nei Titoli */
.brand-title-logo {
    height: 55px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.brand-title-logo:hover {
    transform: scale(1.03);
}

/* Logo KTM inline nel Titolo */
.ktm-inline-logo {
    height: 50px;
    border-radius: 4px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

/* Logo CFMOTO inline nel Titolo (INGRANDITO) */
.cfmoto-title-logo {
    height: 90px;
    filter: brightness(0) invert(1) drop-shadow(0px 2px 8px rgba(0, 136, 204, 0.4));
}

.section-subtitle {
    text-align: center;
    color: #AAA;
    margin-top: 10px;
}

.gamma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.gamma-card {
    background-color: var(--ktm-black);
    padding: 30px;
    border-left: 4px solid var(--ktm-orange);
    transition: transform 0.3s ease;
}

.gamma-card:hover {
    transform: translateY(-5px);
}

.card-tag {
    color: var(--ktm-orange);
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.gamma-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.gamma-card p {
    color: #CCC;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.card-link {
    color: var(--ktm-orange);
    font-weight: bold;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
}

/* SEZIONE GAMMA CFMOTO */
.cfmoto-section {
    padding: 80px 0;
    background-color: #16181A;
    border-top: 1px solid #282828;
}

.cfmoto-card {
    border-left-color: var(--cfmoto-blue);
}

.cfmoto-tag, .cfmoto-link {
    color: var(--cfmoto-blue);
}

/* ACCESSORI & POWERWEAR SECTION */
.accessori-section {
    padding: 70px 0;
    background-color: var(--ktm-black);
    border-top: 1px solid #222;
}

.accessori-banner-box {
    background-color: var(--ktm-dark-gray);
    border: 2px solid var(--ktm-orange);
    border-radius: 6px;
    padding: 45px 30px;
    text-align: center;
    position: relative;
}

/* OFFICINA SECTION */
.officina-section {
    padding: 80px 0;
    background-color: var(--ktm-black);
    border-top: 1px solid #333;
}

.officina-text h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.officina-text h2 span {
    color: var(--ktm-orange);
}

.check-list {
    list-style: none;
    margin: 25px 0;
}

.check-list li {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.check-list i {
    color: var(--ktm-orange);
    margin-right: 10px;
}

/* STILI GALLERIA OFFICINA */
.officina-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.officina-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.officina-img-box {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5);
    height: 180px;
}

.officina-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.9);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.officina-img-box:hover .officina-thumb {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* FOOTER STILI */
footer {
    background-color: #0A0A0A;
    border-top: 3px solid var(--ktm-orange);
    padding-top: 60px;
    width: 100%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo-img {
    max-width: 240px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0px 0px 2px rgba(255, 255, 255, 0.8));
    margin-bottom: 15px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ktm-orange);
    margin-bottom: 15px;
    letter-spacing: 1px;
    width: 100%;
    display: block;
}

.footer-col p {
    margin-bottom: 10px;
    color: #AAA;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--ktm-orange);
}

/* STILI ICONE SOCIAL FOOTER */
.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--ktm-white);
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon svg {
    width: 100%;
    height: 100%;
}

.social-icon:hover {
    color: var(--ktm-orange);
    transform: translateY(-3px);
}

/* FOOTER BOTTOM & COPYRIGHT */
.footer-bottom {
    background-color: #000;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #222;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* MEDIA QUERIES RESPONSIVE */
@media (max-width: 1200px) {
    .main-nav {
        gap: 10px;
        margin-right: 210px;
    }
    .main-nav a {
        font-size: 0.82rem;
    }
}

@media (max-width: 1024px) {
    .main-nav {
        gap: 12px;
        margin-right: 180px;
    }
    .main-nav a {
        font-size: 0.85rem;
    }
    .ktm-badge-img, .cfmoto-badge-img {
        height: 60px !important;
        max-height: 60px !important;
    }
    .header-container, .header-brands-badges {
        height: 60px;
    }
}

@media (max-width: 880px) {
    .main-header {
        position: relative;
    }
    .header-container {
        height: auto;
        flex-direction: column;
        align-items: center;
        padding: 12px 10px;
    }
    .main-nav {
        margin-right: 0 !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 12px;
        margin-top: 15px;
        width: 100%;
    }
    .header-brands-badges {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        height: 45px !important;
    }
    .ktm-badge-img {
        height: 45px !important;
        max-height: 45px !important;
        border-left: 1px solid var(--ktm-orange);
        border-bottom: 1px solid var(--ktm-orange);
    }
    .cfmoto-badge-img {
        height: 45px !important;
        max-height: 45px !important;
        padding: 3px 5px;
        border-bottom: 1px solid var(--cfmoto-blue);
    }
    .officina-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .dealer-banner-img {
        max-width: 320px;
    }
    .hero-anniversary-img {
        height: 55px;
    }
    .hero-anniversary-text {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }
    .hero-anniversary-box {
        margin: -5px auto 20px auto;
    }
    .powerparts-logo-img {
        height: 22px;
        max-width: 140px;
    }
    .store-flex {
        text-align: center;
        justify-content: center;
    }
    .section-title {
        font-size: 2.2rem;
        gap: 10px;
    }
    .ktm-inline-logo {
        height: 38px;
    }
    .cfmoto-title-logo {
        height: 55px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .officina-gallery {
        grid-template-columns: 1fr;
    }
    .officina-img-box {
        height: 200px;
    }
}