/*
 * Theme Name: Stam Theme - v3
 * Description: Stam Website Template 2026 update
 * Author: citycenter.it
*/

/* Mobile Header Styles - Show below 1400px */
@media (max-width: 1399px) {

    /* Nascondi l'header desktop */
    .modern-header {
        display: none;
    }

    /* Mobile Menu Overlay Styles */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .mobile-menu-overlay.active {
        right: 0;
    }

    .mobile-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-menu-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-content {
        padding: 20px;
    }

    .mobile-menu-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: transparent;
        border: none;
        font-size: 28px;
        color: #333;
        cursor: pointer;
        z-index: 10;
        padding: 5px 10px;
    }

    .mobile-menu-header {
        text-align: center;
        padding: 20px 0;
        border-bottom: 1px solid #eee;
        margin-bottom: 20px;
    }

    .mobile-logo img {
        max-height: 50px;
        width: auto;
    }

    /* Mobile Top Links */
    .mobile-top-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .mobile-top-link {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        background: #f5f5f5;
        border-radius: 4px;
        color: #333;
        text-decoration: none;
        transition: all 0.3s;
    }

    .mobile-top-link:hover {
        background: #c10a28;
        color: #fff;
    }

    .mobile-top-link i {
        margin-right: 12px;
        font-size: 18px;
        width: 20px;
        text-align: center;
    }

    /* Mobile CTA Button */
    .mobile-cta-wrapper {
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .mobile-cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 15px 20px;
        background: #c10a28;
        color: #fff;
        border-radius: 4px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s;
    }

    .mobile-cta-btn:hover {
        background: #a00820;
        color: #fff;
    }

    .mobile-cta-btn i {
        margin-right: 10px;
        font-size: 20px;
    }

    /* Mobile Menu */
    .mobile-menu-wrapper {
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-title {
        font-size: 18px;
        font-weight: 600;
        color: #333;
        margin-bottom: 15px;
        padding-left: 5px;
    }

    .mobile-nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav-item {
        border-bottom: 1px solid #eee;
    }

    .mobile-nav-link-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-nav-link {
        display: block;
        flex: 1;
        padding: 12px 10px;
        color: #333;
        text-decoration: none;
        font-weight: 500;
    }

    .submenu-toggle {
        background: transparent;
        border: none;
        padding: 12px 15px;
        color: #333;
        cursor: pointer;
        font-size: 18px;
        transition: transform 0.3s ease;
    }

    .mobile-nav-item.open .submenu-toggle {
        transform: rotate(180deg);
    }

    .mobile-submenu {
        list-style: none;
        padding: 0;
        margin: 0;
        background: #f9f9f9;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .mobile-nav-item.open .mobile-submenu {
        max-height: 1000px;
    }

    .mobile-submenu-item {
        border-bottom: 1px solid #e5e5e5;
    }

    .mobile-submenu-item:last-child {
        border-bottom: none;
    }

    .mobile-submenu-item a {
        display: block;
        padding: 10px 20px 10px 30px;
        color: #666;
        text-decoration: none;
        transition: all 0.3s;
    }

    .mobile-submenu-item a:hover {
        background: #e0e0e0;
        color: #c10a28;
    }

    /* Mobile Utilities */
    .mobile-utilities {
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .mobile-utility-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 15px;
        background: #f5f5f5;
        border: none;
        border-radius: 4px;
        color: #333;
        cursor: pointer;
        margin-bottom: 10px;
        transition: all 0.3s;
    }

    .mobile-utility-btn:hover {
        background: #e0e0e0;
    }

    .mobile-utility-btn i {
        margin-right: 12px;
        font-size: 18px;
        width: 20px;
        text-align: center;
    }

    .mobile-language-selector {
        background: #f5f5f5;
        border-radius: 4px;
        padding: 12px 15px;
    }

    .mobile-lang-label {
        display: flex;
        align-items: center;
        font-weight: 600;
        margin-bottom: 10px;
        color: #333;
    }

    .mobile-lang-label i {
        margin-right: 12px;
        font-size: 18px;
        width: 20px;
        text-align: center;
    }

    .mobile-lang-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-lang-list li {
        margin-bottom: 5px;
    }

    .mobile-lang-list li:last-child {
        margin-bottom: 0;
    }

    .mobile-lang-list li a {
        display: block;
        padding: 8px 10px;
        color: #666;
        text-decoration: none;
        border-radius: 3px;
        transition: all 0.3s;
    }

    .mobile-lang-list li.active a {
        background: #c10a28;
        color: #fff;
        font-weight: 600;
    }

    .mobile-lang-list li a:hover {
        background: #e0e0e0;
    }

    .mobile-lang-list li.active a:hover {
        background: #a00820;
    }

    /* Mobile Footer */
    .mobile-menu-footer {
        padding-top: 10px;
    }

    .mobile-phone,
    .mobile-email {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
        font-size: 15px;
    }

    .mobile-phone i,
    .mobile-email i {
        margin-right: 10px;
        color: #c10a28;
        width: 20px;
        text-align: center;
    }

    .mobile-menu-footer .mobile-phone {
        justify-content: flex-start;
        padding-left: 0 !important;
    }

    .mobile-phone a,
    .mobile-email a {
        color: #333;
        text-decoration: none;
    }

    .mobile-phone a:hover,
    .mobile-email a:hover {
        color: #c10a28;
    }

    /* Mobile Header Bar - Sticky */
    .mobile-header-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 9997;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        height: 60px;
    }

    .mobile-header-logo img {
        max-height: 40px;
        width: auto;
    }

    .mobile-header-toggle {
        background: transparent;
        border: none;
        padding: 8px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .mobile-header-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #333;
        transition: all 0.3s;
    }

    .mobile-header-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-header-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-header-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Padding per il body quando è visibile l'header mobile */
    body {
        padding-top: 60px;
    }
}

