/* ==========================================================================
   DROP C - STYLE2.CSS (HUB / PORTALE LAYOUT & WEB APP MATCHING)
   ========================================================================== */

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

:root {
    --app-bg: #080808;
    --bg-main: #1e1e1e;
    --bg-card: #2a2a29;
    --bg-input: #333333;
    --bg-nav: rgba(21, 21, 21, 0.95);
    --accent-orange: #e0701b;
    --accent-dark: #c05d12;
    --accent-glow: rgba(224, 112, 27, 0.4);
    --text-main: #ecf0f1;
    --text-muted: #aaaaaa;
    --border-main: #3a3a3a;
    --success-color: #27ae60;
    --pattern-color: rgba(255, 255, 255, 0.012);
}

html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--app-bg);
    color: var(--text-main);
    line-height: 1.5;
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

.text-center { 
    text-align: center; 
}

/* TEXTURE BUGNATA ACOUSTIC PATTERN */
body, .hub-section {
    background-color: var(--bg-main);
    background-image: 
        linear-gradient(135deg, var(--pattern-color) 25%, transparent 25%),
        linear-gradient(225deg, var(--pattern-color) 25%, transparent 25%),
        linear-gradient(315deg, var(--pattern-color) 25%, transparent 25%),
        linear-gradient(45deg, var(--pattern-color) 25%, transparent 25%);
    background-size: 16px 16px;
    background-position: -8px 0, -8px 0, 0 0, 0 0;
}

/* HEADER COMPATTO */
.hub-header {
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo-link img {
    display: block;
}

.btn-app-fast {
    background: var(--accent-orange);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px var(--accent-glow);
    transition: background 0.2s ease;
}

.btn-app-fast:hover {
    background-color: var(--accent-dark);
}

.btn-back-home {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-main);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.btn-back-home:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* HERO COMPATTA */
.hub-hero {
    padding: 60px 0 50px;
    border-bottom: 1px solid var(--border-main);
}

.hub-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.hub-hero p { 
    color: var(--text-muted); 
    font-size: 1rem; 
}

/* HUB MAIN & GRID (I 4 PULSANTONI) */
.hub-main { 
    margin-top: -30px; 
    margin-bottom: 60px; 
    position: relative;
    z-index: 10;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.hub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 16px;
    padding: 35px 20px 25px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.hub-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-orange);
    box-shadow: 0 12px 30px rgba(224, 112, 27, 0.25);
}

.primary-card {
    background: linear-gradient(135deg, var(--bg-card) 60%, rgba(224, 112, 27, 0.22) 100%);
    border-color: var(--accent-orange);
}

.hub-card-icon { 
    font-size: 2.6rem; 
    margin-bottom: 15px; 
}

.hub-card h3 { 
    font-size: 1.25rem; 
    font-weight: 800; 
    margin-bottom: 8px; 
    color: #ffffff; 
}

.hub-card p { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    line-height: 1.4;
}

.card-arrow { 
    margin-top: 18px; 
    font-weight: 800; 
    color: var(--accent-orange); 
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.hub-card:hover .card-arrow {
    transform: translateX(4px);
}

/* SEZIONE DETTAGLIO SALE (MINI CARDS) */
.hub-section { 
    padding: 60px 0; 
    border-top: 1px solid var(--border-main); 
}

.hub-section h2 { 
    margin-bottom: 35px; 
    font-size: 1.8rem;
    font-weight: 800; 
    color: var(--accent-orange); 
    letter-spacing: 1px;
}

.sale-compact-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sale-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 14px;
    display: flex;
    overflow: hidden;
    align-items: center;
    transition: border-color 0.2s ease;
}

.sale-mini-card:hover {
    border-color: var(--accent-orange);
}

.sale-mini-card img { 
    width: 140px; 
    height: 100px; 
    object-fit: cover; 
    flex-shrink: 0;
}

.mini-info { 
    padding: 18px 22px; 
}

.mini-info h4 { 
    font-size: 1.1rem; 
    color: #ffffff; 
    margin-bottom: 6px; 
    font-weight: 700;
}

.mini-info p { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}

.special-border { 
    border: 1px solid var(--accent-orange); 
    background: linear-gradient(90deg, var(--bg-card) 70%, rgba(224, 112, 27, 0.1) 100%);
}

/* REGOLAMENTO & TARIFFE EXTENSION */
.regolamento-block {
    margin-bottom: 40px;
}

.regolamento-block h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-main);
    padding-bottom: 10px;
}

.info-grid, .rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.info-box, .rule-box {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 20px;
}

.info-box h4, .rule-box h4 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.info-box p, .rule-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.highlight-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 8px;
}

.warning-box {
    border-left: 4px solid var(--accent-orange);
}

.warning-box h4 {
    color: var(--accent-orange);
}

/* ==========================================================================
   TUTORIAL VIDEO SECTION & MODAL
   ========================================================================== */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tutorial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tutorial-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Rapporto perfetto 16:9 */
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 12px;
    display: block;
}

