/* Event Calendar Styles */
.event-calendar {
    background: linear-gradient(135deg, #f9f5f0 0%, #f0e6d9 100%);
    padding: 30px 0 50px;
    position: relative;
    overflow: hidden;
    
    @media (max-width: 767px) {
        padding: 20px 0 40px;
    }
}

.event-calendar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(90deg, #8b5a2b, #c0a062, #8b5a2b);
    background-size: 200% 100%;
    animation: gradientBG 10s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.calendar-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 12px 8px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(139, 90, 43, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    
    /* Mobile First Approach */
    @media (min-width: 375px) {
        padding: 14px 10px;
        max-width: calc(100% - 16px);
    }
    
    @media (min-width: 480px) {
        padding: 16px 12px;
        max-width: calc(100% - 32px);
    }
    
    @media (min-width: 640px) {
        padding: 20px 16px;
        max-width: calc(100% - 40px);
    }
    
    @media (min-width: 768px) {
        padding: 24px 20px;
        max-width: 95%;
    }
    
    @media (min-width: 1024px) {
        padding: 28px 24px;
        max-width: 1200px;
    }
    
    @media (min-width: 1280px) {
        padding: 30px;
    }
}

.calendar-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 -5px 15px;
    padding: 0 5px;
    flex-wrap: wrap;
    gap: 8px;
    
    @media (max-width: 767px) {
        margin-bottom: 12px;
    }
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #5c3a1f;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 8px;
    text-align: center;
    flex: 1;
    min-width: 180px;
    display: none; /* Hide by default on mobile */
    
    @media (min-width: 768px) {
        display: block; /* Show on tablets and larger */
        font-size: 1.6rem;
        letter-spacing: 0.5px;
        padding-bottom: 10px;
    }
}

.calendar-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #8b5a2b, #c0a062);
}

.calendar-header button {
    background: none;
    border: 2px solid #8b5a2b;
    font-size: 1rem;
    color: #8b5a2b;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.2s ease;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    
    @media (min-width: 480px) {
        min-width: 44px;
        height: 44px;
    }
    
    @media (min-width: 768px) {
        font-size: 1.2rem;
        padding: 5px 15px;
        border: none;
        min-width: auto;
        height: auto;
    }
}

