/**
 * Home Page CSS
 * Stili specifici per la home page
 *
 * @package Destinazioni_Digitali
 */

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-background-default {
    background: var(--dd-gradient-pink);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.45);
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--dd-white);
    margin-bottom: 1.5rem;
}

.hero-title-gradient {
    background: linear-gradient(90deg, #E91E63 0%, #FF6B6B 50%, #FF8A65 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================================================
   CONTENUTO DOPO HERO - Sfondo bianco + gradienti decorativi
   ========================================================================== */
.content-after-hero {
    position: relative;
    background: var(--dd-white);
    overflow: visible;
}

/* Blob con gradiente radiale: viola-rosso → arancione-marrone → trasparente */
.gradient-blob {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.gradient-blob-left {
    top: 5%;
    left: -20%;
    background: radial-gradient(circle at center, rgba(152, 95, 128, 0.5) 0%, rgba(202, 143, 91, 0.35) 35%, rgba(168, 163, 171, 0.2) 60%, transparent 85%);
}

.gradient-blob-right {
    top: 45%;
    right: -20%;
    background: radial-gradient(circle at center, rgba(152, 95, 128, 0.5) 0%, rgba(202, 143, 91, 0.35) 35%, rgba(168, 163, 171, 0.2) 60%, transparent 85%);
}

/* Sezioni trasparenti per far vedere i blob nello sfondo */
.content-after-hero > section {
    background: transparent !important;
}

.content-after-hero .container,
.content-after-hero section {
    position: relative;
    z-index: 1;
}

/* Pulsante outline bianco (sfondo scuro semi-trasparente, bordo bianco) */
.btn-hero-outline {
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dd-white);
    background-color: rgba(30, 35, 45, 0.7);
    border: 2px solid var(--dd-white);
    border-radius: 8px;
    transition: all var(--dd-transition-fast);
}

.btn-hero-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--dd-white);
    border-color: var(--dd-white);
}

/* Pulsante sfondo bianco */
.btn-hero-solid {
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dd-gray-900);
    background-color: var(--dd-white);
    border: 2px solid var(--dd-white);
    border-radius: 8px;
    transition: all var(--dd-transition-fast);
}

.btn-hero-solid:hover {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--dd-gray-900);
    transform: translateY(-2px);
    box-shadow: var(--dd-shadow-lg);
}

/* ==========================================================================
   CHI SIAMO SECTION
   ========================================================================== */
.chi-siamo-section {
    background: var(--dd-white);
}

.chi-siamo-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chi-siamo-image {
    max-width: 100%;
    border-radius: var(--dd-radius-xl);
}

.chi-siamo-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 50%;
}

.meditation-icon {
    width: 60%;
    height: auto;
}

.chi-siamo-content {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.chi-siamo-content .section-label {
    justify-content: center;
}

.chi-siamo-content .section-label::before {
    display: none;
}

.chi-siamo-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--dd-gray-900);
    margin-bottom: 1.5rem;
}

.chi-siamo-description {
    font-size: 1rem;
    color: var(--dd-gray-600);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* ==========================================================================
   SOFTWARE SECTION
   ========================================================================== */
.software-section {
    background: var(--dd-white);
}

.software-wrapper {
    background: var(--dd-white);
    border-radius: var(--dd-radius-xl);
    padding: 3rem;
    box-shadow: var(--dd-shadow-card);
}

.software-title {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--dd-gray-900);
}

.software-image-preview {
    margin-top: 2rem;
}

.software-image-preview img {
    max-width: 100%;
    border-radius: var(--dd-radius-lg);
}

.software-products {
    padding-left: 2rem;
}

.software-cta {
    margin-top: 1rem;
    text-align: right;
}

/* ==========================================================================
   SERVIZI SECTION - 4 card responsive (2 col desktop, 1 col da md)
   ========================================================================== */
.servizi-section {
    background: var(--dd-white);
}

.servizi-cards-grid {
    margin-top: 2.5rem;
}

/* Layout: 2 card per riga desktop (lg), 1 card da md */
.servizi-cards-grid .col-12 {
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .servizi-grid .servizio-col {
        margin-bottom: 0;
    }
}

/* Card con immagine di sfondo e overlay scuro */
.servizio-card.servizio-card-overlay {
    display: block;
    position: relative;
    min-height: 380px;
    border-radius: var(--dd-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--dd-white);
    transition: transform var(--dd-transition-base);
}

.servizio-card.servizio-card-overlay:hover {
    transform: translateY(-4px);
    box-shadow: var(--dd-shadow-xl);
}