@media (min-width: 1400px) {

    /* Nascondi completamente il mobile header sopra 1400px */
    .mobile-header-bar {
        display: none !important;
    }

    .mobile-menu-overlay,
    .mobile-menu-backdrop {
        display: none !important;
    }

    body {
        padding-top: 0;
    }
}




/* ==============================================
           STILI MOBILE RESPONSIVE - HOMEPAGE
============================================= */

@media screen and (max-width: 1024px) {

    /* Hero Section */
    .hero {
        min-height: 60vh !important;
        height: auto !important;
    }

    .hero-video {
        min-height: 60vh !important;
    }

    .hero-content {
        position: relative !important;
        z-index: 2;
        padding: 30px 20px !important;
        background: rgba(0, 0, 0, 0.6);
        margin: 0 !important;
    }

    .hero-content h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .hero-content h2 {
        font-size: 18px !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }

    .hero-content h3 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }

    .hero-content .btn {
        display: block !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 20px auto 0 !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }

    /* Lines Section */
    .lines {
        padding: 30px 0 !important;
    }

    .lines .container {
        padding: 0 15px !important;
    }

    /* About Section */
    .about {
        padding: 40px 0 !important;
    }

    .about-content {
        padding: 20px 15px !important;
        margin-bottom: 30px !important;
    }

    .about-content h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    .about-content p {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }

    .about-content .btn {
        display: block !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }

    .about-video {
        margin-bottom: 20px !important;
    }

    /* Why Stam Section */
    .why-stam {
        padding: 60px 0 !important;
    }

    .why-stam h2.perchestam {
        font-size: 32px !important;
        margin-bottom: 15px !important;
    }

    .why-stam p {
        font-size: 18px !important;
        margin-bottom: 30px !important;
    }

    .why-stam .btn {
        display: inline-block !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    /* Clients Section */
    .clients {
        padding: 40px 0 !important;
    }

    .clients-content {
        padding: 0 15px !important;
        margin-bottom: 30px !important;
    }

    .clients-aftercontent {
        padding: 0 15px !important;
        margin-top: 30px !important;
    }

    /* Company Section */
    .company {
        padding: 60px 0 !important;
    }

    .company-content h2 {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }

    .company-details {
        margin-bottom: 30px !important;
    }

    .company-detail {
        margin-bottom: 20px !important;
    }

    /* Carousel Flickity Mobile Fix */
    .custom-carousel-wrapper {
        padding: 20px 0 !important;
    }

    .flickity-prev-next-button {
        width: 32px !important;
        height: 32px !important;
    }

    .flickity-prev-next-button.previous {
        left: 5px !important;
    }

    .flickity-prev-next-button.next {
        right: 5px !important;
    }

    /* General Mobile Improvements */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .row {
        margin-left: -15px !important;
        margin-right: -15px !important;
    }

    [class*="col-"] {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Embed Responsive */
    .embed-responsive {
        margin-bottom: 20px !important;
    }

}

/* Extra Small Devices */
@media screen and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 24px !important;
    }

    .hero-content {
        position: relative !important;
        left: 0 !important;
        width: 100% !important;
    }

    .lines .row {
        display: block !important;
    }

    .lines .row .lines-grid-3col,
    .lines .row .lines-grid-2col {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .lines-card h3 {
        font-size: 12px !important;
    }

    .youtube {
        height: 200px !important;
        width: 100% !important;
    }

    .hero-content h2 {
        font-size: 16px !important;
    }

    .hero-content h3 {
        font-size: 14px !important;
    }

    .about-content h2 {
        font-size: 20px !important;
    }

    .why-stam h2.perchestam {
        font-size: 28px !important;
    }

    .why-stam p {
        font-size: 16px !important;
    }
}