.calendar-header button:hover {
    background-color: rgba(139, 90, 43, 0.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    margin: 0 0 15px;
    width: 100%;
    
    @media (min-width: 375px) {
        gap: 3px;
    }
    
    @media (min-width: 480px) {
        gap: 4px;
        margin-bottom: 20px;
    }
    
    @media (min-width: 640px) {
        gap: 6px;
    }
    
    @media (min-width: 768px) {
        gap: 8px;
        margin-bottom: 25px;
    }
    
    @media (min-width: 1024px) {
        gap: 10px;
        margin-bottom: 30px;
    }
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: #8b5a2b;
    padding: 8px 2px;
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.3px;
    
    @media (min-width: 375px) {
        font-size: 0.65rem;
        padding: 8px 0;
    }
    
    @media (min-width: 480px) {
        font-size: 0.7rem;
    }
    
    @media (min-width: 768px) {
        font-size: 0.8rem;
        padding: 10px 0;
        letter-spacing: 1px;
    }
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    font-weight: 500;
    color: #333;
    margin: 0;
    padding: 3px;
    font-size: 0.85rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 40px;
    border-radius: 4px;
    
    @media (min-width: 375px) {
        padding: 4px;
        font-size: 0.9rem;
    }
    
    @media (min-width: 480px) {
        padding: 6px;
        font-size: 1rem;
    }
    
    @media (min-width: 768px) {
        padding: 8px;
        margin: 2px;
        border: 1px solid transparent;
    }
}

.calendar-day:active,
.calendar-day:focus,
.calendar-day:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Remove hover effect on touch devices */
@media (hover: none) {
    .calendar-day:hover {
        transform: none;
        box-shadow: none;
    }
}

.calendar-day.today {
    background: linear-gradient(135deg, #fffaf6, #faf0dc);
    color: #5c3a1f;
    font-weight: 700;
    border: 1px solid rgba(139, 90, 43, 0.2);
    box-shadow: 0 2px 4px rgba(139, 90, 43, 0.15);
    transform: none;
    border-radius: 6px;
    
    @media (min-width: 768px) {
        transform: scale(1.05);
        border-radius: 20px;
        border: none;
        box-shadow: 0 4px 8px rgba(139, 90, 43, 0.2);
    }
}

.calendar-day.today.has-events::after {
    background-color: white;
    box-shadow: 0 0 0 2px white;
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 6px;
    height: 6px;
    background-color: #8b5a2b;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.calendar-day:hover::after {
    transform: scale(1.5);
    background-color: #c0a062;
}

.calendar-day.other-month {
    color: #ccc;
    background-color: #fafafa;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #dee7d3, #fcd9b9);
    color: #5c3a1f;
    font-weight: 700;
    border: 1px solid rgba(107, 140, 66, 0.3);
    transform: none;
    box-shadow: 0 2px 6px rgba(107, 140, 66, 0.2);
    z-index: 2;
    border-radius: 6px;
    
    @media (min-width: 768px) {
        transform: scale(1.1);
        border-radius: 20px;
        border: none;
        box-shadow: 0 4px 12px rgba(107, 140, 66, 0.3);
    }
}

.calendar-day.selected.has-events::after {
    background-color: white;
}

.calendar-events {
    background-color: #fff9f3;
    border-radius: 6px;
    padding: 15px 12px;
    border: 1px solid #f0e6d9;
    margin: 0 -10px 15px;
    
    @media (min-width: 480px) {
        border-radius: 8px;
        padding: 15px;
        margin: 0 0 20px;
    }
    
    @media (min-width: 768px) {
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 20px;
    }
}

.calendar-events h4 {
    color: #8b5a2b;
    margin-top: 0;
    padding-bottom: 12px;
    
    /* Hide on mobile */
    @media (max-width: 767px) {
        display: none;
    }
    border-bottom: 1px solid #f0e6d9;
    margin-bottom: 12px;
    font-size: 1.1rem;
    
    @media (min-width: 480px) {
        padding-bottom: 15px;
        margin-bottom: 15px;
        font-size: 1.2rem;
    }
}

.calendar-events h4 span {
    font-weight: normal;
    color: #666;
}

.events-list {
    min-height: 100px;
}

.event-item {
    padding: 15px;
    border-radius: 8px;
    background: white;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 3px solid #8b5a2b;
}

.event-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.event-item:last-child {
    border-bottom: none;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.event-title {
    font-size: 14px;
    color: #5c3a1f;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.event-time, 
.event-date,
.event-location,
.event-artists {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 6px;
}

.event-time i,
.event-date i,
.event-location i,
.event-artists i {
    color: #8b5a2b;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.event-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px dashed #eee;
    border-bottom: 1px dashed #eee;
}

.event-link {
    display: inline-flex;
    align-items: center;
    color: #8b5a2b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.event-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.event-link:hover {
    color: #5c3a1f;
    text-decoration: underline;
}

.event-link:hover i {
    transform: translateX(3px);
}

.no-events {
    text-align: center;
    padding: 30px 0;
    color: #888;
}

.no-events i {
    font-size: 2.5rem;
    color: #d4c4a6;
    margin-bottom: 15px;
    display: block;
}

.no-events p {
    margin-bottom: 15px;
}

.error-message {
    background: #fff5f5;
    border-left: 4px solid #ff4d4f;
    padding: 15px;
    border-radius: 4px;
    color: #ff4d4f;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.error-message p {
    margin: 0;
    font-size: 0.95rem;
}

.event-title {
    font-weight: 500;
    color: #333;
    margin: 0;
}



.no-events {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* View All Events Button */
.view-all-events {
    text-align: center;
    margin-top: 25px;
}

.view-all-events .btn {
    background: linear-gradient(135deg, #8b5a2b, #c0a062);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.2);
}

.view-all-events .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 43, 0.3);
    background: linear-gradient(135deg, #7a4f1d, #9b6d2f);
}

/* Responsive styles */
@media (max-width: 768px) {
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        font-size: 0.85rem;
        margin: 1px;
    }
    
    .calendar-container {
        padding: 15px 10px;
    }
    
    .calendar-header h3 {
        font-size: 1.3rem;
    }
    
    .event-item {
        padding: 10px;
    }
    
    /* Hide event preview and count on mobile */
    .event-preview,
    .event-count {
        display: none !important;
    }
}

/* Animation for calendar day hover */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.calendar-day:hover {
    animation: pulse 0.5s ease;
    background-color: #f9f5f0;
    border-color: #e0d0c0;
    color: #5c3a1f;
}

/* Animation for calendar day hover */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.calendar-day:hover {
    animation: pulse 0.5s ease;
}