.servizio-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    background-image: linear-gradient(135deg, #1e293b 0%, #334155 50%, #0f172a 100%);
}

.servizio-card-bg[style*="background-image: url"] {
    background-image: var(--servizio-bg-image);
}

.servizio-card-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.servizio-card-overlay-layer {
    position: absolute;
    inset: 0;
    background: rgba(30, 41, 59, 0.6);
}

.servizio-card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-height: 380px;
    padding: 2rem 1.75rem;
}

.servizio-card.servizio-card-overlay .servizio-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dd-white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.servizio-card.servizio-card-overlay .servizio-card-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Pulsante SCOPRI: bianco con bordo scuro */
.btn-servizio-scopri {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--dd-white);
    color: var(--dd-gray-900);
    border: 1.5px solid var(--dd-gray-800);
    border-radius: 6px;
    transition: all var(--dd-transition-fast);
    align-self: flex-start;
}

.servizio-card.servizio-card-overlay:hover .btn-servizio-scopri {
    background: var(--dd-gray-50);
    border-color: var(--dd-gray-900);
}

/* Placeholder quando non c'è immagine */
.servizio-card-bg:not([style*="background-image"]) {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* ==========================================================================
   STATISTICHE SECTION - Design con panel distinti e gradienti numeri
   ========================================================================== */
.statistiche-section {
    background: var(--dd-white);
}

.statistiche-wrapper {
    text-align: center;
}

/* Layout: tre panel affiancati con sfondi diversi */
.statistiche-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-radius: var(--dd-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 991px) {
    .statistiche-grid {
        grid-template-columns: 1fr;
    }
}

/* Sfondi panel: 1=gradient peach→rosa, 2 e 3=grigio chiaro */
.statistica-item.stat-panel-1 {
    background: linear-gradient(90deg, #FDBA74 0%, #FEF3C7 45%, #FDF2F8 100%);
}

.statistica-item.stat-panel-2,
.statistica-item.stat-panel-3 {
    background: #F8F9FA;
}

.statistica-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    border-right: 1px solid var(--dd-gray-200);
    min-height: 260px;
}

.statistica-item:last-child {
    border-right: none;
}

/* Nessun hover che sovrascrive gli sfondi dei panel */
.statistica-item:hover {
    background-color: inherit;
}

@media (max-width: 991px) {
    .statistica-item {
        border-right: none;
        border-bottom: 1px solid var(--dd-gray-200);
        min-height: auto;
        padding: 2.5rem 2rem;
    }

    .statistica-item:last-child {
        border-bottom: none;
    }
}

/* Label: grigio scuro/nero, uppercase */
.statistica-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--dd-gray-800);
    margin-bottom: 1rem;
}

.statistica-number {
    display: block;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    min-width: 1ch;
}

/* Gradienti numeri (sinistra→destra): viola chiaro→viola scuro, arancione→rosa, viola grigio→viola chiaro */
.statistica-number.statistica-number-gradient-purple {
    background: linear-gradient(90deg, #A78BFA 0%, #5B21B6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.statistica-number.statistica-number-gradient-orange {
    background: linear-gradient(90deg, #FDBA74 0%, #FBCFE8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.statistica-number.statistica-number-gradient-purple-dark {
    background: linear-gradient(90deg, #6B7280 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.statistica-description {
    font-size: 0.875rem;
    color: var(--dd-gray-800);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   SOFTWARE TURISTICO SECTION
   ========================================================================== */
.software-turistico-section {
    background: var(--dd-white);
}

.software-cards-row {
    margin-top: 2rem;
}

/* ==========================================================================
   PROGETTI SECTION
   ========================================================================== */
.progetti-section {
    background: var(--dd-white);
}

.progetti-grid {
    margin-top: 2rem;
}

/* ==========================================================================
   CLIENTI SECTION
   ========================================================================== */
.clienti-section {
    background: var(--dd-white);
    padding: 60px 0;
}

.clienti-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--dd-gray-900);
}

.clienti-logos {
    overflow: hidden;
}

.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.logo-item {
    flex: 0 0 auto;
    padding: 1rem 2rem;
    opacity: 0.7;
    transition: opacity var(--dd-transition-fast);
}

.logo-item:hover {
    opacity: 1;
}

.logo-item img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
    transition: filter var(--dd-transition-fast);
}

.logo-item:hover img {
    filter: grayscale(0);
}

.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 60px;
    background: var(--dd-gray-100);
    border-radius: var(--dd-radius-md);
}

.logo-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dd-gray-500);
    text-align: center;
    line-height: 1.3;
}

/* ==========================================================================
   CTA SECTION - Design con illustrazione e form
   ========================================================================== */