.tutorial-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tutorial-thumb:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* PULSANTE PLAY ARANCIONE AL CENTRO (No SVG = Zero Bug su Chrome) */
.play-btn-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    pointer-events: none; /* Il tocco passa attraverso per attivare il video */
    z-index: 5;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Il triangolino bianco del Play disegnato col CSS */
.play-btn-circle::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 5px; /* Lo allinea perfettamente al centro del cerchio */
}

.tutorial-thumb:hover .play-btn-circle {
    transform: translate(-50%, -50%) scale(1.1);
}

.tutorial-card h4 {
    font-size: 1.05rem;
    color: #fff;
    margin: 0 0 6px 0;
}

.tutorial-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.btn-tutorial {
    background: var(--bg-input);
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.2s ease;
    display: block;
}

.btn-tutorial:hover {
    background: var(--accent-orange);
    color: #fff;
}

/* ====== MODAL VIDEO POPUP ====== */
.video-modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999; 
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: #000;
    border-radius: 12px;
    border: 1px solid var(--border-main);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
}

.video-modal-close {
    position: absolute;
    top: -15px;
    right: -5px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-main);
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: translate(-10px, 25px); 
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* STUDIO PAGE & MODAL EXTENSIONS */
.studio-feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.studio-feature-block.reverse {
    direction: rtl;
}

.studio-feature-block.reverse .studio-text {
    direction: ltr;
}

.studio-img img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-bullets {
    list-style: none;
    margin-top: 20px;
}

.feature-bullets li {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bullet-check {
    color: var(--accent-orange);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.gear-cta-box {
    background: var(--bg-card);
    border: 1px solid var(--accent-orange);
    padding: 35px 20px;
    border-radius: 16px;
    margin-top: 40px;
}

.studio-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.studio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.studio-btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-dark));
    color: #ffffff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.studio-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(224, 112, 27, 0.6);
}

.studio-btn-gear {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-main);
    backdrop-filter: blur(10px);
}

.studio-btn-gear:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.studio-btn-wa-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25D366;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.studio-btn-wa-modal:hover {
    background-color: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
}

.studio-btn-cta-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-dark));
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.studio-btn-cta-gear:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 112, 27, 0.6);
}

/* SPOTIFY EMBED CONTAINER */
.spotify-portfolio-block {
    margin: 60px 0;
    padding: 30px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 16px;
}

.spotify-iframe-wrapper {
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border-radius: 16px;
    overflow: hidden;
}

/* MODAL POPUP STYLES (GEAR MODAL) */
.gear-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gear-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
}

.gear-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-main);
}

.gear-modal-header h3 {
    font-size: 1.1rem;
    color: var(--accent-orange);
}

.gear-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

.gear-modal-body {
    padding: 25px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.gear-category h4 {
    color: var(--accent-orange);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-main);
    padding-bottom: 4px;
}

.gear-category ul {
    list-style: none;
}

.gear-category li {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.gear-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-main);
    background: var(--bg-main);
    text-align: center;
}

/* FOOTER MINIMALE */
footer { 
    background: #000000; 
    padding: 40px 0 25px; 
    border-top: 1px solid var(--border-main); 
    font-size: 0.9rem; 
}

footer p {
    margin-bottom: 8px;
    color: var(--text-muted);
}

footer a { 
    color: var(--text-main); 
    text-decoration: underline; 
}

footer a:hover {
    color: var(--accent-orange);
}

.copyright { 
    margin-top: 25px; 
    color: #555555; 
    font-size: 0.8rem; 
}

/* TASTO FLUTTUANTE PRENOTAZIONI */
.app-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--accent-orange);
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 6px 20px var(--accent-glow);
    font-size: 0.85rem;
    z-index: 999;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.app-float:hover {
    transform: scale(1.05);
    background-color: var(--accent-dark);
}

/* MOBILE RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .hub-hero h1 { 
        font-size: 1.7rem; 
    }
    
    .hub-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .hub-card {
        padding: 20px 12px;
    }

    .hub-card-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .hub-card h3 {
        font-size: 1rem;
    }

    .hub-card p {
        font-size: 0.75rem;
    }

    .sale-mini-card { 
        flex-direction: column; 
        text-align: center; 
    }

    .sale-mini-card img { 
        width: 100%; 
        height: 150px; 
    }
    
    .mini-info {
        padding: 15px;
    }

    .info-grid, .rules-grid {
        grid-template-columns: 1fr;
    }

    .studio-feature-block, .studio-feature-block.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        margin-bottom: 40px;
        gap: 25px;
    }

    .gear-modal-body {
        grid-template-columns: 1fr;
    }

    .gear-cta-box {
        padding: 30px 20px;
        margin-top: 30px;
    }

    .studio-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .studio-btn {
        width: 100%;
    }
}