/* =========================================================================
   Cartomanti.click – stile del sito (grafica originale invariata)
   ========================================================================= */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    background-color: #0d9488;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 15 L43 37 L65 40 L43 43 L40 65 L37 43 L15 40 L37 37 Z' fill='%23ffffff' fill-opacity='0.08'/%3E%3C/svg%3E");
    background-attachment: fixed;
    color: #334155;
    display: flex;
    justify-content: center;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img { max-width: 100%; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #0f172a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible {
    outline: 3px solid #f97316;
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: 1000px;
    background-color: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ---------- Header ---------- */
.header {
    text-align: center;
    padding: 6rem 2rem 5rem 2rem;
    background-color: #0f172a;
    background-image: linear-gradient(to bottom, rgba(13, 148, 136, 0.85), rgba(15, 23, 42, 0.95));
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid #f97316;
    color: white;
    position: relative;
}

.header-icon {
    font-size: 3rem;
    color: #fbd38d;
    margin-bottom: 10px;
    display: inline-block;
    animation: float-moon 4s ease-in-out infinite;
}

@keyframes float-moon {
    0% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(-5deg); }
}

.header h1 {
    margin: 0;
    font-weight: normal;
}

.header .h1-brand {
    display: block;
    color: #ffffff;
    font-size: 3.8rem;
    line-height: 1.15;
    margin: 0 0 10px 0;
    font-family: 'Georgia', serif;
    font-weight: normal;
    overflow-wrap: anywhere;
}

.header .h1-tagline {
    display: block;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
    color: #ccfbf1;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

.header-promo {
    margin-top: 30px;
    display: inline-flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    padding: 15px 40px;
    border-radius: 8px;
    border-left: 5px solid #f97316;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-promo:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-2px);
}

.header-promo .promo-price {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.header-promo .phone-number {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fef08a;
    letter-spacing: 1px;
    line-height: 1.1;
}

/* Header compatto (pagine legali) */
.header--compact { padding: 2.2rem 1.5rem 2rem; }
.header--compact h1 {
    color: #ffffff;
    font-family: 'Georgia', serif;
    font-size: 2.3rem;
    line-height: 1.2;
    margin: 10px 0 0;
}
.header-home {
    color: #ccfbf1;
    text-decoration: none;
    font-size: .95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}
.header-home:hover { color: #ffffff; text-decoration: underline; }

/* ---------- Contenuto ---------- */
.main-content {
    padding: 3rem 2rem;
    text-align: center;
    flex-grow: 1;
}

.main-content h2 {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 1.2rem;
}

.subtitle {
    font-size: 1.15rem;
    max-width: 750px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.8;
    color: #475569;
}

.cta-container { margin: 1rem 0 3rem 0; }

.cta-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 1.2rem 3.5rem;
    border-radius: 50px;
    font-size: 2.2rem;
    font-weight: bold;
    box-shadow: 0 10px 25px rgba(234, 88, 12, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    animation: pulse-button-ripple 2s infinite;
}

@keyframes pulse-button-ripple {
    0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(234, 88, 12, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

.cta-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    animation: none;
    box-shadow: 0 15px 35px rgba(234, 88, 12, 0.4);
}

.cta-button .offer-highlight {
    background-color: #ffffff;
    color: #c2410c;
    padding: 5px 20px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 12px;
    margin-bottom: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    letter-spacing: 1px;
    text-shadow: none;
}

.cta-button .small-text {
    font-size: 1.1rem;
    font-weight: normal;
    margin-top: 8px;
    opacity: 0.95;
}

.orari {
    margin-top: 15px;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

/* ---------- Cartomanti in diretta ---------- */
.status-section {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 2.5rem;
    margin: 2rem auto 4rem auto;
    border: 2px solid #e2e8f0;
    max-width: 950px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.main-content .status-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0f766e;
    margin: 0 0 2rem 0;
    font-family: 'Georgia', serif;
    text-align: center;
}

#ajax-cartomanti-wrapper { min-height: 50px; }

#ajax-cartomanti-wrapper::after,
#ajax-cartomanti-wrapper .cartomantiContainer::after,
#ajax-cartomanti-wrapper #statoCartomanti::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

#ajax-cartomanti-wrapper .cartomantiContainer,
#ajax-cartomanti-wrapper #statoCartomanti {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#ajax-cartomanti-wrapper .cartomanti {
    float: left !important;
    display: flex !important;
    align-items: center !important;
    width: 23.5% !important;
    height: 50px !important;
    margin-bottom: 2% !important;
    margin-right: 2% !important;
    padding: 0 12px !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.2s ease !important;
}

#ajax-cartomanti-wrapper .cartomanti:nth-child(4n) {
    margin-right: 0 !important;
}

#ajax-cartomanti-wrapper .cartomanti:hover {
    border-color: #0d9488 !important;
    box-shadow: 0 4px 8px rgba(13, 148, 136, 0.15) !important;
    transform: translateY(-2px) !important;
}

#ajax-cartomanti-wrapper .cartomanti img:not(.activity) {
    display: none !important;
}

#ajax-cartomanti-wrapper .cartomanti img.activity {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    border-radius: 50% !important;
    margin-right: 10px !important;
    content: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') !important;
    background-color: #94a3b8 !important;
}

#ajax-cartomanti-wrapper .cartomanti img.activity.online { background-color: #10b981 !important; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6) !important; }
#ajax-cartomanti-wrapper .cartomanti img.activity.occupato { background-color: #ef4444 !important; }
#ajax-cartomanti-wrapper .cartomanti img.activity.offline { background-color: #94a3b8 !important; }

