/* --- VARIABLES & RESET --- */
:root {
    --bg: #050507;
    --surface: #0e0e10;
    --surface-hover: #161618;
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f5f5f7;
    --text-muted: #86868b;
    --accent: #ffffff;
    --success: #10b981;
    /* Verde per l'offerta */
    --font: 'Inter', sans-serif;
    --ease-apple: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font);
    overflow-x: hidden;
}

/* --- NAVBAR (FIXED DOT) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 80px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

/* Menu Container */
.menu {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.menu a:hover,
.menu a.active {
    color: var(--text-main);
}

.menu a.active::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--text-main);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: dotFadeIn 0.3s ease-out forwards;
}

@keyframes dotFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 5px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.cta-button {
    background: var(--accent);
    color: var(--bg) !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: opacity 0.3s;
    height: auto !important;
    display: inline-block !important;
}

.cta-button:hover {
    opacity: 0.9;
}

/* --- HERO --- */
.pricing-hero {
    text-align: center;
    padding: 10rem 1rem 3rem;
    /* Ridotto il padding bottom per far spazio alla sezione prezzi */
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* --- SWITCHER (PILL) --- */
.switcher-container {
    display: flex;
    justify-content: center;
}

.switcher-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 4px;
    position: relative;
    display: flex;
    border: 1px solid var(--border);
}

.switcher-pill {
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    width: 50%;
    background: var(--surface-hover);
    border-radius: 25px;
    z-index: 1;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s var(--ease-apple);
}

.switcher-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 30px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.switcher-btn.active {
    color: var(--text-main);
}

/* --- VALUE HIGHLIGHT SECTION (NUOVA SEZIONE) --- */
.value-highlight {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 0;
    /* Spazio sopra e sotto */
    margin-bottom: 2rem;
}

.value-badge {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: rgba(16, 185, 129, 0.08);
    /* Tinta verde molto leggera */
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem 2rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
    transition: transform 0.3s ease;
    max-width: 90%;
}

.value-badge:hover {
    transform: scale(1.02);
    border-color: rgba(16, 185, 129, 0.4);
}

.pulse-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: softPulse 2s infinite;
}

@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.value-text h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--success);
    margin-bottom: 2px;
}

.value-text p {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

.value-text .highlight {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(16, 185, 129, 0.5);
    text-underline-offset: 3px;
}

@media (max-width: 768px) {
    .value-badge {
        flex-direction: column;
        text-align: center;
        border-radius: 20px;
        padding: 1.5rem;
    }
}

/* --- GRIDS --- */
.plans-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.plans-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}

#scp.plans-grid {
    grid-template-columns: repeat(4, 1fr);
}

.active-grid {
    animation: fadeSlideUp 0.6s var(--ease-apple) forwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CARD --- */
.premium-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.premium-card:hover::before {
    opacity: 1;
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.premium-card>* {
    position: relative;
    z-index: 1;
}

.premium-card.popular {
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), var(--surface));
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--text-main);
    color: var(--bg);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 30px;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.card-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 2rem;
}

.price-tag span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.tech-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.spec {
    display: flex;
    flex-direction: column;
}

.spec span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.spec strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.feature-list li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: #bbb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-list li:last-child {
    border: none;
}

.feature-list li::before {
    content: "•";
    color: var(--text-main);
    margin-right: 10px;
}

.buy-btn {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.buy-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.buy-btn.primary {
    background: var(--accent);
    color: var(--bg);
}

.buy-btn.primary:hover {
    background: #d4d4d4;
}

/* --- TABLE --- */
.comparison-section {
    margin-top: 8rem;
    padding-bottom: 6rem;
}

.section-header-small {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header-small h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
}

.section-header-small p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.table-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow-x: auto;
    padding-bottom: 20px;
}

.table-wrapper {
    animation: fadeSlideUp 0.6s var(--ease-apple) forwards;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1000px;
}

th {
    background: var(--surface);
    padding: 24px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    vertical-align: bottom;
    position: relative;
    transition: background 0.3s;
}

th:first-child {
    border-top-left-radius: 20px;
}

th:last-child {
    border-top-right-radius: 20px;
}

th span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
}

td {
    background: var(--surface);
    padding: 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.3s;
}

tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
}

tr:last-child td:last-child {
    border-bottom-right-radius: 20px;
}

tr:last-child td {
    border-bottom: none;
}

/* Sticky */
.feature-col {
    text-align: left;
    min-width: 180px;
    background: var(--surface);
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 1px solid var(--border);
}

td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--surface);
    border-right: 1px solid var(--border);
    font-weight: 500;
    color: var(--text-main);
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-row svg {
    color: var(--accent);
    opacity: 0.8;
    width: 18px;
    height: 18px;
}

/* Highlight */
.highlight-col {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-main) !important;
}

th.highlight-col {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    border-top: 2px solid var(--text-main);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    position: relative;
    padding-top: 34px;
}

.pop-badge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: var(--bg);
    font-size: 0.65rem;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
    white-space: nowrap;
}

.table-container:hover td.highlight-col {
    background: rgba(255, 255, 255, 0.05) !important;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- PREMIUM FOOTER --- */
.site-footer {
    background: #000;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: left;
}

.brand-col {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.brand-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1rem 0 1.5rem;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-green 2s infinite;
}

.status-text {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-muted);
    transition: 0.3s;
    background: var(--surface);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.social-links a:hover {
    color: var(--bg);
    background: var(--text-main);
    transform: translateY(-3px);
    border-color: var(--text-main);
}

.footer-links-wrapper {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--text-main);
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* MOBILE RESPONSIVE */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    position: absolute;
    left: 0;
    transition: 0.3s var(--ease-apple);
    border-radius: 2px;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    bottom: 0;
}

.hamburger.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    bottom: 9px;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(20px);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.mobile-menu.active .mobile-links {
    transform: translateY(0);
}

.mobile-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-cta {
    background: var(--accent);
    color: var(--bg) !important;
    padding: 12px 30px;
    border-radius: 30px;
}

@media (max-width: 1024px) {
    .desktop-menu {
        display: none;
    }

    .hamburger {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .plans-grid,
    #scp.plans-grid {
        grid-template-columns: 1fr;
    }

    .navbar .menu {
        display: none;
    }

    .table-container {
        width: 100vw;
        margin-left: -5%;
        padding: 0 5%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .feature-col,
    td:first-child {
        position: sticky;
        left: 0;
        z-index: 20;
        background: var(--surface);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        min-width: 140px;
    }

    th,
    td {
        padding: 15px 10px;
        font-size: 0.85rem;
    }

    th span {
        font-size: 0.75rem;
    }

    .pop-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
    }

    .footer-container {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-links-wrapper {
        gap: 2rem;
        justify-content: space-between;
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-col {
        min-width: 140px;
    }
}