/* Enhanced Offers Cards - Miglioramenti grafici per le card "Offerte del Momento" */

/* Keyframes per animazioni */
@keyframes cardFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    50% { 
        transform: translateY(-8px) scale(1.02); 
    }
}

@keyframes shimmerEffect {
    0% { 
        background-position: -200% 0; 
    }
    100% { 
        background-position: 200% 0; 
    }
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); 
    }
    50% { 
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); 
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sezione Hot Deals migliorata */
.hot-deals {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.hot-deals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hot-deals h2 {
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.hot-deals .section-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: #64748b;
    margin-bottom: 5rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Grid delle offerte migliorato - Versione compatta */
.deals-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* Card offerte compatte senza immagini */
.offer-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    animation: slideInFromBottom 0.6s ease-out;
    max-height: 240px;
    overflow: visible;
}

.offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.05) 0%, 
        rgba(6, 182, 212, 0.05) 50%, 
        rgba(245, 158, 11, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.offer-card:hover::before {
    opacity: 1;
}

.offer-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.12),
        0 8px 15px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Rimuoviamo completamente i badge che coprono il titolo */
.offer-badge {
    display: none;
}

/* Rimuoviamo completamente la sezione immagine */
.offer-image {
    display: none;
}

.offer-destination {
    display: none;
}

/* Contenuto dell'offerta ultra-compatto con layout flex */
.offer-content {
    padding: 0.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.offer-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #1e293b, #475569);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dettagli dell'offerta ultra-compatti */
.offer-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.05));
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.offer-duration,
.offer-dates,
.offer-includes,
.offer-times {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #475569;
    font-weight: 500;
    padding: 0.1rem 0;
}

.offer-duration {
    font-weight: 600;
    color: #6366f1;
    font-size: 0.75rem;
}

.offer-includes {
    color: #059669;
    font-weight: 600;
}

/* Descrizione ultra-compatta */
.offer-description {
    margin-bottom: 0.25rem;
}

.offer-description p {
    color: #64748b;
    line-height: 1.3;
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
}

/* Rimuoviamo completamente gli highlights con i tick verdi */
.offer-highlights {
    display: none;
}

/* Layout con prezzo a sinistra e pulsante a destra - VISIBILE */
.offer-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 44px; /* spazio minimo per il bottone */
}

.offer-pricing {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Stile specifico per il bottone accanto al prezzo dentro .offer-bottom */
.offer-bottom > .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    min-width: 110px;
    padding: 0.5rem 0.9rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4) !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Garantisci che la sezione prezzo + pulsante stia sopra ogni overlay */
.offer-bottom,
.offer-pricing {
    position: relative;
    z-index: 2;
}

/* Rendi il bottone sempre visibile e non comprimibile */
.offer-pricing .cta-button {
    flex: 0 0 auto;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 3;
}

.offer-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ea580c;
    text-shadow: 0 1px 2px rgba(234, 88, 12, 0.2);
    margin: 0;
    line-height: 1;
}

.savings {
    font-size: 0.65rem;
    color: #059669;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Metti l'etichetta sotto la coppia prezzo + pulsante */
.offer-pricing .savings {
    order: 2;
    flex: 1 0 100%;
    margin-top: 0.1rem;
}

/* Assicura che prezzo e CTA restino affiancati e centrati verticalmente */
.offer-pricing .offer-price { order: 0; }
.offer-pricing .cta-button { order: 1; }

/* Forza visibilità e allineamento del pulsante accanto al prezzo */
.offer-pricing .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4) !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 3;
}

/* Pulsante CTA posizionato a destra - MOLTO VISIBILE */
.offer-card .cta-button {
    width: auto;
    min-width: 120px;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    background-size: 200% 200%;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 10;
}

.offer-card .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.offer-card .cta-button:hover::before {
    left: 100%;
}

.offer-card .cta-button:hover {
    transform: translateY(-2px);
    background-position: 100% 100%;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    border-color: rgba(255, 255, 255, 0.4);
}

.offer-card .cta-button::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.offer-card .cta-button:hover::after {
    transform: translateX(5px);
}

/* Varianti per card piccole - Ultra-compatte con layout orizzontale */
.offer-card.small {
    padding: 0;
    border-radius: 12px;
    max-height: 200px;
}

