/* ========================================
   Simple Header & Footer v3
   ======================================== */

/* ---------- HEADER ---------- */
.shf-header {
    position: var(--shf-position, relative);
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--shf-bg, #ffffff);
    color: var(--shf-text, #222222);
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.shf-header.shf-scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.shf-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 60px;
}

/* Logo */
.shf-logo {
    flex: 0 0 auto;
    z-index: 10;
}

.shf-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--shf-text, #222222);
}

.shf-logo-img {
    max-width: var(--shf-logo-width, 250px);
    height: auto;
    max-height: 80px;
    display: block;
}

.shf-site-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Desktop Nav */
.shf-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.shf-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    align-items: center;
}

.shf-menu li {
    position: relative;
    margin: 0;
}

.shf-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--shf-text, #222222);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.shf-menu a:hover,
.shf-menu .current-menu-item > a {
    background-color: rgba(0, 0, 0, 0.06);
}

.shf-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--shf-bg, #ffffff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    z-index: 100;
}

.shf-menu li:hover > .sub-menu {
    display: block;
}

.shf-menu .sub-menu a {
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* Search Toggle */
.shf-search-toggle {
    flex: 0 0 auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--shf-text, #222222);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.shf-search-toggle:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

/* Hamburger */
.shf-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.shf-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.shf-hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--shf-text, #222222);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.shf-menu-toggle.active .shf-hamburger:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.shf-menu-toggle.active .shf-hamburger:nth-child(2) {
    opacity: 0;
}
.shf-menu-toggle.active .shf-hamburger:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.shf-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--shf-bg, #ffffff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    z-index: 9998;
}

.shf-mobile-menu.active {
    display: block;
    max-height: 80vh;
    overflow-y: auto;
}

.shf-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
}

.shf-mobile-menu-list li {
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.shf-mobile-menu-list a {
    display: block;
    padding: 14px 24px;
    color: var(--shf-text, #222222);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.shf-mobile-menu-list a:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.shf-mobile-menu-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.03);
}

.shf-mobile-menu-list .sub-menu a {
    padding-left: 40px;
    font-size: 0.95rem;
}

/* Search Box */
.shf-search-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--shf-bg, #ffffff);
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 9998;
}

.shf-search-box.active {
    display: block;
}

.shf-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.shf-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.shf-search-input:focus {
    border-color: #666;
}

.shf-search-submit {
    padding: 12px 20px;
    background: var(--shf-text, #222222);
    color: var(--shf-bg, #ffffff);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}

.shf-search-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--shf-text, #222222);
    padding: 0 8px;
}

/* Mobile Header Layout */
@media (max-width: 768px) {
    .shf-header-inner {
        padding: 10px 16px;
        display: grid;
        grid-template-columns: 40px 1fr 40px;
        align-items: center;
        gap: 8px;
    }

    .shf-menu-toggle {
        display: flex;
        grid-column: 1;
        justify-self: start;
    }

    .shf-logo {
        grid-column: 2;
        justify-self: center;
        text-align: center;
    }

    .shf-logo-img {
        max-height: 40px;
    }

    .shf-site-title {
        font-size: 1.15rem;
    }

    .shf-search-toggle {
        grid-column: 3;
        justify-self: end;
    }

    .shf-nav {
        display: none;
    }
}

@media (max-width: 400px) {
    .shf-header-inner {
        padding: 8px 12px;
    }
    .shf-logo-img {
        max-height: 36px;
    }
}

/* ---------- FOOTER ---------- */
.shf-site-footer {
    background-color: var(--shf-footer-bg, #1a1a1a);
    color: var(--shf-footer-text, #ffffff);
    padding: 50px 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.shf-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.shf-footer-widgets {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.shf-footer-col {
    min-width: 0;
}

/* Brand */
.shf-footer-logo {
    max-height: 50px;
    width: auto;
    margin-bottom: 16px;
    display: block;
}

.shf-footer-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    margin-bottom: 16px;
}

.shf-footer-about {
    margin: 0 0 20px;
    opacity: 0.85;
    font-size: 0.9rem;
}

.shf-footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shf-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--shf-footer-text, #ffffff);
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.shf-footer-social a:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Widget */
.shf-widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 18px;
    color: var(--shf-footer-text, #ffffff);
}

.shf-footer-menu,
.shf-footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shf-footer-menu li,
.shf-footer-contact li {
    margin-bottom: 10px;
}

.shf-footer-menu a,
.shf-footer-contact a {
    color: var(--shf-footer-text, #ffffff);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.shf-footer-menu a:hover,
.shf-footer-contact a:hover {
    opacity: 1;
    text-decoration: underline;
}

.shf-footer-contact li {
    opacity: 0.85;
}

/* Footer Bottom */
.shf-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.shf-footer-copyright {
    opacity: 0.8;
    font-size: 0.9rem;
}

.shf-footer-payment {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shf-footer-payment span {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Back to Top */
.shf-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--shf-footer-bg, #1a1a1a);
    color: var(--shf-footer-text, #ffffff);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9990;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
}

.shf-back-to-top.visible {
    display: flex;
    opacity: 1;
}

.shf-back-to-top:hover {
    transform: translateY(-3px);
    background: #333;
}

/* Footer Responsive */
@media (max-width: 992px) {
    .shf-footer-widgets {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .shf-footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .shf-footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .shf-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
