/* ===== General Styles ===== */
body {
    font-family: Arial, sans-serif;
    background-color: #F1E4B2;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 80px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #1D1D1B;
    text-align: center;
}

/* ===== Calendar Header ===== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px; /* Adjusted padding */
}

.arrow-btn {
    background-color: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #1D1D1B;
}

/* ===== Event Container ===== */
.event-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

/* ===== Calendar ===== */
.calendar {
    border: 1px solid #cabaef;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 48%; /* Adjusted width */
    padding: 10px;
}

.days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.day-header {
    font-weight: bold;
    padding: 10px 0;
    color: #1D1D1B;
}

.days-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    gap: 5px;
}

.day-cell {
    position: relative;
    padding: 10px;
    text-align: center;
    background-color: #fcd199;
    cursor: pointer;
    border-radius: 5px;
}

.event-dot {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #FB91A3; /* Default color */
}

/* Color codes for event types */
.masterclass .event-dot {
    background-color: #ceadcf;
}

.taller .event-dot {
    background-color: #FB91A3;
}

.venta .event-dot {
    background-color: #C4D4A4;
}

/* ===== Event List ===== */
.event-list {
    width: 48%; /* Adjusted width */
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.masterclass {
    background-color: #ceadcf;
}

.taller {
    background-color: #FB91A3;
}

.venta {
    background-color: #C4D4A4;
}

.event-item:hover {
    opacity: 0.8;
}

/* ===== Popup ===== */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    z-index: 1;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 60%;
    max-height: 80%;
    text-align: center;
}

.popup img {
    width: 100%;
    border-radius: 5px;
}

.popup a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    background-color: #FB91A3;
    font-weight: bold;
}

.popup a.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.popup button {
    margin-top: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #FCD199;
}

.popup button:hover {
    background-color: #ceadcf;
    text-decoration: none;
}

.popup .close {
    top: 10px;
    right: 10px;
    background-color: #FB91A3;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.popup .close:hover {
    background-color: #ceadcf;
}

.hidden {
    visibility: hidden;
    opacity: 0;
}

.popup:not(.hidden) {
    visibility: visible;
    opacity: 1;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
    .event-container {
        flex-direction: column;
        align-items: center;
    }

    .calendar,
    .event-list {
        width: 100%; /* Full width on small screens */
        max-width: 500px; /* Keep reasonable size */
    }

    .calendar-header {
        width: 100%; /* Full width on small screens */
        padding: 0 10px; /* Adjusted padding */
    }

    .container {
        margin-top: 120px; /* Adjusted margin for header */
    }
}