/* ============================================
   Torino .NET - Custom Styles
   ============================================ */

/* Event Cards */
.event-card {
    transition: box-shadow 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.event-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.event-card .event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.event-card .event-info {
    padding: 10px 0;
}

.event-card .event-date-badge {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
}

.event-card .event-actions {
    margin-top: 15px;
}

.past-event {
    opacity: 0.8;
}

.past-event:hover {
    opacity: 1;
}

/* Staff Cards */
.staff-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border-radius: 4px;
    padding: 20px 10px;
}

.staff-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.staff-social a {
    color: #666;
    transition: color 0.3s ease;
}

.staff-social a:hover {
    color: #337ab7;
    text-decoration: none;
}

/* Gallery */
.gallery-album {
    transition: box-shadow 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-album:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.gallery-thumbnail {
    transition: opacity 0.3s ease;
}

.gallery-thumbnail:hover {
    opacity: 0.85;
}

/* Video Cards */
.video-card {
    transition: box-shadow 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.video-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.video-thumbnail:hover .fa-play {
    transform: scale(1.1);
}

/* ============================================
   Header / Navbar Fixes
   ============================================ */

/* Logo: più grande e centrato verticalmente */
.navbar-brand {
    display: flex;
    align-items: center;
    height: 80px; /* more room than theme's 62px for proper centering */
    padding: 0 15px;
}
.navbar-brand img {
    max-height: 56px;
}

/* Top bar: allineamento verticale al centro della label */
#top .container > .row {
    display: flex;
    align-items: center;
}
#top .container > .row::before,
#top .container > .row::after {
    display: none;
}

/* Icone social: più spaziose tra di esse */
#top .social a + a {
    margin-left: 18px;
}

/* Menu nav: rimozione sottolineato + stanghette verticali di separazione brevi */
.navbar ul.nav > li > a {
    text-decoration: none;
}
.navbar ul.nav > li + li > a {
    position: relative;
}
.navbar ul.nav > li + li > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1.1em;
    width: 1px;
    background: rgba(0, 0, 0, 0.18);
}
@media (max-width: 768px) {
    .navbar ul.nav > li + li > a::before {
        display: none;
    }
}

/* Heading Section */
.heading {
    margin-bottom: 40px;
}

.heading h2 {
    margin-bottom: 10px;
}

/* Upcoming Events on Homepage */
#upcoming-events {
    background: #f8f9fa;
    padding: 50px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .event-card .event-image {
        height: 150px;
    }
    
    .staff-card {
        margin-bottom: 20px;
    }
}

/* Promo Codes Section */
#promo-codes {
    padding: 50px 0;
}

.promo-card {
    border: 2px dashed #337ab7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    background: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.promo-card:hover {
    box-shadow: 0 4px 15px rgba(51, 122, 183, 0.2);
    border-color: #2a6496;
}

.promo-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 6px;
}

.promo-partner-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.promo-partner-name:hover {
    color: #337ab7;
    text-decoration: none;
}

.promo-discount {
    display: inline-block;
    background: #337ab7;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.promo-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: break-word;
}

.promo-code-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.promo-code-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.promo-code-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f4f8fc;
    border: 1px solid #c8dff0;
    border-radius: 4px;
    padding: 5px 10px;
    flex: 1;
}

.promo-code-value {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: #1a5276;
    letter-spacing: 1px;
    flex: 1;
    background: transparent;
    border: none;
    padding: 0;
}

.promo-copy-btn {
    padding: 2px 7px;
    line-height: 1.4;
    flex-shrink: 0;
}

.promo-expiry {
    font-size: 12px;
    margin-bottom: 14px;
}

@media (max-width: 768px) {
    .promo-card {
        margin-bottom: 16px;
    }
    .promo-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   News Post Content Headings
   ============================================ */

/* Make h2 subtitles inside a news article clearly distinct from the page title */
#blog-post #post-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #2a6496;
    border-bottom: 2px solid #d0e4f0;
    padding-bottom: 6px;
    margin-top: 30px;
    margin-bottom: 14px;
}

#blog-post #post-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #337ab7;
    margin-top: 24px;
    margin-bottom: 10px;
}

/* ============================================
   Carousel Improvements (Homepage Owl Carousel)
   ============================================ */

/* Sfondo carousel: sposta il photogrid su ::before e applica blur per renderlo meno complesso */
body .home-carousel {
    background: none;
    overflow: hidden;
}
.home-carousel::before {
    content: '';
    position: absolute;
    /* margine extra di 20px per coprire gli artefatti ai bordi del blur */
    inset: -20px;
    background: url('/img/photogrid.jpg') center center / cover no-repeat;
    filter: blur(6px);
    z-index: 0;
}

/* Scuro e neutro: sovrascrive l'overlay teal originale */
.home-carousel .dark-mask {
    background: rgba(0, 0, 0, 0.62) !important;
    opacity: 1 !important;
    filter: none !important;
    z-index: 1;
}

/* Il contenuto del carousel deve stare sopra il dark-mask */
.home-carousel > .container {
    position: relative;
    z-index: 2;
}

/* Contenitore immagine con aspect ratio 4:3 fisso */
.home-carousel .carousel-img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
}

/* Immagine in modalità cover: riempie il riquadro senza deformarsi */
.home-carousel .carousel-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* Layer nero trasparente sull'immagine per ammorbidirla */
.home-carousel .carousel-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 10px;
    pointer-events: none;
}

/* Pallini navigazione più visibili su sfondo scuro */
.home-carousel .owl-theme .owl-controls .owl-page span {
    background: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}
.home-carousel .owl-theme .owl-controls .owl-page.active span,
.home-carousel .owl-theme .owl-controls .owl-page:hover span {
    background: #fff !important;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

/* Mobile: rimuovi aspect-ratio fisso per non sprecare spazio verticale */
@media (max-width: 767px) {
    .home-carousel .carousel-img-wrap {
        aspect-ratio: 16 / 9;
    }
}

/* ============================================
   News List Page
   ============================================ */

/* Post titles in news list: remove uppercase to differentiate from section heading */
#blog-listing-medium .post h2 {
    text-transform: none !important;
    letter-spacing: 0.02em;
    font-size: 20px;
}

/* Vertically center the image column relative to the text column */
#blog-listing-medium .post > .row {
    display: flex;
    align-items: center;
}
#blog-listing-medium .post > .row::before,
#blog-listing-medium .post > .row::after {
    display: none;
}
