.slide {
    flex-direction: row;
}

.showcase-content {
    width: 25%;
    min-width: 300px;
    flex: 0 0 25%;
    height: 100%;
}

.slide-image {
    height: 100%;
    width: auto;
}

/* --- Tablet & Small Desktop (max-width: 1100px) --- */
@media (max-width: 1100px) {
    :root {
        --page-pad: 5%;
    }

    /* Grid Adjustments */
    .lang-grid-columns {
        grid-template-columns: repeat(4, 1fr);
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-albums-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Header & Navigation --- */
    .topbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .logo-full {
        display: none;
    }

    .logo-short {
        display: block;
        font-size: 1.2rem;
        font-weight: 800;
        /*letter-spacing: 0.05em;*/
        white-space: nowrap;
    }

    /* Mobile Menu Container */
    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height));
        background: var(--color-blue-dark);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 1.5rem var(--page-pad) 8rem;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 998;
        overflow-y: auto;
        backdrop-filter: blur(5px);
        order: 3;
        grid-column: 1 / -1;
        box-shadow: none;
    }

    .main-nav.open {
        display: flex;
        right: 0;
    }

    .main-nav.slide-out {
        transform: translateX(-50%);
        opacity: 1;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Links in Mobile Menu */
    .main-nav a {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-bottom: 1px solid rgba(var(--color-white-rgb), 0.1);
        border-radius: 0;
        font-size: 1.1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .main-nav .cta {
        width: 100%;
        text-align: center;
    }

    .main-nav a[data-menu]::after {
        content: '›';
        font-size: 1.5rem;
        line-height: 1;
        margin-left: 0.5rem;
    }

    /* Burger Button */
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        width: 44px;
        height: 44px;
        border-radius: var(--radius-md);
        border: 1px solid transparent;
        background: rgba(var(--color-white-rgb), 0.06);
        justify-content: center;
        align-items: center;
        cursor: pointer;
        margin-left: auto;
        flex-shrink: 0;
        z-index: 1001;
        position: relative;
    }

    .nav-toggle span {
        height: 2px;
        width: 22px;
        background: var(--color-cream-white);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .logo-link {
        z-index: 1001;
        position: relative;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Header Tools */
    .header-tools {
        margin: 1rem 0 0;
        padding: 1rem 0 0;
        border: none;
        justify-content: center;
        width: 100%;
        height: auto;
    }

    .tool-toggle .icon {
        width: 44px;
        height: 44px;
    }

    /* Mega Menu Mobile */
    .mega-menu {
        position: fixed;
        top: calc(var(--header-height) - 1px);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height) + 1px);
        background: var(--color-blue-dark);
        z-index: 1200;
        overflow-y: auto;
        padding: 0;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        display: block;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: -5px 0 15px rgba(var(--color-black-rgb), 0.1);
    }

    .mega-menu.open {
        transform: translateX(0) !important;
    }

    .mega-menu::before {
        display: none;
    }

    .mobile-back-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 1.5rem var(--page-pad);
        background: var(--color-blue-dark);
        border: none;
        color: var(--color-cream-white);
        text-align: left;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        text-transform: uppercase;
        position: sticky;
        top: 0;
        z-index: 10;
        margin-bottom: 0;
    }

    .mobile-back-btn::before {
        content: '‹';
        font-size: 1.5rem;
        margin-right: 0.5rem;
    }

    .mega-menu__inner {
        padding-top: 0;
        padding-bottom: 100px;
        margin-top: 0;
    }

    .mega-menu__content {
        display: none;
        animation: none;
        padding-top: 0;
        margin-top: 0;
    }

    .mega-menu__content.active {
        display: grid;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Widgets */
    .header-search {
        flex-direction: column;
        gap: 1rem;
    }

    .header-search button {
        width: 100%;
        padding: 1rem;
    }

    .accessibility-widget {
        width: 100%;
        gap: 1.5rem;
    }

    .access-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .access-group {
        justify-content: space-between;
        width: 100%;
    }

    .reset-access-btn {
        width: 100%;
    }

    /* Reduce button size on mobile */
    .gbtn {
        width: 44px;
        height: 44px;
        opacity: 0.95;
    }

    .gbtn svg {
        width: 18px;
        height: 18px;
    }

    /* Adjust positioning for mobile - keep buttons visible */
    .gclose {
        top: 10px;
        right: 10px;
    }

    .gprev {
        left: 5px;
    }

    .gnext {
        right: 5px;
    }

    /* Reduce padding on mobile */
    .ginner-container {
        padding: 50px 10px !important;
    }

    /* Ensure image fits mobile screen with space for buttons */
    .gslide-image img {
        max-height: calc(100vh - 120px) !important;
        max-width: calc(100vw - 100px) !important;
    }
}

/* --- Mobile Devices (max-width: 768px) --- */
@media (max-width: 768px) {
    /* Components Reset */
    .slide {
        flex-direction: column;
    }

    .showcase-content {
        width: 100%;
        min-width: 0;
        flex: none;
        height: auto;
        max-height: 50%;
        line-height: 1.3;
    }

    .slide-image {
        height: auto;
        width: 100%;
    }

    /* Grids */
    .lang-grid-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-albums-grid {
        grid-template-columns: 1fr;
    }

    .image-list {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        text-align: center;
        gap: 2rem;
    }

    .footer-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .socials {
        justify-content: center;
        margin-top: 1rem;
    }

    .footer-content a {
        display: inline-block;
        padding: 5px 0;
    }

    .socials a {
        padding: 10px;
    }

    /* Hero */
    .hero {
        padding-top: 2rem;
    }

    /* Pagination */
    .pageList {
        gap: 0.35rem;
    }

    .pageList a {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .pageList li.control a {
        min-width: 40px;
        font-size: 1rem;
    }

    /* GLightbox Mobile */
    .gbtn {
        width: 44px;
        height: 44px;
        opacity: 0.95;
    }

    .gbtn svg {
        width: 18px;
        height: 18px;
    }

    .gclose {
        top: 10px;
        right: 10px;
    }

    .gprev {
        left: 5px;
    }

    .gnext {
        right: 5px;
    }

    .ginner-container {
        padding: 50px 10px !important;
    }

    .gslide-image img {
        max-height: calc(100vh - 120px) !important;
        max-width: calc(100vw - 100px) !important;
    }

    .search-result-link {
        padding: 1rem 1.2rem;
    }

    .search-result-title {
        font-size: 1rem;
    }
}
