/* Shared layout modules: navbar and button system */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    min-height: 80px;
    background: linear-gradient(90deg, var(--ui-nav-bg-start), var(--ui-nav-bg-end));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    position: relative;
}

.nav-left img {
    height: 100%;
    max-height: 75px;
    object-fit: contain;
    transition: filter 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.nav-left img:hover {
    filter: brightness(1.2) drop-shadow(0 2px 12px rgba(255, 255, 255, 0.2));
    transform: scale(1.08);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
}

.nav-right a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-right a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) skewX(-15deg);
    width: 1px;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.nav-right a:first-child::before {
    display: none;
}

.nav-right a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-right img {
    height: 100%;
    max-height: 70px;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.nav-right img:hover {
    transform: scale(1.1);
    filter: brightness(1.15) drop-shadow(0 2px 12px rgba(255, 255, 255, 0.2));
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    z-index: 120;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero-buttons {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 15px 34px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary) 52%, var(--color-primary-dark) 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--ui-btn-primary-shadow, none);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(
        180deg,
        var(--ui-btn-primary-hover-start),
        var(--ui-btn-primary-hover-mid),
        var(--ui-btn-primary-hover-end)
    );
    box-shadow: var(--ui-btn-primary-hover-shadow, none);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.75);
}

.btn-outline:hover {
    transform: translateY(-2px);
    background: var(--ui-btn-outline-hover-bg);
    border-color: rgba(255, 255, 255, 0.92);
}

.site-footer {
    background: linear-gradient(180deg, rgba(10, 14, 19, 0.98) 0%, rgba(5, 9, 13, 0.98) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 34px 60px;
    color: #f6f8ff;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr repeat(3, 1fr);
    gap: 28px;
}

.footer-brand h3,
.footer-block h4 {
    margin: 0 0 10px;
}

.footer-brand p,
.footer-block p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.footer-block a {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.25s ease;
}

.footer-block a:hover {
    color: var(--color-primary-light, #ffffff);
}

.footer-bottom {
    max-width: 1200px;
    margin: 22px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
}

.error-toast-container {
    position: fixed;
    top: 95px;
    right: 18px;
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(90vw, 380px);
}

.error-toast {
    background: rgba(20, 24, 32, 0.94);
    border: 1px solid rgba(255, 112, 112, 0.45);
    color: #ffe6e6;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    font-size: 0.9rem;
    line-height: 1.4;
    animation: errorToastIn 0.25s ease-out;
}

.error-toast.hide {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.24s ease;
}

.media-fallback {
    margin-top: 10px;
    color: rgba(255, 221, 221, 0.92);
    font-size: 0.88rem;
    background: rgba(140, 38, 38, 0.35);
    border: 1px solid rgba(255, 146, 146, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
}

@keyframes errorToastIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .navbar {
        padding: 14px 20px;
    }

    .nav-right {
        gap: 14px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 14px;
    }

    .btn {
        width: min(320px, 90vw);
    }

    .site-footer {
        padding: 28px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-bottom {
        margin-top: 16px;
        font-size: 0.84rem;
    }

    .error-toast-container {
        left: 12px;
        right: 12px;
        top: 88px;
        max-width: none;
    }
}

@media (max-width: 760px) {
    .navbar {
        flex-wrap: wrap;
        align-items: center;
        min-height: auto;
        gap: 0;
        padding: 10px 12px;
    }

    .nav-left {
        flex: 0 1 auto;
        justify-content: flex-start;
    }

    .nav-left img {
        max-height: 56px;
    }

    .nav-toggle {
        display: flex;
    }

    .navbar.is-open .nav-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar.is-open .nav-toggle span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .navbar.is-open .nav-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-right {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    .navbar.is-open .nav-right {
        display: flex;
    }

    .nav-right a {
        width: 100%;
        min-width: 0;
        padding: 12px 10px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-right a::before {
        display: none;
    }

    .nav-right img {
        max-height: 62px;
    }

    .error-toast-container {
        top: 126px;
    }
}

@media (max-width: 412px) {
    .navbar {
        padding: 8px 10px;
        gap: 6px;
    }

    .nav-left img {
        max-height: 46px;
    }

    .nav-right a {
        padding: 10px 8px;
    }

    .nav-right img {
        max-height: 54px;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        min-height: 46px;
        padding: 12px 16px;
        font-size: 0.84rem;
    }

    .site-footer {
        padding: 24px 14px;
    }

    .footer-brand p,
    .footer-block a {
        font-size: 0.9rem;
    }

    .error-toast-container {
        top: 112px;
        left: 8px;
        right: 8px;
    }
}