#ajax-cartomanti-wrapper .cartomanti img.activity.assente,
#ajax-cartomanti-wrapper .cartomanti img.activity.assent {
    background-color: #f59e0b !important;
}

#ajax-cartomanti-wrapper .cartomanti img.activity.squillo {
    background-color: #8b0000 !important;
    animation: squillo-pulse-status 1.2s infinite !important;
}

@keyframes squillo-pulse-status {
    0% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.8); }
    70% { box-shadow: 0 0 0 8px rgba(139, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0); }
}

#ajax-cartomanti-wrapper .cartomantiNome {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .85rem;
    color: #475569;
}
.status-legend li { display: inline-flex; align-items: center; gap: 6px; }
.status-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--online { background: #10b981; }
.dot--occupato { background: #ef4444; }
.dot--assente { background: #f59e0b; }
.dot--offline { background: #94a3b8; }

/* ---------- Banner promozionali ---------- */
.banners-section {
    margin: 3rem auto;
    max-width: 800px;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
}

.banners-title {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.image-banner {
    display: block;
    width: 100%;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f8fafc;
    position: relative;
    transition: transform 0.4s ease;
    background-color: #e2e8f0;
}

.image-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.image-banner:hover { transform: translateY(-4px); }
.image-banner:hover img { transform: scale(1.03); }

/* ---------- Punti di forza ---------- */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 3rem;
}

.feature-box {
    flex: 1 1 220px;
    text-align: center;
    background: #f8fafc;
    padding: 30px 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.feature-icon {
    color: #0d9488;
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.feature-box h3 {
    color: #1e293b;
    margin: 0 0 10px 0;
    font-size: 1.15rem;
}

.feature-box p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Footer ---------- */
.footer {
    background-color: #f8fafc;
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

.costi-box {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 20px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 20px;
    color: #334155;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.legal-links {
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.legal-links a,
.legal-links__btn {
    color: #475569;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 6px 2px;
}

.legal-links__btn {
    appearance: none;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.legal-links a:hover,
.legal-links__btn:hover {
    color: #0d9488;
    text-decoration: underline;
}

.disclaimer { font-size: 0.8rem; color: #64748b; margin-top: 25px; line-height: 1.5; }

/* ---------- Pagine legali ---------- */
.legal-content {
    text-align: left;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    line-height: 1.7;
    color: #334155;
}
.legal-content h2 {
    font-size: 1.45rem;
    margin: 2.2rem 0 .8rem;
    color: #0f766e;
    font-family: 'Georgia', serif;
}
.legal-content h3 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; color: #1e293b; }
.legal-content a { color: #0f766e; }
.legal-content ul { padding-left: 1.3rem; }
.legal-content li { margin-bottom: .35rem; }
.legal-updated { font-size: .9rem; color: #64748b; margin-top: 0; }
.legal-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0d9488;
    border-radius: 8px;
    padding: 14px 18px;
}
.legal-note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .95rem;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0 1.5rem; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.legal-table th, .legal-table td { border: 1px solid #e2e8f0; padding: 8px 10px; vertical-align: top; text-align: left; }
.legal-table th { background: #f1f5f9; color: #1e293b; }
.legal-btn {
    appearance: none;
    background: #1d6ff2;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.legal-btn:hover { background: #1557c4; }
.legal-back { margin-top: 2.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .container { box-shadow: none; }
}

@media (max-width: 800px) {
    #ajax-cartomanti-wrapper .cartomanti {
        width: 32% !important;
        margin-right: 2% !important;
        margin-bottom: 2% !important;
    }
    #ajax-cartomanti-wrapper .cartomanti:nth-child(4n) { margin-right: 2% !important; }
    #ajax-cartomanti-wrapper .cartomanti:nth-child(3n) { margin-right: 0 !important; }
}

@media (max-width: 600px) {
    .header { padding: 5rem 1rem 4rem 1rem; }
    .header .h1-brand { font-size: clamp(2rem, 10.5vw, 2.8rem); }
    .header .h1-tagline { font-size: 0.95rem; letter-spacing: 2px; }
    .header--compact { padding: 1.8rem 1rem 1.6rem; }
    .header--compact h1 { font-size: 1.8rem; }

    .header-promo { padding: 12px 20px; margin-top: 20px; }
    .header-promo .promo-price { font-size: 1rem; }
    .header-promo .phone-number { font-size: 1.8rem; }

    .main-content { padding: 2rem 1rem; }
    .main-content h2 { font-size: 1.8rem; }

    .cta-button { font-size: 1.5rem; padding: 1rem; width: 100%; display: flex; }
    .cta-button .offer-highlight { font-size: 1.1rem; padding: 5px 15px; }

    .status-section { padding: 1.5rem 1rem; }
    .main-content .status-title { font-size: 1.5rem; }

    #ajax-cartomanti-wrapper .cartomanti {
        width: 48.5% !important;
        margin-right: 3% !important;
        margin-bottom: 3% !important;
        height: 45px !important;
        padding: 0 8px !important;
    }
    #ajax-cartomanti-wrapper .cartomanti:nth-child(3n) { margin-right: 3% !important; }
    #ajax-cartomanti-wrapper .cartomanti:nth-child(2n) { margin-right: 0 !important; }

    #ajax-cartomanti-wrapper .cartomantiNome {
        font-size: 0.9rem !important;
    }

    .footer { padding: 2.5rem 1rem 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
