/* =========================================================
 *  04. GLOBAL LAYOUT
 * = *======================================================== */
main,
footer {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

main {
    flex: 1;
}

article {
    margin-bottom: 2rem;
}

/* =========================================================
 *  06. HEADER
 * = *======================================================== */
header.site-header {
    max-width: 1200px;
    margin: 0 auto 1rem;
    width: 100%;
    background-color: var(--color-lightblue);
}

.header-inner {
    padding: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ----- Title strip ----- */
.title-box {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 1.75rem 0;
    text-align: center;
    background-color: var(--color-lightblue);
}

.title-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
    linear-gradient(
        135deg,
        rgba(47, 93, 156, 0.6),
                    rgba(30, 63, 111, 0.8)
    ),
    url("/img/nefelejcs.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.site-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
    font-family: var(--font-family-title);
    line-height: 1.2;
    position: relative;
    z-index: 1;
    color: var(--color-white);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.site-title a {
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.site-logo {
    height: 100px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* =========================================================
 *  07. NAVIGATION
 * = *======================================================== */
nav {
    margin-top: 1rem;
    padding: 0 1rem;
}

nav .menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

nav .menu-list li {
    list-style: none;
}

nav a {
    position: relative;
    padding: 0.5rem 1.25rem;
    font-weight: 400;
    border-radius: 0.5rem;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    color: var(--color-blue);
    text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
    color: var(--color-white);
    background: linear-gradient(
        135deg,
        var(--color-button-start),
                                var(--color-button-end)
    );
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}


/* =========================================================
 *  10. INTRO / MEDIA GRID
 * = *======================================================== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 400px);
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.media-figure {
    margin: 0;
}

.media-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

/* ----- Intro grid finomítás ----- */
.intro-grid > div > :first-child {
    margin-top: 0;
}

.intro-grid .media-figure {
    margin-top: 0.35rem;
}


/* =========================================================
 *  13. FOOTER
 * = *======================================================== */
footer {
    margin-top: 3rem;
    font-size: 0.9rem;
    padding: 1.5rem 1rem 1.25rem;
    color: var(--color-white);
    background: linear-gradient(
        135deg,
        var(--color-button-start),
                                var(--color-button-end)
    );
    clip-path: polygon(
        0 40px,
        100% 0,
        100% 100%,
        0 100%
    );
}

/* Center the footer navigation */
footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

footer nav a {
    padding: 0.2rem 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    cursor: pointer;
    color: var(--color-white);
    text-decoration: none;
}

footer nav a:hover {
    color: var(--color-white);
    background: linear-gradient(
        135deg,
        var(--color-button-start),
                                var(--color-button-end)
    );
}

/* Footer logo */
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: nowrap;
}

.footer-logo .site-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.footer-logo p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-white);
}

/* =========================================================
 *  11. GALLERY
 * = *======================================================== */
.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
    margin: 0;
}

.gallery-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 0.75rem;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
    transition: transform 0.2s ease;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
    transform: scale(1.02);
}

/* ----- Lightbox / dialog ----- */
.gallery-dialog {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: none;
    max-height: none;
}

.gallery-dialog::backdrop {
    background: rgba(0,0,0,0.85);
}

.gallery-dialog[open] {
    display: grid;
    place-items: center;
}

.gallery-full {
    max-width: min(1100px, 95vw);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 0.75rem;
    display: block;
}

.gallery-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
