/* Events Page Styles */

.hero-events {
    background: linear-gradient(rgba(30, 64, 175, 0.8), rgba(30, 58, 138, 0.8)), 
                url('https://images.unsplash.com/photo-1511632765486-a01980e01a18?ixlib=rb-4.0.3') center/cover;
    min-height: 60vh;
    display: flex;
    align-items: center;
    margin-top: 76px;
    position: relative;
    overflow: hidden;
}

.hero-events::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-events .container {
    position: relative;
    z-index: 2;
}

.hero-events .row {
    align-items: center;
}

.hero-events h1 {
    animation: slideInLeft 0.8s ease-out;
}

.hero-events .lead {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-events .d-flex {
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-events .events-preview {
    animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Calendar Widget in Hero */
.events-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-widget {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 300px;
    width: 100%;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.calendar-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.calendar-header {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.day {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    padding: 5px;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date {
    text-align: center;
    padding: 8px 4px;
    font-size: 0.9rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
}

.date:hover {
    background: rgba(30, 64, 175, 0.1);
    transform: scale(1.1);
}

.date.current {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.date.event {
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    position: relative;
}

.date.event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
}

/* Featured Event */
.featured-event {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-event:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

.featured-event-image {
    position: relative;
    overflow: hidden;
}

.featured-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-date-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--secondary-color);
    color: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.badge-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.badge-month {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 2px;
}

/* Event Cards */
.event-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.event-image {
    position: relative;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.1);
}

.event-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.event-date .day {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    padding: 0;
}

.event-date .month {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 2px;
}

/* Event Details */
.event-details {
    background: rgba(30, 64, 175, 0.05);
    border-radius: 10px;
    padding: 20px;
}

.event-meta {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

/* Calendar Section */
.calendar-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-navigation h4 {
    color: var(--primary-color);
    font-weight: 600;
}

.calendar-grid {
    width: 100%;
}

.calendar-header-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    padding: 10px;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 10px;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.calendar-day:hover {
    background: rgba(30, 64, 175, 0.1);
    transform: scale(1.05);
}

.calendar-day.current-day {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.calendar-day.has-event {
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

.calendar-day.other-month {
    color: #ccc;
    pointer-events: none;
}

/* Filter Buttons */
.btn-custom.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Section Title */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
}

/* Load More Button */
#loadMoreBtn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

/* Search Input */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Animation Classes */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal-lg {
    max-width: 800px;
}

#eventModalBody {
    padding: 20px;
}

.event-modal-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-events {
        min-height: 55vh;
        padding: 40px 0;
    }
    
    .hero-events .row {
        flex-direction: column-reverse;
    }
    
    .hero-events .col-lg-6:first-child {
        text-align: center;
        margin-top: 2rem;
    }
    
    .calendar-widget {
        max-width: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-events {
        min-height: auto;
        padding: 60px 0 40px;
        text-align: center;
    }
    
    .hero-events .container {
        padding: 0 20px;
    }
    
    .hero-events .row {
        gap: 2rem;
    }
    
    .hero-events h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-events .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .hero-events .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-bottom: 3rem;
    }
    
    .hero-events .btn {
        width: 200px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .calendar-widget {
        max-width: 320px;
        margin: 0 auto;
        padding: 25px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    }
    
    .calendar-header h5 {
        font-size: 1.1rem;
    }
    
    .calendar-days {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .day {
        font-size: 0.9rem;
        padding: 8px 6px;
    }
    
    .calendar-dates {
        gap: 4px;
    }
    
    .date {
        padding: 10px 6px;
        font-size: 0.95rem;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .featured-event .card-body {
        padding: 2rem !important;
    }
    
    .event-card {
        margin-bottom: 1.5rem;
    }
    
    .calendar-container {
        padding: 20px;
    }
    
    .calendar-navigation {
        flex-direction: row;
        gap: 10px;
        text-align: center;
    }
    
    .calendar-navigation h4 {
        font-size: 1rem;
        margin: 0;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .calendar-navigation .btn {
        flex-shrink: 0;
        padding: 0.375rem 0.75rem;
    }
    
    .calendar-day-header {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    .btn-custom, .btn-outline-primary {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-events {
        margin-top: 70px;
        padding: 40px 0 30px;
    }
    
    .hero-events .container {
        padding: 0 15px;
    }
    
    .hero-events h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-events .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 5px;
    }
    
    .hero-events .d-flex {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    
    .hero-events .btn {
        width: 180px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .calendar-widget {
        max-width: 280px;
        padding: 20px;
        border-radius: 15px;
    }
    
    .calendar-header h5 {
        font-size: 1rem;
    }
    
    .calendar-days {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .day {
        font-size: 0.8rem;
        padding: 6px 4px;
    }
    
    .calendar-dates {
        gap: 3px;
    }
    
    .date {
        padding: 8px 4px;
        font-size: 0.85rem;
        min-height: 36px;
        border-radius: 8px;
    }
    
    .featured-event .card-body {
        padding: 1.5rem !important;
    }
    
    .event-image img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .hero-events h1 {
        font-size: 1.75rem;
    }
    
    .hero-events .lead {
        font-size: 0.95rem;
    }
    
    .hero-events .btn {
        width: 160px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .calendar-widget {
        max-width: 260px;
        padding: 18px;
    }
    
    .calendar-header h5 {
        font-size: 0.95rem;
    }
    
    .day {
        font-size: 0.75rem;
        padding: 5px 3px;
    }
    
    .date {
        padding: 6px 3px;
        font-size: 0.8rem;
        min-height: 32px;
        border-radius: 6px;
    }
}

@media (max-width: 375px) {
    .hero-events {
        padding: 30px 0 25px;
    }
    
    .hero-events .container {
        padding: 0 10px;
    }
    
    .hero-events h1 {
        font-size: 1.6rem;
    }
    
    .calendar-widget {
        max-width: 240px;
        padding: 15px;
    }
    
    .calendar-dates {
        gap: 2px;
    }
    
    .date {
        padding: 5px 2px;
        font-size: 0.75rem;
        min-height: 28px;
    }
}

/* Newsletter Section */
.bg-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
}

/* Object Cover Utility */
.object-cover {
    object-fit: cover;
}

/* Event Status Indicators */
.event-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.event-status.confirmed {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.event-status.cancelled {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.event-status.postponed {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}