/* Shared site header, footer, layout — IFCΛ BJJ */

:root {
    --accent: #007bff;
    --accent-blue: #007bff;
    --header-height: 110px;
    --page-gutter: clamp(16px, 4vw, 48px);
    --content-max: 1280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* —— Header —— */
.site-header {
    min-height: var(--header-height);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 12px var(--page-gutter);
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(0, 0, 0, 0.92) 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible;
}

/* Blur on a pseudo-element so fixed menu overlay is not trapped inside the header (iOS Safari) */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-header > .logo-container,
.site-header > .burger {
    position: relative;
    z-index: 2;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #1e7040 33.33%, #ffffff 33.33%, #ffffff 66.66%, #c41e3a 66.66%);
}

.logo-container {
    flex-shrink: 0;
    z-index: 2;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.logo-container img {
    height: clamp(48px, 8vw, 65px);
    width: auto;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

/* Burger — visible on phones only */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 2003;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.site-header.nav-open .burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.site-header.nav-open .burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.site-header.nav-open .burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    z-index: 2;
}

.site-header nav {
    width: 100%;
}

.site-header nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    gap: clamp(8px, 2vw, 24px);
    margin: 0;
    padding: 0;
}

.site-header nav ul li a {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 8px;
    white-space: nowrap;
    transition: color 0.3s ease, opacity 0.3s ease;
    position: relative;
    z-index: 5;
    opacity: 0.92;
}

.site-header nav ul li a:hover,
.site-header nav ul li a[aria-current="page"] {
    color: var(--accent);
    opacity: 1;
}

/* —— Page actions —— */
.page-actions {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px 32px;
    padding: 0 var(--page-gutter) 56px;
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
}

.back-nav,
.back-nav-btn {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.back-nav:hover,
.back-nav-btn:hover {
    color: #fff;
    letter-spacing: 3px;
}

.page-action-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.25);
}

.page-action-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 123, 255, 0.35);
}

/* —— Forms —— */
.form-status {
    margin: 16px 0 0;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.form-status--success {
    background: rgba(30, 112, 64, 0.25);
    border: 1px solid rgba(30, 112, 64, 0.5);
    color: #8fdfb0;
}

.form-status--error {
    background: rgba(196, 30, 58, 0.2);
    border: 1px solid rgba(196, 30, 58, 0.45);
    color: #ffb3c1;
}

.review-btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 15px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.35);
}

.review-btn:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 123, 255, 0.45);
    color: #fff;
}

.leave-review-cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.leave-review-cta-actions .review-btn,
.leave-review-cta-actions .review-trovaci-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    min-height: 48px;
    margin: 0;
    box-sizing: border-box;
    text-align: center;
}

.review-trovaci-btn {
    padding: 15px 35px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 15px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: none;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.review-trovaci-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
    box-shadow: none;
}

.form-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* —— Footer —— */
.site-footer {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    position: relative;
    background: linear-gradient(180deg, rgba(6, 10, 22, 0.98) 0%, rgba(2, 2, 4, 1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #1e7040 33.33%, #ffffff 33.33%, #ffffff 66.66%, #c41e3a 66.66%);
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 48px var(--page-gutter) 0;
}

.footer-grid {
    display: flex;
    justify-content: center;
    text-align: center;
}

.footer-contact-block {
    width: 100%;
    max-width: 720px;
}

.footer-contact-intro {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
}

.footer-heading {
    margin: 0 0 16px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
}

.footer-contact-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.footer-contact-list li {
    flex: 1 1 240px;
    min-width: 0;
    max-width: 340px;
}

.footer-contact-link {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    height: 100%;
    padding: 14px 16px;
    box-sizing: border-box;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-contact-link:hover {
    background: rgba(0, 123, 255, 0.12);
    border-color: rgba(0, 123, 255, 0.35);
    transform: translateY(-1px);
}

.footer-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}

.footer-contact-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
}

.footer-contact-value {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    word-break: break-word;
}

.footer-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-copy {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.35px;
}

/* —— Responsive header —— */
/* Phones: burger opens full-screen menu — all links visible, no scroll */
@media (max-width: 900px) {
    :root {
        --header-height: 88px;
        --mobile-nav-gap: 14px;
    }

    .site-header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        padding: 10px var(--page-gutter);
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        gap: 12px;
    }

    /* Blur on ::before traps fixed menus on iOS — off on phones */
    .site-header::before {
        display: none;
    }

    .logo-container {
        width: auto;
        display: block;
        position: relative;
        z-index: 10002;
    }

    .burger {
        display: flex;
        margin-left: auto;
        position: relative;
        z-index: 10002;
    }

    .nav-wrapper {
        position: fixed;
        inset: 0;
        z-index: 10000;
        width: 100%;
        max-width: none;
        height: 100%;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        padding:
            calc(var(--header-height) + env(safe-area-inset-top, 0px))
            var(--page-gutter)
            max(16px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        display: none;
        flex: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(4, 4, 10, 0.98);
        overflow: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: auto;
        pointer-events: none;
    }

    body.nav-open .nav-wrapper {
        display: flex;
        pointer-events: auto;
    }

    body.nav-open .site-header {
        z-index: 10001;
    }

    .nav-wrapper nav {
        width: 100%;
        max-width: 320px;
        flex: 0 0 auto;
    }

    .nav-wrapper nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: var(--mobile-nav-gap);
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nav-wrapper nav ul li {
        flex: 0 0 auto;
        width: 100%;
    }

    .nav-wrapper nav ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 52px;
        padding: 14px 18px;
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: 1.5px;
        text-align: center;
        text-transform: uppercase;
        color: #ffffff;
        opacity: 1;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 14px;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .nav-wrapper nav ul li a:hover,
    .nav-wrapper nav ul li a:focus-visible,
    .nav-wrapper nav ul li a:active,
    .nav-wrapper nav ul li a[aria-current="page"] {
        color: #fff;
        background: var(--accent);
        border-color: var(--accent);
    }
}

@media (max-width: 900px) and (max-height: 700px) {
    :root {
        --mobile-nav-gap: 10px;
    }

    .nav-wrapper nav ul li a {
        min-height: 46px;
        padding: 12px 16px;
        font-size: 0.92rem;
    }
}

/* Desktop: inline navigation, no burger */
@media (min-width: 901px) {
    :root {
        --header-height: 110px;
    }

    .burger {
        display: none !important;
    }

    .site-header {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .nav-wrapper {
        position: static;
        display: flex;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        flex: 1 1 auto;
        width: auto;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 0;
        margin: 0;
        background: transparent;
        border: none;
        overflow: visible;
        inset: auto;
    }

    .site-header nav ul {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: clamp(12px, 2vw, 28px);
    }

    .site-header nav ul li {
        border-bottom: none;
    }

    .site-header nav ul li a {
        display: inline-block;
        padding: 10px 8px;
        font-size: 0.8rem;
    }
}
