:root {
    --cp-primary: #1a3d5c;
    --cp-primary-light: #2a5f8f;
    --cp-accent: #8b2942;
    --cp-light-bg: #f8f9fa;
    --cp-gradient-primary: linear-gradient(135deg, #1a3d5c 0%, #2a5f8f 100%);
    --cp-gradient-cta: linear-gradient(135deg, #6b1f35 0%, #8b2942 100%);
}

@keyframes cp-slide-in-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cp-hero-section {
    background: var(--cp-gradient-primary);
    color: #fff;
    padding: 64px 0 80px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    z-index: 1;
}

.cp-hero-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.cp-hero-circle {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.cp-hero-circle-1 {
    width: 260px;
    height: 260px;
    top: -90px;
    right: -40px;
}

.cp-hero-circle-2 {
    width: 180px;
    height: 180px;
    bottom: -50px;
    left: -50px;
}

.cp-hero-content {
    position: relative;
    z-index: 2;
}

.cp-hero-content h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cp-hero-content .lead {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 0;
    max-width: 760px;
}

.cp-section {
    padding: 64px 0;
    position: relative;
    background-color: #fff;
    flex-shrink: 0;
    overflow: visible;
}

body.frontend > .page-container > .cp-hero-section,
body.frontend > .page-container > .cp-section,
body.frontend > .page-container > .cp-cta-section {
    margin-top: 0;
    width: 100%;
}

.cp-section--light {
    background: var(--cp-light-bg);
}

.cp-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.cp-section-title h2 {
    font-weight: 700;
    font-size: 2rem;
    color: var(--cp-primary);
    margin-bottom: 12px;
}

.cp-section-title p {
    color: #666;
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
}

.cp-info-card {
    background: #fff;
    border-radius: 15px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cp-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.cp-info-card-icon {
    font-size: 2.5rem;
    color: var(--cp-primary);
    margin-bottom: 16px;
}

.cp-info-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cp-primary);
    margin-bottom: 12px;
}

.cp-info-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0;
}

.cp-dept-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cp-dept-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
    text-decoration: none;
    color: inherit;
}

.cp-dept-card-visual {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.cp-dept-card-visual i {
    font-size: 4rem;
    opacity: 0.95;
}

.cp-dept-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cp-dept-card-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--cp-primary);
    margin-bottom: 16px;
}

.cp-dept-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.cp-search-panel {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.cp-search-panel-body {
    padding: 28px 24px 8px;
    overflow: visible;
}

.cp-search-panel-footer {
    padding: 16px 24px 24px;
    background: #fafbfc;
    border-top: 1px solid #eef1f4;
    border-radius: 0 0 15px 15px;
    overflow: visible;
}

#ricerca-sessioni,
#ricerca-sessioni .container {
    overflow: visible;
}

.cp-search-panel .chosen-container {
    position: relative;
    z-index: 1;
}

.cp-search-panel .chosen-container.chosen-with-drop {
    z-index: 1050;
}

.cp-search-panel .chosen-container .chosen-drop {
    z-index: 1051;
}

.cp-filter-label {
    font-weight: 600;
    color: var(--cp-primary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.cp-sessioni-grid {
    margin-top: 8px;
}

.cp-sessione-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cp-sessione-card-header {
    background: var(--cp-gradient-primary);
    color: #fff;
    padding: 20px 22px;
}

.cp-sessione-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.cp-sessione-card-body {
    padding: 22px;
    flex-grow: 1;
}

.cp-sessione-card-dates {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    color: #555;
}

.cp-sessione-card-dates li + li {
    margin-top: 6px;
}

.cp-sessione-card-footer {
    padding: 0 22px 22px;
}

.cp-cta-section {
    background: var(--cp-gradient-cta);
    color: #fff;
    padding: 64px 0;
}

.cp-cta-content {
    text-align: center;
}

.cp-cta-content h2 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.cp-cta-content p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 28px;
}

.cp-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cp-btn-cta {
    padding: 14px 34px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    border: 2px solid #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cp-btn-cta-primary {
    background: #fff;
    color: var(--cp-accent);
}

.cp-btn-cta-primary:hover {
    color: var(--cp-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.cp-btn-cta-outline {
    background: transparent;
    color: #fff;
}

.cp-btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-2px);
}

.cp-empty-results {
    border-radius: 12px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .cp-hero-content h1 {
        font-size: 1.85rem;
    }

    .cp-hero-content .lead {
        font-size: 1.05rem;
    }

    .cp-section-title h2,
    .cp-cta-content h2 {
        font-size: 1.65rem;
    }

    .cp-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cp-btn-cta {
        width: 100%;
    }

    .cp-dept-card-visual i {
        font-size: 3rem;
    }
}