/* HOMEPAGE */


/* Stile per le griglie delle linee */
.lines .row {
    display: flex;
    align-items: stretch;
}

.lines .row>[class*="col-"] {
    display: flex;
}

.lines-section-wrapper {
    margin-bottom: 30px;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    height: 100%;
}

.lines-section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
    text-align: left;
}

/* Grid con 3 colonne per le linee di profilatura (con icone) */
.lines-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Grid con 2 colonne per le linee di taglio (senza icone) */
.lines-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.lines-grid-cell {
    width: 100%;
}

.lines-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 15px;
    min-height: 165px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.lines-card:hover {
    cursor: pointer;
    background: #303030;
    color: #fff;
}

.lines-card:hover * {
    color: #fff;
}

.lines-card-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
}

.lines-card-icon svg,
.lines-card-icon img {
    width: 100%;
    height: 100%;
    fill: #c10a28;
}

.lines-card:hover .lines-card-icon svg {
    fill: #fff;
}

.lines-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: capitalize;
    line-height: 1.3;
    padding-bottom: 0px;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .lines-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1024px) {

    .lines-grid-3col,
    .lines-grid-2col {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .lines-section-wrapper {
        padding: 20px;
    }

    .lines-section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .lines-card {
        padding: 12px 8px;
    }

    .lines-card-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 10px;
    }

    .product-application-icon svg, .product-application-icon img {
    margin: 15px auto;
    display: block;
    width: 60px !important;
    height: 60px !important;
}

    .lines-card h3 {
        font-size: 12px;
    }
}

/* Container principale per isolare lo stile */
.custom-carousel-wrapper {
    padding: 40px 0;
    width: 100%;
    overflow: hidden;
}

/* Definizione della cella: Fondamentale per il calcolo di Flickity */
.carousel-cell {
    width: 20%;
    /* 5 loghi su Desktop */
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

/* Card interna per il logo */
.logo-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.logo-card img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    /* Opzionale: loghi in bianco e nero */
    opacity: 0.7;
    transition: all 0.3s ease;
}

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

/* --- RESPONSIVE --- */

@media screen and (max-width: 1024px) {
    .carousel-cell {
        width: 33.33%;
    }

    /* 3 loghi su Tablet */
}

@media screen and (max-width: 1024px) {
    .carousel-cell {
        width: 50%;
    }

    /* 2 loghi su Mobile */
}

@media screen and (max-width: 1024px) {
    .carousel-cell {
        width: 70%;
    }

    /* 1 logo e mezzo per mostrare lo scorrimento */
}

/* Stile frecce personalizzato */
.flickity-prev-next-button {
    width: 40px;
    height: 40px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.flickity-prev-next-button:hover {
    background: #f8f8f8;
}

.flickity-prev-next-button.previous {
    left: 10px;
}

.flickity-prev-next-button.next {
    right: 10px;
}