/* Sidebar Plugin Styles */
body {
    transition: margin-right 0.3s ease;
}

body.sidebar-active {
    margin-right: 400px;
}

/* Push content when sidebar is closed (desktop only) */
@media (min-width: 1200px) {
    body:not(.sidebar-active) {
        margin-right: 80px;
    }
}

.sidebar-plugin {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.sidebar-plugin.active {
    transform: translateX(0);
}

.sidebar-toggle-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10000;
    text-align: right;
    pointer-events: none;
    transition: all 0.3s ease;
}

@media (min-width: 1200px) {
    .sidebar-toggle-wrapper {
        top: 0px !important;
        right: 0;
        width: 80px;
        height: 100vh;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 30px;
        background: rgba(255, 255, 255, 0.95);
        border-left: 1px solid #e5e5e5;
    }
    
    body.sidebar-active .sidebar-toggle-wrapper {
      
        right: auto !important;
        left: calc(100vw - 332px) !important;
        transform: translateX(-50%) !important;
        width: auto;
        height: auto;
        padding-top: 30px;
        background: transparent;
        border-left: none;
    }
}

.sidebar-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    background: #fff;
    color: #333;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    pointer-events: auto;
    padding: 0;
}

.sidebar-toggle .toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.sidebar-toggle .toggle-icon i {
    font-size: 24px;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sidebar-toggle .toggle-icon-img {
    max-width: 24px;
    max-height: 24px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sidebar-toggle .toggle-text {
    display: none;
    position: relative;
    z-index: 1;
    line-height: 1;
}

/* Desktop icons visible by default, mobile icons hidden */
.sidebar-toggle .toggle-icon-desktop {
    display: block;
}

.sidebar-toggle .toggle-icon-mobile {
    display: none;
}

/* Toggle Icon States */
.sidebar-toggle .toggle-icon-closed {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

body.sidebar-active .sidebar-toggle .toggle-icon-closed {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.sidebar-toggle .toggle-icon-open {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

body.sidebar-active .sidebar-toggle .toggle-icon-open {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.sidebar-toggle:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.sidebar-content {
    padding: 20px;
}

@media (min-width: 1200px) {
    .sidebar-content {
        margin-top: 80px;
    }
}

.sidebar-inner {
    max-width: 100%;
}

/* Section Styles */
.sidebar-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.view-all {
    font-size: 14px;
    color: #666 !important;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.view-all:hover {
    color: #333 !important;
    text-decoration: none;
}

/* Event Card */
.event-card {
    background: #000;
    color: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
}

.event-date {
    text-align: center;
    min-width: 60px;
    border-right: 0.5px solid #626262;
    padding-right: 16px;
}

.date-day {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 12px;
    margin-top: 5px;
}

.event-content {
    flex: 1;
}

.event-time {
    font-size: 16px;
    margin-bottom: 5px;
}

.event-title {
    font-size: 16px;
    line-height: 1.4;
}

/* Event Carousel */
.event-carousel-wrapper {
    position: relative;
    overflow: visible;
   
}

.event-carousel {
    position: relative;
    min-height: 120px;
    overflow: hidden;
}

.event-carousel .event-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.6s ease;
    will-change: transform, opacity;
}

.event-carousel .event-card.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.6s ease;
}

.event-bullets {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 0px;
    padding: 5px 0;
}

.event-bullets .bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cccccc;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.event-bullets .bullet:hover {
    background: #999999;
    transform: scale(1.3);
}

.event-bullets .bullet.active {
    background: #333333;
    width: 24px;
    border-radius: 5px;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    column-gap: 0;
}

.cat-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.cat-btn:hover {
    background: #f5f5f5;
}

.cat-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Documents List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    transition: all 0.2s;
}

.document-item.hidden {
    display: none;
}

.document-item:hover {
    background: #ebebeb;
}

.doc-icon {
    width: 38px;
    height: 50px;
    background: #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

.doc-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.doc-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.doc-download {
    width: 24px;
    height: 24px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    color: #666;
    flex-shrink: 0;
    transition: all 0.2s;
    border: none;
    position: relative;
}

.doc-download:hover {
    background: transparent;
    color: #667eea;
    transform: scale(1.2);
}

.doc-download img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.doc-download i {
    font-size: 20px;
}

/* Responsive - Bottom sheet for screens < 1200px */
@media (max-width: 1199px) {
    body.sidebar-active {
        margin-right: 0;
        margin-top: 0;
    }
    
    .sidebar-plugin {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100% !important;
        max-width: 100%;
        height: 85vh;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar-plugin.active {
        transform: translateY(0) !important;
        border: 1px solid #eee;
    }
    
    /* Drag handle at top of panel */
    .sidebar-plugin::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
    }
    
    .sidebar-content {
        padding-top: 30px;
    }
    
    /* Outside toggle button for mobile */
    .sidebar-toggle-wrapper {
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        left: auto;
        text-align: right;
        transition: all 0.3s ease;
        transform: none;
        z-index: 10001;
    }
    
    /* When sidebar is active, move button to top right of sidebar */
    body.sidebar-active .sidebar-toggle-wrapper {
        bottom: auto;
        top: 100px;
        right: 20px;
        left: auto;
        transform: none;
    }
    
    .sidebar-toggle {
        width: auto;
        min-width: 200px;
        height: 56px;
        padding: 0 24px;
        border-radius: 28px;
        border: none;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font-size: 18px;
        font-weight: 500;
        position: relative;
    }
    
    .sidebar-toggle .toggle-text {
        display: inline-block !important;
        white-space: nowrap;
    }
    
    /* When sidebar is active, make button smaller and circular */
    body.sidebar-active .sidebar-toggle {
        min-width: 60px !important;
        width: 60px !important;
        height: 60px !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    
    /* Hide text when sidebar is active */
    body.sidebar-active .sidebar-toggle .toggle-text {
        display: none !important;
    }
    
    /* Show only close icon when sidebar is active */
    body.sidebar-active .sidebar-toggle .toggle-icon-closed {
        display: none !important;
    }
    
    body.sidebar-active .sidebar-toggle .toggle-icon-open {
        display: flex !important;
        opacity: 1 !important;
        position: relative !important;
    }
    
    .sidebar-toggle .toggle-icon {
        position: relative;
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .sidebar-toggle .toggle-text {
        display: inline-block !important;
        white-space: nowrap;
    }
    
    /* Show mobile icons, hide desktop icons */
    .sidebar-toggle .toggle-icon-desktop {
        display: none !important;
    }
    
    .sidebar-toggle .toggle-icon-mobile {
        display: block !important;
    }


}

/* Mobile adjustments */
@media (max-width: 768px) {
    .sidebar-plugin {
        height: 90vh;
        max-height: 90vh;
    }
    .event-date {
        padding-right: 0;
        border-right: 0;
  
}
    
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .event-date {
        margin: 0 auto;
    }
    
    .category-filter {
        row-gap: 8px;
    }
    
    .cat-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .sidebar-toggle {
        min-width: 180px;
        font-size: 16px;
    }
}

