/* Il font Montserrat ora si carica da index.html (più veloce dell'@import) */

:root {
    --primary-blue: #0D669E;
    --primary-dark: #00426b;
    --white: #ffffff;
    --light-gray: #f2f5f7;
    --text-dark: #000000;
    --text-light: #444444;
    --glass: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Top Bar & Language Selector */
.header-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.top-bar {
    background: transparent !important;
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
    width: 100%;
}

.top-bar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 0 5%;
}

.lang-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
}

.lang-selector .lang-visible {
    display: flex;
    gap: 10px;
}

.lang-selector .lang-visible a {
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.8;
}

.lang-selector .lang-visible a.active {
    opacity: 1;
    font-weight: 700;
}

.lang-dropdown {
    position: relative;
    cursor: pointer;
    padding-bottom: 10px; /* Bridge the gap */
    margin-bottom: -10px;
}

.lang-menu {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-dark);
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    width: 180px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-radius: 15px;
    z-index: 1100;
    border: 1px solid rgba(255,255,255,0.3);
    margin-top: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
    pointer-events: none;
}

.lang-dropdown:hover .lang-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.lang-menu a:hover {
    background: rgba(13, 102, 158, 0.1);
    color: var(--primary-blue);
}

.flag {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%; /* Circular flags */
    border: 1px solid rgba(0,0,0,0.05);
}

/* Header & Nav */
header {
    width: 100%;
    padding: 15px 5%;
    transition: var(--transition);
    color: var(--white);
    background: transparent !important;
}

header.scrolled {
    position: fixed; /* Switch to fixed for sticky behavior when scrolled */
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    color: var(--white) !important;
    z-index: 2000; /* Ensure it's on top */
}

header.scrolled .nav-links a {
    color: var(--white) !important;
}

.nav {
    display: flex;
    justify-content: flex-end; /* Align links and CTA to the right */
    align-items: center;
    width: 100%;
    max-width: none;
    padding: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Hamburger Menu Hide by default */
.nav-toggle, .nav-toggle-label {
    display: none;
}

.nav-links {
    display: flex;
    gap: 25px; /* Gap 25px as requested */
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 700;
    color: inherit; /* Use header color */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.btn-cta {
    background: linear-gradient(135deg, #0d9488 0%, var(--primary-blue) 100%);
    color: var(--white) !important;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 20px rgba(13, 102, 158, 0.3);
    animation: buttonPulse 2s infinite;
}

.btn-cta:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0d9488 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(13, 102, 158, 0.5);
    color: var(--white) !important;
}

.btn-cta svg {
    animation: phoneWiggle 1.5s infinite ease-in-out;
}

.btn-cta.shadow-btn {
    box-shadow: 0 10px 25px rgba(13, 102, 158, 0.5);
    transform: translateY(-2px);
}

.btn-cta-app {
    background: var(--text-dark);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-cta-app:hover {
    background: #000;
    transform: translateY(-2px);
}

.btn-cta-app i {
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    height: 110vh;
    background-image: linear-gradient(rgba(13, 102, 158, 0.45), rgba(9, 74, 115, 0.7)), url('../assets/hero-bg.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 100px;
}

.hero-content {
    max-width: 800px;
}

.hero-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 30px;
}

.hero-logo-text {
    font-size: 5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    letter-spacing: -2px;
}

.hero-logo-text span {
    color: #4da6ff; /* A slightly lighter blue for the 'it' to match branding if needed, or keep white */
}

.hero-logo-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-top: -5px;
    opacity: 0.9;
    color: var(--white);
}

.hero-logo-subtitle {
    color: #FFD700 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 25px;
    line-height: 1.05;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-transform: uppercase; /* Explicitly keep hero title uppercase for drama */
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 35px;
    max-width: 600px;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.hero-btns {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hero-btns a {
    height: 70px; /* Unified height */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.6rem; /* Normalized large text */
    padding: 0 40px;
    border-radius: 50px; /* Pill style */
}

.wa-btn svg {
    margin-right: -5px; /* Adjust official balloon logo spacing */
}

.btn-outline {
    border: 2px solid var(--white);
    font-weight: 700;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-5px); /* Stronger hover lift */
}

/* Glass Cards */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

.section-title p {
    color: var(--text-light);
    font-weight: 500;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    text-align: center;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

/* ════════════════════════════════════════════
   CENTRALINO AI SECTION
   ════════════════════════════════════════════ */
#centralino-ai {
    padding: 100px 0;
    background: var(--white);
}

.ai-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.ai-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ai-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ai-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
    letter-spacing: -1px;
}

.ai-title span {
    color: var(--primary-blue);
}

.ai-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    font-weight: 500;
}

.ai-features-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-feature-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.ai-feature-num {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-feature-text strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.ai-feature-text p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 2px;
}

.ai-price-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.ai-price-note strong {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.ai-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-ai-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: linear-gradient(135deg, #0d9488 0%, var(--primary-blue) 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 20px rgba(13, 102, 158, 0.3);
    animation: buttonPulse 2s infinite;
}

.btn-ai-cta:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0d9488 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(13, 102, 158, 0.5);
    color: var(--white);
}

.btn-ai-cta i {
    font-size: 1.25rem;
    animation: phoneWiggle 1.5s infinite ease-in-out;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 102, 158, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(13, 102, 158, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 102, 158, 0); }
}

