/* ==========================================
   Webiko Blog - Header & Footer Styles
   Modern Glassmorphism Design
   ========================================== */

:root {
    --header-height: 70px;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-bg-sticky: rgba(255, 255, 255, 0.85);
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
}

/* ==========================================
   HEADER STYLES
   ========================================== */

.site-header {
    position: relative;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.is-sticky-enabled.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg-sticky);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 40px;
}

/* Logo */
.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 40px;
    width: auto;
    transition: opacity 0.3s;
}

.logo-dark {
    display: none;
}

.dark-mode .logo-light {
    display: none;
}

.dark-mode .logo-dark {
    display: block;
}

/* Navigation */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu>li>a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-menu>li>a:hover,
.nav-menu>li.current-menu-item>a {
    color: var(--webiko-primary, #6366f1);
    background: rgba(99, 102, 241, 0.08);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    list-style: none;
    margin: 0;
    z-index: 100;
}

.nav-menu li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    display: block;
    padding: 10px 16px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-menu .sub-menu a:hover {
    color: var(--webiko-primary, #6366f1);
    background: rgba(99, 102, 241, 0.08);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #475569;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--webiko-primary, #6366f1);
}

/* Dark Mode Toggle */
.dark-mode-toggle .dark-icon {
    display: block;
}

.dark-mode-toggle .light-icon {
    display: none;
}

.dark-mode .dark-mode-toggle .dark-icon {
    display: none;
}

.dark-mode .dark-mode-toggle .light-icon {
    display: block;
}

/* Header Social */
.header-social {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid #e2e8f0;
}

@media (min-width: 1200px) {
    .header-social {
        display: flex;
    }
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #64748b;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.social-icon:hover {
    color: var(--webiko-primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 0;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
    }

    .header-social {
        display: none !important;
    }
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
}

.search-form {
    display: flex;
    background: #fff;
    border-radius: 100px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.search-input {
    flex: 1;
    padding: 18px 28px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-submit {
    padding: 18px 28px;
    background: var(--webiko-primary, #6366f1);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-submit:hover {
    background: var(--webiko-secondary, #8b5cf6);
}

.search-close {
    position: absolute;
    top: -60px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   MOBILE MENU (Off-Canvas)
   ========================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu.is-open {
    transform: translateX(300px);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-logo img {
    max-height: 32px;
}

.mobile-site-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    color: #475569;
    cursor: pointer;
}

.mobile-menu-search {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-search form {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.mobile-menu-search input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.mobile-menu-search button {
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
}

.mobile-menu-nav {
    padding: 16px 0;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-menu a {
    display: block;
    padding: 14px 20px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-nav-menu a:hover {
    color: var(--webiko-primary, #6366f1);
    background: rgba(99, 102, 241, 0.05);
}

.mobile-nav-menu .sub-menu {
    list-style: none;
    padding: 0 0 0 20px;
    margin: 0;
}

.mobile-nav-menu .sub-menu a {
    padding: 10px 20px;
    font-size: 14px;
    color: #64748b;
}

.mobile-menu-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s;
}

.mobile-menu-social a:hover {
    background: var(--webiko-primary, #6366f1);
    color: #fff;
}

body.menu-open {
    overflow: hidden;
}

/* ==========================================
   FOOTER STYLES
   ========================================== */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-main {
    padding: 80px 0 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
}

/* Footer About */
.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 36px;
    filter: brightness(0) invert(1);
}

.footer-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--footer-text);
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--webiko-primary, #6366f1);
    transform: translateY(-3px);
}

/* Footer Titles */
.footer-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--webiko-primary, #6366f1);
    display: inline-block;
}

/* Footer Menu */
.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--footer-text);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.footer-menu a:hover {
    color: #fff;
    padding-left: 8px;
}

.cat-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 100px;
}

/* Footer Newsletter */
.newsletter-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.newsletter-form .newsletter-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.newsletter-form input::placeholder {
    color: var(--footer-text);
}

.newsletter-form button {
    padding: 14px 20px;
    background: var(--webiko-primary, #6366f1);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: var(--webiko-secondary, #8b5cf6);
}

.newsletter-message {
    margin-top: 10px;
    font-size: 13px;
}

.newsletter-message.success {
    color: #10b981;
}

.newsletter-message.error {
    color: #ef4444;
}

/* Footer Bottom */
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.copyright {
    margin: 0;
    font-size: 14px;
    color: var(--footer-text);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: var(--footer-text);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--webiko-primary, #6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--webiko-secondary, #8b5cf6);
    transform: translateY(-4px);
}

/* ==========================================
   DARK MODE
   ========================================== */

.dark-mode .site-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .site-header.is-sticky {
    background: rgba(15, 23, 42, 0.85);
}

.dark-mode .nav-menu>li>a {
    color: #e2e8f0;
}

.dark-mode .nav-menu>li>a:hover {
    background: rgba(99, 102, 241, 0.15);
}

.dark-mode .nav-menu .sub-menu {
    background: #1e293b;
}

.dark-mode .nav-menu .sub-menu a {
    color: #94a3b8;
}

.dark-mode .nav-menu .sub-menu a:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
}

.dark-mode .header-action-btn {
    color: #94a3b8;
}

.dark-mode .header-social {
    border-left-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .hamburger-line {
    background: #e2e8f0;
}

.dark-mode .mobile-menu {
    background: #1e293b;
}

.dark-mode .mobile-menu-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .mobile-menu-search {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .mobile-menu-search form {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .mobile-menu-search input {
    color: #fff;
}

.dark-mode .mobile-nav-menu li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .mobile-nav-menu a {
    color: #e2e8f0;
}

.dark-mode .mobile-menu-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1199px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: span 2;
    }
}

@media (max-width: 767px) {
    .footer-main {
        padding: 60px 0 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-about {
        grid-column: span 1;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-title {
        display: block;
        text-align: center;
    }

    .footer-menu a {
        justify-content: center;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 575px) {
    :root {
        --header-height: 60px;
    }

    .logo-img {
        max-height: 32px;
    }

    .header-action-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}