/* Navigation Grid - Force LTR visual flow for the 4 primary cards even in Hebrew mode */
.nav-container {
    max-width: 1100px;
    margin: 1.5rem auto 2rem auto; /* Sits cleanly below the banner with no overlap */
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}
.nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    direction: ltr;
}

.nav-card {
    background-color: #2c4a5e;
    color: #ffffff;
    border-radius: 8px;
    padding: 2rem 1rem 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-card:hover {
    background-color: #1e3545;
    transform: translateY(-4px);
}

.nav-card .icon-svg {
    width: 68px;
    height: 68px;
    margin-bottom: 1.25rem;
    color: #ffffff;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.nav-card .title-en {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.nav-card .title-he {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Fullscreen Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 100%;
    max-width: 950px;
    height: 85vh;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-header {
    padding: 1rem 1.5rem;
    background: #2c4a5e;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-iframe {
    width: 100%;
    flex-grow: 1;
    border: none;
}

/* Modal Content & Typography Sizing */
#modalDynamicContent article {
    font-size: 0.95rem;
    padding: 1rem !important;
}

#modalDynamicContent h2 {
    font-size: 1.3rem !important;
}

#modalDynamicContent h3 {
    font-size: 1.1rem !important;
}

/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.25s ease, transform 0.3s ease;
}

.gallery-item:hover img {
    opacity: 1;
    transform: scale(1.03);
}

.gallery-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    padding: 1rem 0.75rem 0.75rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
}