@keyframes phoneWiggle {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(-15deg); }
    30% { transform: rotate(15deg); }
    45% { transform: rotate(-10deg); }
    60% { transform: rotate(10deg); }
    75% { transform: rotate(0); }
}

.ai-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-image-frame {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ai-image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 992px) {
    .ai-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .ai-title {
        font-size: 2.2rem;
    }
    .ai-visual {
        order: -1;
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .ai-title {
        font-size: 1.8rem;
    }
    .ai-btn-group {
        width: 100%;
    }
    .btn-ai-cta {
        width: 100%;
    }
}

/* Tariffs Table */
.tariffs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--light-gray);
    border-radius: 20px;
    overflow: hidden;
}

.tariffs-table th, .tariffs-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.tariffs-table th {
    background: var(--primary-blue);
    color: var(--white);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ════════════════════════════════════════════
   REVIEWS TICKER
   ════════════════════════════════════════════ */
.reviews-ticker {
    width: 100%;
    background: linear-gradient(135deg, #0a1628 0%, #0d2137 100%);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.ticker-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scrollTicker 120s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

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

.review-card {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 10px 20px;
    min-width: 340px;
    max-width: 350px;
    transition: background 0.3s ease;
}

.review-card:hover {
    background: rgba(255,255,255,0.12);
}

.ticker-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid rgba(255,255,255,0.16);
    filter: blur(3px);
}

.ticker-face {
    width: 100%;
    height: 100%;
}

/* Recensioni arrivate via WhatsApp: logo al posto della foto */
.ticker-avatar.wa {
    filter: none;
    background: #25D366;
    border-color: rgba(255,255,255,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticker-avatar.wa svg {
    width: 62%;
    height: 62%;
    fill: #ffffff;
}

.ticker-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ticker-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticker-name {
    font-weight: 700;
    font-size: 0.78rem;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.ticker-stars {
    color: #f59e0b;
    font-size: 0.7rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.ticker-text {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.4;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .reviews-ticker { padding: 6px 0; }
    .ticker-track { gap: 16px; }
    .review-card {
        min-width: 280px;
        max-width: 290px;
        padding: 8px 14px;
        gap: 10px;
        border-radius: 10px;
    }
    .ticker-avatar { width: 32px; height: 32px; border-radius: 8px; }
    .ticker-name { font-size: 0.72rem; }
    .ticker-stars { font-size: 0.65rem; }
    .ticker-text { font-size: 0.68rem; }
}

@media (max-width: 480px) {
    .reviews-ticker { padding: 5px 0; }
    .ticker-track { gap: 12px; }
    .review-card {
        min-width: 240px;
        max-width: 250px;
        padding: 7px 10px;
        gap: 8px;
        border-radius: 8px;
    }
    .ticker-avatar { width: 28px; height: 28px; border-radius: 7px; filter: blur(2.5px); }
    .ticker-name { font-size: 0.68rem; }
    .ticker-stars { font-size: 0.6rem; }
    .ticker-text { font-size: 0.64rem; }
}

/* Final Responsive Rules */
/* Hamburger Menu for Mobile */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
        cursor: pointer;
        padding: 10px;
        z-index: 2005;
        position: relative;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: var(--white);
        height: 3px;
        width: 30px;
        border-radius: 2px;
        position: relative;
        transition: var(--transition);
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .nav-toggle-label span::before { bottom: 10px; }
    .nav-toggle-label span::after { top: 10px; }

    header.scrolled .nav-toggle-label span,
    header.scrolled .nav-toggle-label span::before,
    header.scrolled .nav-toggle-label span::after {
        background: var(--white);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(0, 0, 10, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        padding: 60px 40px;
    }

    .nav-toggle:checked ~ .nav-menu {
        right: 0;
    }

    .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
    .nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(45deg); bottom: 0; }
    .nav-toggle:checked ~ .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .nav-links a {
        font-size: 1.8rem;
        font-weight: 700;
    }

    .top-bar-container {
        flex-direction: column;
        gap: 12px;
        padding: 10px;
        text-align: center;
    }

    .hero {
        padding: 120px 5% 60px;
        text-align: center;
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        align-items: center;
        margin: 0 auto;
    }

    .hero-logo {
        align-items: center;
        margin-bottom: 40px;
    }

    .hero-logo-text {
        font-size: 4rem;
    }

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

    .hero p {
        font-size: 1.2rem;
        margin: 0 auto 30px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 20px;
        align-items: stretch;
    }

    .hero-btns a {
        display: flex !important;
        width: 100% !important;
        padding: 0 20px !important;
        height: 65px !important;
        font-size: 1.4rem !important;
        margin: 0 !important;
    }
}

/* --- Calculator Widget --- */
.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border-radius: 30px;
    border: 2px solid rgba(30,58,138,0.15);
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.search-container input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 15px rgba(30,58,138,0.1);
}

.search-container .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: none;
}

.search-results li {
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    color: var(--text-dark);
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results li:hover {
    background: rgba(30,58,138,0.05);
    color: var(--primary-blue);
}

.calculator-result {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: 25px;
    padding: 20px 25px;
    border-radius: 15px;
    background: rgba(30,58,138,0.05);
    border: 1px solid rgba(30,58,138,0.1);
    animation: fadeIn 0.3s ease-in-out;
}

.calculator-result .price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
}

@media (max-width: 500px) {
    .calculator-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .calculator-result > div:last-child {
        text-align: left;
    }
}

/* ════════════════════════════════════════════
   APP INTERACTIVE SECTION
   ════════════════════════════════════════════ */

.app-interactive-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ── Tab buttons ── */
.app-tabs {
    display: flex;
    gap: 8px;
    background: rgba(13, 102, 158, 0.08);
    padding: 6px;
    border-radius: 50px;
    width: 100%;
    max-width: 360px;
}

.app-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 50px;
    border: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.app-tab i { font-size: 0.9rem; }

.app-tab.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(13, 102, 158, 0.35);
}

.app-tab:hover:not(.active) {
    background: rgba(13, 102, 158, 0.12);
}

/* ── Phone frame ── */
.phone-mockup {
    position: relative;
    width: 270px;
    height: 560px;
    background: #1a1a2e;
    border-radius: 44px;
    padding: 14px;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255,255,255,0.08),
        inset 0 0 0 2px rgba(255,255,255,0.06);
    flex-shrink: 0;
}

/* Notch */
.phone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #1a1a2e;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

/* ── Tab content panels ── */
.tab-content {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.tab-content.active {
    display: flex;
}

/* ── Screen slider ── */
.screen-slider {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0; /* important for flex children */
}

.mock-screen {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mock-screen.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.mock-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* ── Dot indicators ── */
.screen-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: white;
    flex-shrink: 0;
}

.screen-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen-dots .dot.active {
    background: var(--primary-blue);
    width: 22px;
    border-radius: 4px;
}

.screen-dots .dot:hover:not(.active) {
    background: #9ca3af;
    transform: scale(1.2);
}


/* ════════════════════════════════════════════
   RESPONSIVE — App Interactive Section
   ════════════════════════════════════════════ */

/* Tablet: riduco leggermente il telefono */
@media (max-width: 1024px) {
    .phone-mockup {
        width: 240px;
        height: 500px;
    }
}

/* Mobile ≤ 768px: layout verticale, tutto centrato */
@media (max-width: 768px) {
    /* La sezione #app passa a colonna singola */
    #app .services-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    /* Il wrapper interattivo si allarga */
    .app-interactive-wrapper {
        width: 100%;
        order: 2; /* testo sopra, phone sotto su mobile */
    }

    /* Il div del testo va sopra */
    #app .services-grid > div:last-child {
        order: 1;
    }

    /* Tab a testo piccolo su schermi stretti */
    .app-tab {
        font-size: 0.75rem;
        padding: 10px 10px;
        gap: 5px;
    }

    .app-tab i { display: none; } /* nasconde icona per risparmiare spazio */

    /* Phone leggermente più grande su mobile (più visibile) */
    .phone-mockup {
        width: 260px;
        height: 536px;
    }
}

/* Mobile piccolo ≤ 500px */
@media (max-width: 500px) {
    .app-tabs {
        max-width: 100%;
        flex-direction: row; /* mantieni su riga, non colonna */
    }

    .app-tab {
        font-size: 0.7rem;
        padding: 9px 8px;
    }

    .phone-mockup {
        width: 240px;
        height: 496px;
    }
}

/* ════════════════════════════════════════════
   APP FEATURES SECTION
   ════════════════════════════════════════════ */
#app-features {
    padding: 80px 0;
    overflow: hidden;
    background: var(--light-gray);
}

#app-features .features-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

#app-features .features-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

#app-features .features-center {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 10;
}

#app-features .floating-phones {
    max-width: 100%;
    height: auto;
    animation: floatPhones 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

@keyframes floatPhones {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

#app-features .feature-item {
    text-align: center;
}

#app-features .features-left .feature-item { text-align: right; }
#app-features .features-right .feature-item { text-align: left; }

#app-features .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50px;
    padding: 10px 25px;
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 8px 20px rgba(13, 102, 158, 0.3);
}

#app-features .feature-icon i {
    margin: 0 10px;
}

#app-features .step-num {
    font-weight: 800;
    font-size: 1.8rem;
    margin: 0 10px;
}

#app-features .feature-item h3 {
    color: var(--primary-blue);
    font-size: 1.4rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#app-features .feature-item p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mobile responsive */
@media (max-width: 992px) {
    #app-features .features-grid {
        flex-direction: column;
    }
    #app-features .features-left .feature-item, 
    #app-features .features-right .feature-item {
        text-align: center;
    }
    #app-features .features-center {
        order: -1;
        margin-bottom: 40px;
    }
    #app-features .floating-phones {
        max-width: 80%;
    }
}
