/* ==========================================================================
   3C Ipercash - Page Headers Optimization
   Spacing migliorato per H1/H2 - Evita sovrapposizione con navbar
   ========================================================================== */

/* ==================== PAGE HEADER GENERAL STYLING ==================== */
.page-header {
    background: linear-gradient(135deg, #0052CC 0%, #4A9EFF 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* IMPORTANTE: Padding top maggiorato per evitare sovrapposizione */
    padding-top: calc(var(--header-height-desktop) + 60px);
    padding-bottom: 80px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="2"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
}

/* H1 - Titolo principale pagina */
.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    /* Spacing extra per sicurezza */
    margin-top: 0;
}

/* Sottotitolo/descrizione */
.page-header p {
    font-size: clamp(1.0625rem, 3vw, 1.25rem);
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 24px;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9375rem;
    margin-top: 20px;
    opacity: 0.9;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.breadcrumb span {
    opacity: 0.6;
}

/* ==================== SECTION TITLES (H2) - SPACING MIGLIORATO ==================== */
/* H2 nelle sezioni interne - MAGGIORE SPACING */
.section h2,
.section .section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    /* IMPORTANTE: Margin top aumentato */
    margin-top: 2rem;
    text-align: center;
}

/* Primo H2 della sezione - ancora più spazio */
.section > h2:first-of-type,
.section > .section-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

/* H3 - Sottotitoli */
.section h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark-color);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

/* ==================== SECTION HEADER COMPONENT ==================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 clamp(20px, 5vw, 40px);
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.1) 0%, rgba(74, 158, 255, 0.1) 100%);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 20px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.875rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--dark-color);
    margin-bottom: 16px;
}

.section-description {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-light);
    max-width: 70ch;
    margin: 0 auto;
}

/* ==================== TABLET RESPONSIVE ==================== */
@media screen and (max-width: 1024px) {
    .page-header {
        padding-top: calc(var(--header-height-tablet) + 50px);
        padding-bottom: 60px;
        min-height: 280px;
    }
    
    .section h2,
    .section .section-title {
        margin-top: 1.5rem;
    }
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media screen and (max-width: 768px) {
    .page-header {
        padding-top: calc(var(--header-height-mobile) + 40px);
        padding-bottom: 50px;
        min-height: 240px;
    }
    
    .page-header h1 {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
        margin-bottom: 16px;
    }
    
    .page-header p {
        font-size: clamp(1rem, 4vw, 1.0625rem);
        margin-bottom: 20px;
    }
    
    .breadcrumb {
        font-size: 0.875rem;
        margin-top: 16px;
    }
    
    .section h2,
    .section .section-title {
        margin-top: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
}

/* ==================== SMALL MOBILE ==================== */
@media screen and (max-width: 480px) {
    .page-header {
        padding-top: calc(var(--header-height-mobile) + 30px);
        padding-bottom: 40px;
        min-height: 200px;
    }
    
    .page-header h1 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    
    .section h2,
    .section .section-title {
        margin-top: 1rem;
    }
}

/* ==================== ORARI BOX COMPONENT ==================== */
.orari-box {
    background: linear-gradient(135deg, #F5F7FA 0%, #FFFFFF 100%);
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.orari-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.orari-box h3 i {
    font-size: 1.75rem;
}

.orari-table {
    width: 100%;
    border-collapse: collapse;
}

.orari-table tr {
    border-bottom: 1px solid #E5E7EB;
}

.orari-table tr:last-child {
    border-bottom: none;
}

.orari-table td {
    padding: 16px 12px;
    font-size: 1.0625rem;
}

.orari-table td:first-child {
    font-weight: 600;
    color: var(--dark-color);
    width: 50%;
}

.orari-table td:last-child {
    text-align: right;
    color: var(--text-color);
    font-weight: 500;
}

.orari-table tr.chiuso td:last-child {
    color: #DC2626;
    font-weight: 600;
}

.orari-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-top: 16px;
}

.orari-badge.aperto {
    background: #D1FAE5;
    color: #065F46;
}

.orari-badge.chiuso {
    background: #FEE2E2;
    color: #991B1B;
}

.orari-badge i {
    font-size: 1rem;
}

/* Mobile orari */
@media screen and (max-width: 768px) {
    .orari-box {
        padding: 24px 20px;
        margin: 24px 0;
    }
    
    .orari-box h3 {
        font-size: 1.25rem;
    }
    
    .orari-table td {
        padding: 12px 8px;
        font-size: 1rem;
    }
    
    .orari-table td:first-child {
        width: 60%;
    }
}
