/* Public Styles - Square Edges, Simple & Clean */
.egp-calendar {max-width:1200px;margin:0 auto;padding:20px;}

/* View Toggles */
.view-toggles {display:flex;gap:0;margin-bottom:20px;background:#f5f5f5;padding:3px;width:fit-content;}
.view-btn {padding:8px 20px;background:transparent;color:#757575;text-decoration:none;font-weight:600;font-size:14px;transition:all 0.2s;}
.view-btn:hover {color:#668fbb;}
.view-btn.active {background:#fff;color:#668fbb;}

/* Legend */
.legend {background:#fff;padding:15px 20px;margin-bottom:20px;border:1px solid #eee;}
.legend h3 {margin:0 0 10px 0;font-size:14px;font-weight:700;}
.legend ul {display:flex;flex-wrap:wrap;gap:15px;list-style:none;margin:0;padding:0;}
.legend li {display:flex;align-items:center;gap:8px;font-size:13px;}
.legend .color-box {width:16px;height:16px;border:1px solid rgba(0,0,0,0.1);}

/* Calendar Navigation */
.calendar-nav {display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;}
.calendar-nav h2 {margin:0;font-size:20px;font-weight:700;}
.nav-btn {padding:8px 15px;background:#fff;border:1px solid #ddd;color:#333;text-decoration:none;font-size:18px;font-weight:bold;}
.nav-btn:hover {background:#668fbb;color:#fff;border-color:#668fbb;}

/* Calendar Grid */
/* Calendar Grid - Fixed Heights */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: #fff;
    padding: 15px;
    border: 1px solid #eee;
    grid-auto-rows: minmax(120px, 1fr); /* Consistent row height */
}

.calendar-cell {
    min-height: 120px; /* Fixed minimum height */
    height: 100%;
    padding: 8px;
    background: #fafafa;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-cell.empty {
    background: transparent;
    border: none;
}

.calendar-cell.today {
    background: #e3f2fd;
    border: 2px solid #668fbb;
}

.day-number {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    flex-shrink: 0; /* Don't shrink */
}

.cell-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1; /* Take remaining space */
    min-height: 0; /* Allow shrinking */
    overflow: hidden;
}

.cell-event {
    display: block;
    padding: 4px 6px;
    font-size: 10px;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    border-radius: 2px;
    flex-shrink: 0; /* Don't shrink individual events */
}

/* Limit events and add scroll if needed */
.cell-events {
    max-height: 80px;
    overflow-y: auto;
}

.cell-events::-webkit-scrollbar {
    width: 4px;
}

.cell-events::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cell-events::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

/* Smart event limiting */
.calendar-cell.event-overflow .cell-event:nth-child(n+4) {
    display: none; /* Hide events beyond 3 */
}

.calendar-cell.event-overflow .cell-event.more-events {
    display: block !important;
    background: rgba(0,0,0,0.5) !important;
    font-style: italic;
    text-align: center;
}

/* List View */
.list-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.event-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-date {
    color: #668fbb;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.event-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.event-content h3 a {
    color: #000;
    text-decoration: none;
}

.event-content h3 a:hover {
    color: #668fbb;
}

.event-venue {
    color: #757575;
    font-size: 14px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

@media (max-width: 768px) {
    .list-view {
        grid-template-columns: 1fr;
    }
    
    .event-card {
        flex-direction: column;
    }
}

/* Single Event Page */
/* Single Event Page Layout */
.egp-single-event {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.egp-event-header {
    margin-bottom: 30px;
    text-align: center;
}

.egp-event-title {
    font-size: 2.5rem;
    margin: 0;
    color: #333;
}

.egp-event-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.egp-event-image {
    width: 100%;
}

.egp-event-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.egp-event-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.egp-event-meta {
    background: #fff;
    padding: 25px;
    border-left: 4px solid #668fbb;
    border: 1px solid #eee;
    border-radius: 8px;
}

.meta-item {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 16px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item strong {
    color: #333;
    min-width: 100px;
    display: inline-block;
}

.egp-event-description {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    line-height: 1.8;
    font-size: 16px;
}

.egp-back-button {
    text-align: center;
    margin-top: 40px;
}

.egp-back-link {
    display: inline-block;
    padding: 12px 30px;
    background: #668fbb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.egp-back-link:hover {
    background: #fff;
}

@media (max-width: 768px) {
    .egp-event-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .egp-event-title {
        font-size: 2rem;
    }
}

/* Gallery Section */
.egp-gallery-section {margin-top:40px;}
.egp-gallery-section h2 {font-size:24px;margin-bottom:20px;}
.egp-gallery-grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));gap:15px;}
.gallery-item {aspect-ratio:1;overflow:hidden;cursor:pointer;border:1px solid #eee;}
.gallery-item:hover {opacity:0.9;}
.gallery-item img {width:100%;height:100%;object-fit:cover;}

/* Child Events */
.egp-children-section {margin-top:40px;}
.egp-children-section h2 {font-size:24px;margin-bottom:20px;}
.egp-children-grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(250px, 1fr));gap:20px;}
.child-card {background:#fff;border:1px solid #eee;overflow:hidden;text-decoration:none;display:block;}
.child-card:hover {border-color:#668fbb;}
.child-image {height:180px;overflow:hidden;}
.child-image img {width:100%;height:100%;object-fit:cover;}
.child-info {padding:15px;}
.child-info h3 {margin:0 0 8px 0;font-size:16px;color:#000;}
.photo-count {display:inline-block;background:#668fbb;color:#fff;padding:3px 10px;font-size:12px;font-weight:600;}

/* Galleries Page */
.galleries-container {max-width:1200px;margin:0 auto;padding:20px;}
.galleries-container h2 {font-size:28px;margin-bottom:30px;}
.galleries-grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));gap:20px;}
.gallery-card {background:#fff;border:1px solid #eee;overflow:hidden;text-decoration:none;display:block;}
.gallery-card:hover {border-color:#668fbb;}
.gallery-image {height:200px;overflow:hidden;}
.gallery-image img {width:100%;height:100%;object-fit:cover;}
.gallery-info {padding:15px;}
.gallery-info h3 {margin:0 0 8px 0;font-size:18px;color:#000;}
.gallery-info .count {display:inline-block;background:#668fbb;color:#fff;padding:3px 10px;font-size:12px;font-weight:600;}

/* Lightbox */
/* Lightbox - Improved Styling */
.egp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.95);
}

.egp-lightbox.active {
    display: block;
}

.egp-lightbox-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.egp-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.egp-lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.egp-lightbox-close, 
.egp-lightbox-prev, 
.egp-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
}

.egp-lightbox-close:hover, 
.egp-lightbox-prev:hover, 
.egp-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.egp-lightbox-close {
    top: 30px;
    right: 30px;
}

.egp-lightbox-prev {
    left: 30px;
}

.egp-lightbox-next {
    right: 30px;
}

.egp-lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,0.7);
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    text-align: center;
}

/* Make gallery items more clickable */
.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Prevent body scroll when lightbox is open */
body.egp-lightbox-open {
    overflow: hidden;
}
@media (max-width: 768px) {
    .calendar-grid {gap:2px;padding:10px;}
    .calendar-cell {min-height:60px;padding:3px;}
    .event-card {grid-template-columns:1fr;}
    .event-image {width:100%;height:200px;}
    .egp-gallery-grid, .egp-children-grid, .galleries-grid {grid-template-columns:1fr;}
}


