/* Reset basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Rubik", sans-serif;
    font-weight: lighter;
    background-color: #fff;
    color: #000;
}


.mainframe {
    margin: 0px 0px 100px 0px;
    text-align: center;
}

.TitlePicture {
    background-image: url("resources/Events.jpeg");
    background-size: cover;
    background-position: 50% 50%;
    height: 800px;
    width: 100%;
    position: relative;    /* enable absolute positioning for children */
    display: flex;
    align-items: center;
    justify-content: center;
}

.TitleText {
    z-index: 2; /* ensure text is above the background */
    color: white;
    text-align: left;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1;
    text-align: center;
}

.overview-container{
    display: flex;
    align-items: center;
    padding: 60px 30px 30px 30px;
    position: relative;
    flex-direction: column;
}
.overview-container h1{
    position: absolute;
    top: 20px;
    left: 0;
    text-align: center;
    margin: 0;
}

.nachfolge-beschreibung {
    width: 90%;
    line-height: 1.5;
    padding-left: 30px;
    font-weight: 350;
}

.days-container {
    text-align: left;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 25px;
    padding: 20px;
    box-shadow:  0px 0px 20px 1px rgb(231, 231, 231);
    
    /* Folding card animation setup */
    opacity: 0;
    transform: perspective(1000px) rotateX(-15deg) translateY(30px);
    transform-origin: top center;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.days-container.fold-in {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0);
}

.calendar-menu{
    width: 400px;
    max-width: 90%;
    height: 60px;
    background-color: #e9ecef;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: 40px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.calendar-menu-item{
    height: 100%;
    border-radius: 50px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.calendar-menu-item.active {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.calendar-menu-link {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.calendar-menu-item.active .calendar-menu-link {
    color: #333;
    font-weight: 600;
}

.calendar-menu-link:hover {
    color: #333;
}
.legend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    text-align: center;
    align-items: center;
    justify-content: center;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin:10px
}
.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #6c757d; /* Default color */
}
.legend-text {
    font-size: 14px;
    color: #495057;
}

/* Content container for view switching */
.content-container {
    position: relative;
    overflow: hidden;
    margin: 5%;
}

.zoom-btn{
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    width: 200px;
    height: 50px;
    background-color: #007bff;
    padding: 20px;
    color: white;
    border: none;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.zoom-btn:hover {
    background-color: #0056b3;
}

.view-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.view-content.active {
    position: relative;
    transform: translateX(0);
    pointer-events: auto;
}

.view-content.slide-out-left {
    transform: translateX(-100%);
}

.view-content.slide-out-right {
    transform: translateX(100%);
}

.view-content.slide-in-right {
    transform: translateX(100%);
}

.view-content.slide-in-left {
    transform: translateX(-100%);
}

/* Initial state for overview (first view) */
.overview-view {
    transform: translateX(0);
}

/* Calendar view starts off-screen */
.calendar-view {
    transform: translateX(100%);
}

/* Mobile responsive for calendar menu */
@media (max-width: 768px) {
    .calendar-menu {
        width: 95%;
        height: 50px;
        padding: 6px;
        margin: 20px auto;
    }
    
    .calendar-menu-link {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .calendar-menu {
        width: 98%;
        height: 45px;
        padding: 5px;
        flex-wrap: wrap;
        height: auto;
        border-radius: 25px;
    }
    
    .calendar-menu-item {
        flex: 1;
        min-width: calc(50% - 4px);
        margin: 2px;
        height: 35px;
        border-radius: 25px;
    }
    
    .calendar-menu-link {
        font-size: 11px;
        padding: 6px 8px;
    }
}

.calendar-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Rubik', sans-serif;
}

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

.calendar-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.calendar-nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.calendar-day-header {
    background: #343a40;
    color: white;
    padding: 20px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 12px;
    position: relative;
    transition: background-color 0.2s ease;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background: #e3f2fd;
    border: 2px solid #1976d2;
}

.day-number {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.other-month .day-number {
    color: #adb5bd;
}

.today .day-number {
    color: #1976d2;
}

.event-item {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-item:hover {
    transform: translateY(-1px);
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-more {
    color: #6c757d;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    margin-top: 4px;
}

/* Event Modal */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.0);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.event-modal-content {
    text-align: left;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.modal-details {
    margin-bottom: 10px;
    color: #666;
}

.modal-details strong {
    color: #333;
}

/* Responsive */


@media (max-width: 960px) {

    html, body {
        width: 100vw;
        overflow-x: hidden;
        margin: 0 !important;
        padding: 0 !important;
    }
    .mainframe,
    .TitlePicture {
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .TitleText {
        font-size: 1em;
        max-width: 90%;
        padding: 0 10px;
        box-sizing: border-box;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        hyphens: auto;
        word-break: break-word;
    }
    .TitleText h1 {
        font-size: 1em;
        margin: 0;
    }
    .calendar-container {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .calendar-title {
        font-size: 24px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 8px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .event-item {
        font-size: 10px;
        padding: 2px 6px;
    }
    .nachfolge-beschreibung {
    width: 100%;

}
}


