/* UNIMC orientamento — home chrome e sezioni.
   Primary da COLOR_PRIMARY (env); fallback #7E0341 se env vuoto. */

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #7E0341;
    --secondary-color: #6b0017;
    --accent-color: #a01855;
    --light-bg: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #7E0341 0%, #9a1a5c 100%);
    --gradient-secondary: linear-gradient(135deg, #6b0017 0%, #a01855 100%);
    --unimc-primary: #7E0341;
}

/* ANIMAZIONI */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

/* HERO SECTION */
.hero-section {
    background: var(--gradient-primary);
    color: #fff;
    padding: 80px 0 100px;
    position: relative;
    overflow: visible;
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hero-circle {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
}

.hero-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
    animation-delay: 2s;
}

.hero-icon {
    position: absolute;
    font-size: 60px;
    color: rgba(255, 255, 255, 0.1);
    animation: float 8s ease-in-out infinite;
}

.hero-icon-1 {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.hero-icon-2 {
    bottom: 20%;
    left: 10%;
    animation-delay: 3s;
}

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

.hero-section h1 {
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 20px;
    animation: slideInUp 0.8s ease-out;
}

.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 30px;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.hero-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.hero-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* SEZIONI EVENTI */
.sezioni-section {
    padding: 80px 0;
    background: #fff;
}

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

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

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.section-header .section-title {
    text-align: left;
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.section-header .section-title p {
    margin: 0;
    max-width: none;
}

.section-header .btn-vedi-tutti {
    flex-shrink: 0;
    align-self: center;
    background: var(--gradient-primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.section-header .btn-vedi-tutti:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb, 126, 3, 65), 0.25);
}

.empty-state-card {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 28px 32px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(126, 3, 65, 0.08);
}

.empty-state-card-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.empty-state-card-body h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.empty-state-card-body p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.perche-grid .info-card {
    height: 100%;
}

.perche-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.perche-card-cta {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.perche-card-cta:hover {
    color: #fff;
    border-bottom-color: #fff;
    text-decoration: none;
}

.evento-card {
    background: #fff;
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    margin-bottom: 20px;
}

.evento-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.evento-card-inner {
    overflow: hidden;
    border-radius: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.evento-card-header {
    position: relative;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.evento-card-header.has-image {
    background-size: cover;
    background-position: center;
}

.evento-card-header.has-image::before {
    content: none;
    display: none;
}

.evento-card-icon {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.evento-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.evento-card-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.evento-card-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.evento-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.evento-count {
    font-size: 0.9rem;
    color: #666;
}

.evento-count strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-scopri {
    background: var(--gradient-primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-scopri:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb, 126, 3, 65), 0.3);
}

/* CTA SECTION */
.cta-section {
    background: var(--gradient-secondary);
    color: #fff;
    padding: 56px 0;
    position: relative;
    overflow: visible;
}

.cta-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cta-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    opacity: 0.1;
}

.cta-dots span {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
}

.cta-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-title {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.cta-title h2 {
    font-weight: 700;
    font-size: 2.25rem;
    margin: 0 0 10px;
    color: #fff;
}

.cta-title p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
    color: #fff;
    max-width: 560px;
}

.cta-actions {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.btn-cta {
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #fff;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-cta-primary:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-cta-outline:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

/* INFO CARDS */
.info-cards-section {
    padding: 80px 0;
    background: var(--light-bg);
}

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

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

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

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

.info-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* HERO CAROUSEL */
.hero-carousel-section {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0;
    z-index: 1;
    background: #fff;
}

.hero-carousel {
    position: relative;
    min-height: 800px;
    height: 800px;
    overflow: hidden;
    background: #fff;
}

.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
    min-height: 800px;
    height: 800px;
}

.hero-carousel-item {
    position: relative;
    min-height: 800px;
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--unimc-primary, var(--primary-color, #7E0341));
}

/* Banner: img intera dentro i 800px (contain, no crop); bande laterali bianche */
.hero-carousel-item--image-only {
    display: block;
    padding: 0;
    background: #fff;
}

.hero-carousel-banner-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    line-height: 0;
    text-decoration: none;
    color: inherit;
}

.hero-carousel-banner-link:hover,
.hero-carousel-banner-link:focus {
    text-decoration: none;
    color: inherit;
}

.hero-carousel-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

@media (max-width: 767.98px) {
    .hero-carousel,
    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item,
    .hero-carousel-item {
        min-height: 320px;
        height: 42vw;
        max-height: 420px;
    }
}

.hero-carousel-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.hero-carousel-slide-link:hover,
.hero-carousel-slide-link:focus {
    color: inherit;
    text-decoration: none;
}

.hero-carousel-slide-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: -4px;
}

.hero-carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(126, 3, 65, 0.7) 0%, rgba(154, 26, 92, 0.7) 100%);
    z-index: 1;
}

.hero-carousel-item--has-image::before {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.35) 0%, rgba(var(--primary-color-light-rgb), 0.35) 100%);
}

.hero-carousel-item--image-only::before {
    display: none;
}

.hero-carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    max-width: 800px;
}

