/* ==========================================================================
   RIFS Components - Navbar & Footer
   ========================================================================== */

/* -- Navbar -- */
.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 20px var(--page-padding);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.navbar-wrapper.is-hidden {
    transform: translateY(-100%);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    height: 72px;
    padding: 0 30px;
    background: var(--color-rieksts);
    border-radius: var(--radius-card);
    pointer-events: all;
}

.navbar__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar__logo-svg {
    width: 68px;
    height: 39px;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 50px;
}

.navbar__link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.2s;
}

.navbar__link:hover {
    opacity: 0.8;
}

.navbar__chevron {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.navbar__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.navbar__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.navbar__hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar__hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.navbar__hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -- Footer -- */
.footer {
    background: var(--color-grafits);
    border-radius: var(--radius-footer) var(--radius-footer) 0 0;
    padding: var(--section-padding) var(--page-padding) 50px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.footer__decoration {
    display:none;
    position: absolute;
    top:0;right:0;
    transform:translateY(-100%);
    width: 310px;
    height: auto;
    pointer-events: none;
}

.footer__content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    margin-bottom: 150px;
}

.footer__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer__logo svg {
    width: 94px;
    height: 74px;
}

.footer__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 35px;
    line-height: 1.2;
    color: var(--color-white);
}

.footer__text {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-white);
}

.footer__address {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__contacts-table {
    display: flex;
    gap: 24px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-white);
}

.footer__contacts-labels p,
.footer__contacts-values p {
    margin-bottom: 0;
}

.footer__right {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer__newsletter {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer__newsletter-text {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    color: var(--color-white);
}

.footer__newsletter-form {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer__newsletter-input {
    width: 340px;
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    border: none;
    background: var(--color-white);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-black);
}

.footer__newsletter-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.footer__newsletter-btn {
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    border: none;
    background: var(--color-white);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-black);
    cursor: pointer;
    min-width: 166px;
    text-align: center;
    transition: opacity 0.2s;
}

.footer__newsletter-btn:hover {
    opacity: 0.9;
}

.footer__social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: opacity 0.2s;
}

.footer__social-link:hover {
    opacity: 0.8;
}

.footer__bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 25px 64px;
    background: var(--color-white);
    border-radius: var(--radius-card);
    &:after {
        content:'';
        display:block;
        background-image:url("../images/decorations/Vector-footer.e12360158205.svg");        
        background-repeat:no-repeat;
        width:400px;height:300px;
        position:absolute;
        top:0;right:40px;
        transform:translateY(-100%);
        pointer-events:none;
        z-index:1;
        @media(max-width:1024px) {
            right:-50%;
            transform:translate(50%, -100%);
        }
    }
}

.footer__bottom span,
.footer__bottom a {
    font-family: var(--font-small);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-black);
}

.footer__bottom a:hover {
    text-decoration: underline;
}

.footer__nav {
    display: flex;
    gap: 24px;
}

/* -- Responsive -- */
@media (max-width: 1024px) {
    .navbar__hamburger {
        display: flex;
    }

    .navbar__menu {
        display: none;
    }

    .footer__content {
        flex-direction: column;
        margin-bottom: 60px;
    }

    .footer__newsletter-form {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer__newsletter-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .footer__bottom {
        flex-direction: column;
        gap: 12px;
        padding: 20px 24px;
    }

    .footer__nav {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* -- Newsletter Success State -- */
.newsletter-success {
    display: flex;
    align-items: center;
    gap: 20px;
    animation: newsletterReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    color: var(--color-black);
}

.newsletter-success--dark {
    color: var(--color-white);
}

@keyframes newsletterReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newsletter-success__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    color: var(--color-rieksts);
}

.newsletter-success--dark .newsletter-success__icon {
    color: var(--color-smilga);
}

.newsletter-success__circle {
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: circleDraw 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.newsletter-success__check {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: checkDraw 0.35s 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes circleDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes checkDraw {
    to { stroke-dashoffset: 0; }
}

.newsletter-success__text {
    opacity: 0;
    animation: newsletterReveal 0.4s 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.newsletter-success__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
}

.newsletter-success__sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    opacity: 0.7;
    margin-top: 2px;
}

/* -- Mobile Menu Overlay -- */
.mobile-menu {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-menu {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 999;
        pointer-events: none;
        visibility: hidden;
    }

    .mobile-menu.is-open {
        pointer-events: all;
        visibility: visible;
    }

    .mobile-menu__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(30, 30, 30, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu.is-open .mobile-menu__backdrop {
        opacity: 1;
    }

    .mobile-menu__panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: var(--color-bg);
        padding: 120px var(--page-padding) 40px;
        transform: translateY(-100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        box-shadow: 0 8px 32px rgba(30, 30, 30, 0.1);
    }

    .mobile-menu.is-open .mobile-menu__panel {
        transform: translateY(0);
    }

    .mobile-menu__list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu__item {
        border-bottom: 1px solid var(--color-smilga);
    }

    .mobile-menu__item:last-child {
        border-bottom: none;
    }

    .mobile-menu__link {
        display: block;
        padding: 20px 0;
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 24px;
        line-height: 1.3;
        color: var(--color-black);
        text-decoration: none;
        transition: color 0.2s;
    }

    .mobile-menu__link:hover {
        color: var(--color-rieksts);
    }
}