.cta-section {
    position: relative;
    background: var(--dd-white);
    overflow: hidden;
}

/* Forma ondulata in alto (effetto wave) */
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(135deg, #EDE9FE 0%, #FCE7F3 100%);
    border-radius: 0 0 50% 50% / 0 0 30px 30px;
    z-index: 0;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Illustrazione centrata in alto */
.cta-illustration-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0 2.5rem;
}

.cta-illustration-img {
    max-width: 400px;
    width: 100%;
    height: auto;
}

/* Contenuto e form - allineati a sinistra */
.cta-content-wrapper {
    max-width: 640px;
    margin: 0 auto;
}

.cta-content {
    text-align: left;
}

.cta-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--dd-gray-900);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.cta-description {
    font-size: 1rem;
    color: var(--dd-gray-700);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Form stile pulito - campi full width, bordi leggeri, senza box */
.cta-form {
    margin-top: 0;
}

.cta-form .contact-form.cta-contact-form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.cta-contact-form .form-group {
    margin-bottom: 1.25rem;
}

.cta-contact-form .form-control {
    background: var(--dd-white);
    border: 1px solid var(--dd-gray-300);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.cta-contact-form .form-control::placeholder {
    color: var(--dd-gray-400);
}

.cta-contact-form .form-label {
    color: var(--dd-gray-700);
    font-weight: 500;
}

.cta-contact-form .form-check-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cta-contact-form .form-check-input {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.cta-contact-form .form-check-label {
    font-size: 0.9375rem;
    color: var(--dd-gray-700);
}

.cta-contact-form .form-check-label a {
    color: #2563eb;
    text-decoration: underline;
}

.cta-contact-form .form-check-label a:hover {
    color: #1d4ed8;
}

/* Pulsante SUBMIT: sfondo scuro, testo bianco, full width */
.btn-cta-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dd-white);
    background-color: var(--dd-gray-900);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color var(--dd-transition-fast), transform var(--dd-transition-fast);
}

.btn-cta-submit:hover {
    background-color: var(--dd-secondary);
    transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .hero-section {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
        margin-bottom: 3rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .chi-siamo-content {
        padding-top: 0;
    }

    .software-wrapper {
        padding: 2rem;
    }

    .software-products {
        padding-left: 0;
        margin-top: 2rem;
    }

    .cta-content {
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .software-wrapper {
        padding: 1.5rem;
    }

    .statistica-item {
        padding: 1.5rem 1rem;
    }

    .statistica-number {
        font-size: 3rem;
    }

    .logos-grid {
        gap: 1rem;
    }

    .logo-item {
        padding: 0.5rem 1rem;
    }
}

/* ==========================================================================
   HOME SECTION BACKGROUNDS (editable via ACF)
   ========================================================================== */
.home-section-has-bg {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.home-section-has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--dd-section-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.42;
    pointer-events: none;
}

.home-section-has-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.78) 100%);
}

.home-section-has-bg.home-section-bg-soft::before {
    opacity: 0.55;
    background-size: min(1100px, 100%) auto;
    background-position: left top;
}

.home-section-has-bg.home-section-bg-soft::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.75) 70%, rgba(255, 255, 255, 0.9) 100%);
}

.home-section-has-bg > .container {
    position: relative;
    z-index: 1;
}

.content-after-hero > .home-section-has-bg {
    background: transparent !important;
}

/* ==========================================================================
   PATH CARDS — Destinazioni / Impresa with photo
   ========================================================================== */
.path-card.path-card-media {
    position: relative;
    min-height: 420px;
    padding: 0;
    overflow: hidden;
    border: none;
    display: flex;
    align-items: flex-end;
}

.path-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.45s ease;
    z-index: 0;
}

.path-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(12, 8, 20, 0.15) 0%, rgba(12, 8, 20, 0.45) 40%, rgba(12, 8, 20, 0.82) 100%);
}

.path-card-body {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    padding: 2rem 1.75rem 1.75rem;
    color: #fff;
}

.path-card-has-image .path-card-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffd54f;
    margin-bottom: 0.65rem;
}

.path-card-has-image .path-card-title {
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.path-card-has-image .path-card-text {
    color: rgba(255, 255, 255, 0.9);
}

.path-card-has-image .path-card-cta {
    color: #fff;
    font-weight: 700;
}

.path-card-has-image:hover .path-card-bg {
    transform: scale(1.05);
}

.path-card-has-image:hover {
    color: #fff;
}

@media (max-width: 767px) {
    .path-card.path-card-media {
        min-height: 360px;
    }
}