.hero-carousel-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-carousel-content .lead {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-carousel-content p {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
}

.btn-hero-slide-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 22px;
    border-radius: 25px;
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-hero-slide-link:hover {
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.hero-carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-carousel-controls:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.hero-carousel-prev {
    left: 20px;
}

.hero-carousel-next {
    right: 20px;
}

.hero-carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    transform: none;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
}

.hero-carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    flex-shrink: 0;
    text-indent: -9999px;
}

.hero-carousel-indicators li.active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-carousel,
    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item,
    .hero-carousel-item {
        min-height: 320px;
        height: 42vw;
        max-height: 420px;
    }

    .hero-carousel-item:not(.hero-carousel-item--image-only) {
        padding: 40px 16px 52px;
        box-sizing: border-box;
    }

    .hero-carousel-item--image-only {
        padding: 0;
    }

    .hero-carousel-content {
        padding: 0 8px;
    }

    .hero-carousel-content h2 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }

    .hero-carousel-content .lead {
        font-size: 1.05rem;
        margin-bottom: 16px;
    }

    .hero-carousel-content p {
        font-size: 0.95rem;
        margin-bottom: 0;
    }

    .hero-carousel-controls {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .hero-carousel-prev {
        left: 10px;
    }

    .hero-carousel-next {
        right: 10px;
    }

    .hero-section {
        padding: 60px 0 80px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .section-title h2 {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .section-title {
        margin-bottom: 28px;
    }

    .sezioni-section {
        padding: 40px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    .section-header .section-title {
        flex: 0 0 auto;
    }

    .section-header .section-title p {
        font-size: 1rem;
    }

    .section-header .btn-vedi-tutti {
        align-self: flex-start;
    }

    .empty-state-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }

    .cta-section {
        padding: 32px 0;
    }

    .cta-header {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
    }

    .cta-title {
        flex: 0 0 auto;
        width: 100%;
    }

    .cta-title h2 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .cta-title p {
        font-size: 1rem;
    }

    .cta-actions {
        justify-content: flex-start;
        gap: 10px;
    }

    .btn-cta {
        width: auto;
    }

    .perche-grid {
        margin-top: -8px;
    }
}

/* CTA band closer to live burgundy strip */
.cta-section {
    background: var(--gradient-primary) !important;
}

.btn-cta-primary {
    background: #fff !important;
    color: var(--unimc-primary) !important;
}

.btn-cta-outline {
    border-color: #fff !important;
    color: #fff !important;
}

.info-card.perche-card {
    background: var(--gradient-primary) !important;
}

.btn-vedi-tutti,
.btn-scopri,
.section-header .btn-vedi-tutti {
    color: #fff !important;
}

/* === Promo grid + Perché scegliere (layout originale UNIMC) === */
.unimc-promo-grid-section {
    padding: 4.5rem 0;
    background: #fff;
}

.unimc-promo-card {
    position: relative;
    min-height: 300px;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.unimc-promo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(107, 0, 23, 0.85) 0%, rgba(126, 3, 65, 0.35) 45%, transparent 75%);
    z-index: 1;
}

.unimc-promo-card-body {
    position: relative;
    z-index: 2;
    padding: 1.75rem;
    width: 100%;
}

.unimc-promo-card-body h2 {
    color: #fff;
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.25;
}

.btn-unimc-promo {
    display: inline-block;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.unimc-perche-section {
    background: var(--primary-color);
    color: #fff;
    padding: 4rem 0 4.5rem;
}

.unimc-perche-title {
    text-align: center;
    color: #fff;
    font-size: 2.1rem;
    font-weight: 700;
    margin: 0 0 2.75rem;
}

.unimc-perche-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
}

.unimc-perche-row:last-child {
    margin-bottom: 0;
}

.unimc-perche-icon {
    flex: 0 0 180px;
    text-align: center;
}

.unimc-perche-icon img {
    max-width: 140px;
    width: 70%;
    height: auto;
}

.unimc-perche-text h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
    letter-spacing: 0.02em;
}

.unimc-perche-text p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
}

@media (max-width: 767.98px) {
    .unimc-perche-row {
        flex-direction: column;
        text-align: center;
    }

    .unimc-perche-icon {
        flex-basis: auto;
    }

    .unimc-promo-card {
        min-height: 260px;
    }
}

/* === UNIMC in 3 minuti === */
.unimc-tre-minuti-section {
    background: var(--primary-color);
    color: #fff;
    padding: 3.5rem 0;
}

.unimc-tre-minuti-title {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
}

.unimc-tre-minuti-video {
    border: 7px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    background: #000;
}

.unimc-tre-minuti-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.unimc-tre-minuti-list > li + li {
    margin-top: 0.35rem;
}

.unimc-tre-minuti-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 0.65rem;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.unimc-tre-minuti-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.unimc-tre-minuti-icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.unimc-tre-minuti-icon img {
    width: 36px;
    height: auto;
}

.unimc-tre-minuti-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.unimc-tre-minuti-copy strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.unimc-tre-minuti-copy span {
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 991.98px) {
    .unimc-tre-minuti-section {
        padding: 2.5rem 0;
    }
}