.offer-card.small .offer-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.offer-card.small .offer-content h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.offer-card.small .offer-details {
    padding: 0.4rem;
    margin-bottom: 0.4rem;
}

.offer-card.small .offer-bottom {
    gap: 0.6rem;
    margin-top: auto;
}

.offer-card.small .offer-pricing {
    padding: 0.4rem;
}

.offer-card.small .offer-price {
    font-size: 1.2rem;
}

.offer-card.small .cta-button {
    padding: 0.5rem 0.8rem;
    font-size: 0.7rem;
    min-width: 85px;
}

/* Responsive Design per versione compatta */
@media (max-width: 1200px) {
    .deals-grid-2 {
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .deals-grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hot-deals {
        padding: 5rem 0;
    }
    
    .offer-pricing {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .hot-deals {
        padding: 3rem 0;
    }
    
    .hot-deals h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hot-deals .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .offer-card {
        border-radius: 12px;
        margin: 0 0.5rem;
        max-height: 200px;
    }
    
    .offer-content {
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .offer-content h3 {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .offer-badge {
        top: 8px;
        left: 8px;
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .offer-details {
        padding: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    .offer-bottom {
        gap: 1rem;
    }
    
    .offer-pricing {
        padding: 0.4rem;
    }
    
    .offer-price {
        font-size: 1.2rem;
    }
    
    .offer-card .cta-button {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .deals-grid-2 {
        gap: 0.75rem;
    }
    
    .offer-card {
        margin: 0;
        max-height: 180px;
    }
    
    .offer-content {
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .offer-content h3 {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .offer-details {
        padding: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    .offer-bottom {
        gap: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .offer-pricing {
        padding: 0.3rem;
    }
    
    .offer-price {
        font-size: 1.1rem;
    }
    
    .offer-card .cta-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
        min-width: 85px;
    }
    
    .offer-description p {
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }
    
    .offer-duration,
    .offer-dates,
    .offer-includes,
    .offer-times {
        font-size: 0.6rem;
    }
    
    .savings {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Effetti speciali per card in evidenza - Versione compatta */
.offer-card.featured {
    position: relative;
}

.offer-card.featured::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4, #f59e0b);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    animation: cardFloat 4s ease-in-out infinite;
    opacity: 0.5;
}

/* Animazioni di entrata scaglionate */
.offer-card:nth-child(1) {
    animation-delay: 0.1s;
}

.offer-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* Miglioramenti per accessibilità */
.offer-card:focus-within {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 1px;
}

.offer-card .cta-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 1px;
}

/* Effetti hover ottimizzati per versione compatta */
@media (prefers-reduced-motion: no-preference) {
    .offer-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .offer-card:hover .offer-badge {
        transform: scale(1.05) rotate(-1deg);
    }
}

/* Disabilita animazioni per utenti che preferiscono movimento ridotto */
@media (prefers-reduced-motion: reduce) {
    .offer-card,
    .offer-card *,
    .offer-badge {
        animation: none !important;
        transition: none !important;
    }
    
    .offer-card:hover {
        transform: none !important;
    }
    
    .offer-badge {
        animation: none !important;
    }
}

/* Ottimizzazioni per performance */
.offer-card {
    will-change: transform;
    contain: layout style paint;
}

.offer-badge {
    will-change: transform;
}

/* Stili per stampa */
@media print {
    .offer-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .offer-badge {
        background: #333 !important;
        color: white !important;
    }
    
    .offer-card .cta-button {
        background: #333 !important;
        color: white !important;
    }
}

/* Supporto per dark mode */
@media (prefers-color-scheme: dark) {
    .offer-card {
        background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .offer-content h3 {
        color: #f1f5f9;
        background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .offer-description p {
        color: #94a3b8;
    }
    
    .offer-details {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
        border-color: rgba(99, 102, 241, 0.2);
    }
    
    .offer-highlights li {
        background: rgba(16, 185, 129, 0.1);
        color: #94a3b8;
    }
}

/* Stato loading per lazy loading */
.offer-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.offer-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Micro-interazioni aggiuntive */
.offer-card .cta-button:active {
    transform: translateY(-1px) scale(0.98);
}

.offer-pricing:hover .offer-price {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Supporto per touch devices */
@media (hover: none) and (pointer: coarse) {
    .offer-card:hover {
        transform: none;
    }
    
    .offer-card:active {
        transform: scale(0.98);
    }
}

/* Fine del file CSS */
