/* ===================================================================
   PENNISI & PARTNERS - CRISI D'IMPRESA PAGE STYLES
   Stili specifici per la pagina Crisi d'Impresa e Sovraindebitamento
   =================================================================== */

/* ===== SEZIONE 1: HERO ===== */
.crisi-hero {
    position: relative;
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 140px;
}

.crisi-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.crisi-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.crisi-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(147, 41, 38, 0.8) 100%
    );
}

.crisi-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 0 80px;
    max-width: 900px;
    margin: 0 auto;
}

.crisi-hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.crisi-title-line {
    display: block;
    overflow: hidden;
}

.crisi-hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.crisi-hero-badge {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.scroll-text-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: scrollLineMove 2s ease-in-out infinite;
}

@keyframes scrollLineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(200%); }
}

/* ===== SEZIONI GENERALI ===== */
.crisi-section {
    padding: 100px 0;
    position: relative;
}

.crisi-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.crisi-grid-reverse {
    direction: rtl;
}

.crisi-grid-reverse > * {
    direction: ltr;
}

.crisi-section-content {
    padding-right: 40px;
}

.crisi-grid-reverse .crisi-section-content {
    padding-right: 0;
    padding-left: 40px;
}

.crisi-section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--black);
    letter-spacing: -0.01em;
}

.crisi-title-center {
    text-align: center;
}

.crisi-section-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--gray);
}

.crisi-section-text p {
    margin-bottom: 20px;
}

.crisi-section-text p:last-child {
    margin-bottom: 0;
}

.crisi-text-center {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.crisi-highlight {
    font-weight: 600;
    color: var(--primary-red);
    font-size: 1.15rem;
    padding: 25px;
    background: rgba(147, 41, 38, 0.08);
    border-left: 4px solid var(--primary-red);
    border-radius: 0 8px 8px 0;
}

/* ===== IMMAGINI SEZIONI ===== */
.crisi-section-image {
    position: relative;
}

.crisi-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.crisi-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(147, 41, 38, 0.1) 0%,
        transparent 50%
    );
    z-index: 1;
    pointer-events: none;
}

.crisi-img {
    width: 100%;
    height: auto;
    display: block;
    will-change: transform;
    transition: transform 0.6s ease;
}

.crisi-image-wrapper:hover .crisi-img {
    transform: scale(1.03);
}

/* ===== SEZIONE MERITEVOLEZZA ===== */
.crisi-meritevolezza {
    background: linear-gradient(
        180deg,
        var(--light-bg) 0%,
        rgba(147, 41, 38, 0.05) 100%
    );
    border-top: 1px solid rgba(147, 41, 38, 0.1);
    border-bottom: 1px solid rgba(147, 41, 38, 0.1);
}

.crisi-meritevolezza-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

/* ===== SEZIONE 5: STATISTICHE ===== */
.crisi-statistiche {
    background: linear-gradient(
        135deg,
        #7a1f1d 0%,
        #932926 50%,
        #5a0200 100%
    );
    color: #ffffff;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.crisi-statistiche::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.crisi-stats-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.crisi-stats-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.crisi-stats-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.crisi-stats-intro {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.crisi-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.crisi-stat-item {
    text-align: center;
    padding: 30px 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    will-change: transform;
}

.crisi-stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.crisi-stat-number {
    display: block;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.crisi-stat-suffix {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 15px;
    text-transform: lowercase;
}

.crisi-stat-label {
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.85;
    margin: 0;
}

.crisi-stats-footer {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.crisi-stats-footer p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 25px;
}

.crisi-stats-cta {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

/* ===== SEZIONE CONTATTI ===== */
.crisi-contact {
    background: var(--light-bg);
}

/* ===== DARK MODE OVERRIDES ===== */
body.dark-mode .crisi-section-title {
    color: #ffffff;
}

body.dark-mode .crisi-section-text {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .crisi-highlight {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.5);
}

/* GSAP gestisce la transizione colore - vedi script-crisi.js sezione 4B */
/* body.dark-mode .crisi-meritevolezza {
    background: rgba(147, 41, 38, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
} */

body.dark-mode .crisi-image-wrapper {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

body.dark-mode .crisi-contact {
    background: #932926;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .crisi-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .crisi-stat-item:nth-child(4),
    .crisi-stat-item:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 1024px) {
    .crisi-section-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .crisi-grid-reverse {
        direction: ltr;
    }

    .crisi-section-content {
        padding-right: 0;
        order: 1;
    }

    .crisi-grid-reverse .crisi-section-content {
        padding-left: 0;
    }

    .crisi-section-image {
        order: 2;
    }

    .crisi-section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .crisi-hero-content {
        padding: 100px 20px 60px;
    }

    .crisi-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .crisi-stat-item:nth-child(5) {
        grid-column: span 2;
    }

    .crisi-statistiche {
        padding: 80px 0;
    }

    .crisi-stat-item {
        padding: 25px 15px;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-line {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .crisi-stats-grid {
        grid-template-columns: 1fr;
    }

    .crisi-stat-item:nth-child(5) {
        grid-column: span 1;
    }

    .crisi-section {
        padding: 60px 0;
    }

    .crisi-section-text {
        font-size: 1rem;
    }

    .crisi-highlight {
        padding: 20px;
        font-size: 1rem;
    }
}

/* ===== ANIMAZIONI DI SUPPORTO ===== */
.crisi-title-line .char {
    display: inline-block;
    transform-origin: center bottom;
    will-change: transform, opacity;
}

/* GSAP gestisce opacity e transform - non impostare valori di default */
.crisi-stat-item {
    will-change: transform, opacity;
}

/* GPU Acceleration */
.crisi-hero-image,
.crisi-img,
.crisi-stat-item,
.scroll-line::after {
    transform: translateZ(0);
    backface-visibility: hidden;
}
