:root {
    --bg-color: #f8f9fa; /* Cool White */
    --card-bg: #ffffff;
    --text-primary: #0f2027; /* Rich Blue */
    --text-secondary: #546e7a; /* Blue Gray */
    --accent-color: #C5A059; /* Muted/Classy Gold */
    --accent-dark: #0f2027; /* Rich Blue */
    --gold: #C5A059;
    --font-heading: 'futura', sans-serif;
    --font-body: 'proxima-nova', sans-serif;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(15, 32, 39, 0.08);
}

.address-link {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-secondary);
    transition: all 0.3s ease;
}

.address-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.85) 0%, rgba(32, 58, 67, 0.8) 50%, rgba(44, 83, 100, 0.85) 100%), 
                url('https://jewishlink.news/wp-content/uploads/L1090729.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bs-d {
    position: absolute;
    top: 15px;
    right: 25px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-family: var(--font-body);
    z-index: 20;
    user-select: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-color);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.5);
}

.hero-text p.hero-project {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.85;
    margin-bottom: 0;
    margin-top: 30px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 1;
    font-family: var(--font-heading);
    margin-bottom: 35px;
    text-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(15, 32, 39, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid rgba(197, 160, 89, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-subtitle i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.hero-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-text p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid rgba(255,255,255,0.5);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.hero-link:hover {
    border-bottom-color: #fff;
    opacity: 1;
}

.hero-link i {
    margin-left: 8px;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

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

/* Search/Filter Bar */
.search-bar-container {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}

.search-bar {
    background: var(--card-bg);
    padding: 25px 40px;
    border-radius: 60px;
    box-shadow: 0 15px 40px rgba(15, 32, 39, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 850px;
    margin: 0 auto;
    gap: 40px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.filter-divider {
    width: 1px;
    height: 50px;
    background-color: #e0e0e0;
}

label {
    font-weight: 700;
    color: var(--accent-dark);
    font-family: var(--font-heading);
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 10px;
}

select {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background-color: #fcfcfc;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23C5A059%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 20px top 50%;
    background-size: 10px auto;
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15);
}

/* Events Container */
.events-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-bottom: 80px;
}

.date-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* Slightly smaller min-width */
    gap: 20px; /* Reduced gap */
    margin-bottom: 20px;
}

.date-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-color);
    padding: 15px 0;
    overflow: visible;
}

.date-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Collapsed: fixed small height, hide overflow */
.date-header.collapsed {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    height: 50px;
    overflow: hidden;
}

.date-header.collapsed .date-header-content {
    flex-direction: row;
    gap: 12px;
    height: 100%;
}

.date-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent-dark);
    display: inline-block;
    padding: 0 20px;
    background: var(--bg-color);
    position: relative;
    z-index: 1;
}

.date-header.collapsed h2 {
    font-size: 1.3rem;
    padding: 0;
    background: transparent;
}

.date-header::before,
.date-header::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

.date-header::before {
    left: 0;
    right: calc(50% + 180px);
}

.date-header::after {
    right: 0;
    left: calc(50% + 180px);
}

.date-header.collapsed::before,
.date-header.collapsed::after {
    display: none;
}

.date-subheader {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.date-header.collapsed .date-subheader {
    display: none;
}

.menorah-icon {
    display: block;
    margin: 0 auto 15px;
    height: 70px;
    width: auto;
    filter: sepia(1) saturate(1.8) hue-rotate(5deg) brightness(0.85) contrast(1.2);
}

.date-header.collapsed .menorah-icon {
    height: 32px;
    margin: 0;
}

/* Event Card */
.event-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px; /* Reduced padding */
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px; /* Reduced gap */
    border: 1px solid rgba(0,0,0,0.03);
    height: 100%;
}

.event-main {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Reduced gap */
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.5rem; /* Slightly smaller */
    color: var(--accent-dark);
    line-height: 1.2;
    font-weight: 700;
}

.event-host {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced gap */
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.location-item {
    align-items: flex-start;
}

.location-details {
    display: flex;
    flex-direction: column;
}

.location-name {
    font-weight: 600;
    color: var(--text-primary);
}

.meta-icon {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.event-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
    padding-top: 15px; /* Reduced padding */
    border-top: 1px solid #f0f0f0;
}

.btn {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: none;
    padding: 0;
    border-bottom: 2px solid transparent;
}

.btn:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

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

.btn:hover i {
    transform: translateX(4px);
}

.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-credits {
    margin-top: 15px;
    font-size: 0.8rem;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .date-group {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        flex-direction: column;
        border-radius: 30px;
        padding: 30px;
        gap: 20px;
    }
    
    .filter-divider {
        width: 100%;
        height: 1px;
    }
}
