.hero-collage {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding:1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: grid;
    align-items: stretch;
    gap: 1rem;
}

.location-collage {
    margin-bottom: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.default-section { grid-column: span 1; }

.location-header {
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding: 15px 20px;
    background: #e9ecef;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.location-header::before {
    content: "🏪";
    font-size: 1.5em;
    margin-right: 8px;
}

.location-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.location-header:hover .location-title {
    color: #007bff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.collage-layout {
    flex: 1;
    display: flex;
    gap: 0.7rem;
}

.collage-layout.multi {
    flex-direction: row;
    align-items: stretch;
}

.collage-layout.single {
    flex-direction: column;
}

.promo-card {
    position: relative;
    background: white;
    border-radius: 0.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.promo-hero {
    flex: 2;
}

.promo-hero .promo-image-wrapper {
    min-height: 4rem;
}

.collage-layout.single .promo-hero {
    flex: none;
}

.subs-scroller {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.scroll-btn {
    flex: none;
    width: 100%;
    height: 50px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 0;
    font-size: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    z-index: 2;
    position: relative;
    overflow: hidden;
}

.scroll-up {
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.scroll-down {
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}

.scroll-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    z-index: 3;
}

.scroll-up::before {
    border-bottom: 20px solid white;
}

.scroll-down::before {
    border-top: 20px solid white;
}

.scroll-btn:hover:not(:disabled) {
    background: rgba(0, 123, 255, 1);
    transform: scale(1.05);
}

.scroll-btn:disabled {
    background: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
}

.scroll-btn:disabled::before {
    border-bottom-color: transparent;
    border-top-color: transparent;
}

.subs-container {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    flex-direction: column;
    max-height: 10rem;
}

.promo-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius:0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.promo-image-wrapper a:first-child {
    display: block;
    width: 100%;
    height: 100%;
}

.promo-image-wrapper img {
    width: 100%;
    height: 100%;
    border-radius:0.5rem;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.promo-card:hover .promo-image-wrapper img {
    transform: scale(1.05);
}

.pdf-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s ease;
    z-index: 1;
}

.pdf-icon img {
    width: 20px;
    height: 20px;
}

.pdf-icon:hover {
    background: rgba(0, 0, 0, 0.8);
}

.location-filter {
    max-width: 350px;
    margin: 0 auto 1rem auto;
    position: relative;
    z-index: 10;
}

.location-dropdown-toggle {
    width:100%;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    color: #212529;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content:center;
    font-size: 1.2rem;
    min-height: 45px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.location-dropdown-toggle:hover {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.selected-count {
    background: #007bff;
    color: #fff;
    padding: 0.3em 0.7em;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.location-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 100%;
    padding: 1rem 2rem;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
}

.location-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    padding: 1rem;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.2rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #16181b;
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.select-all-btn,
.clear-all-btn {
    background: none;
    border: none;
    width: 100%;
    text-align: center;
    font-weight: 500;
    color: #007bff;
}

.select-all-btn:hover,
.clear-all-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal.show {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    max-width: 90%;
    max-height: 90%;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

.modal-body {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal-image,
#modal-pdf {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    touch-action: pinch-zoom;
    user-select: none;
    -webkit-user-drag: none;
}

#modal-pdf {
    border: none;
    background: white;
}

.image-modal img {
    touch-action: manipulation pinch-zoom;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    margin: 0 auto 1rem auto;
    position: relative;
    z-index: 10;
}

.date-header {
    flex: 1;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0;
}

.digital-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 45px;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    color: #212529;
    font-size: 1.2rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: 'sans-serif';
    letter-spacing: 1px;
    box-sizing: border-box;
}

.location-filter {
    flex: 1;
    max-width: none;
    margin: 0;
    position: relative;
    z-index: 10;
}

.location-dropdown-toggle {
    width: 100%;
    height: 45px;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    color: #212529;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.digital-clock:hover,
.digital-clock:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

@media (max-width: 479px) {
    .hero-collage {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .location-collage {
        padding:0.5rem;
    }
    .collage-layout .promo-image-wrapper {
        padding: 0.5rem;
    }
    .location-header::before {
        display:none;
    }

    .filter-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .date-header,
    .location-filter {
        flex: none;
    }

    .digital-clock,
    .location-dropdown-toggle {
        height: 40px;
        font-size: 1rem;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .hero-collage {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .collage-layout {
        gap: 0.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-collage {
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
