/* Header & Modal Styles extracted from template for maintainability */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: var(--white, #ffffff);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.site-header.hidden {
    transform: translateY(-100%);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.site-header.scrolled .header-inner {
    height: 60px;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-base);
}

.site-title:hover {
    transform: translateY(-2px);
}

.cube-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    transition: all var(--transition-base);
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    cursor: zoom-in;
    position: relative;
    margin-right: 4px;
}

.cube-logo:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
}

.site-title:hover .cube-logo {
    transform: rotate(3deg) scale(1.03);
    box-shadow: 0 5px 12px rgba(0,0,0,0.18);
}

.site-title span {
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
}

.custom-logo-link img {
    height: 40px;
    width: auto;
    transition: all var(--transition-base);
}

.site-header.scrolled .custom-logo-link img {
    height: 32px;
}

.site-header.scrolled .cube-logo {
    width: 38px;
    height: 38px;
}

.site-header.scrolled .site-title {
    font-size: 1.2rem;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    list-style: none;
}

.primary-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-base);
}

.primary-menu a:hover {
    color: var(--primary-color);
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-cta);
    transition: width var(--transition-base);
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item a::after {
    width: 100%;
}

.header-cta-button {
    font-size: var(--fs-sm);
    padding: 0.5rem 1.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    margin-left: auto;
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 18px;
    position: relative;
}

.menu-icon span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

.menu-icon span:nth-child(1) {
    top: 0;
}

.menu-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon span:nth-child(3) {
    bottom: 0;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white, #ffffff);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-inner {
    padding: var(--space-lg);
    height: 100%;
    overflow-y: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-bottom: var(--space-lg);
    color: var(--text-primary, #2C3E50);
}

.mobile-menu-close:hover,
.mobile-menu-close:focus-visible {
    color: var(--accent-color, #F39C12);
    outline: 2px solid var(--accent-color, #F39C12);
    outline-offset: 4px;
}

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

.mobile-menu-list li {
    margin-bottom: var(--space-md);
    list-style: none;
}

.mobile-menu-list a {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--fs-lg);
    font-weight: 500;
    padding: var(--space-sm) 0;
}

.mobile-menu-cta {
    margin-top: var(--space-xl);
}

@media (max-width: 1024px) {
    .site-header {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    .main-navigation {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block;
        margin-right: 0;
    }

    .header-inner {
        height: 70px;
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .cube-logo {
        width: 42px;
        height: 42px;
    }

    .header-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .site-branding {
        max-width: 75%;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .custom-logo-link img {
        height: 32px;
        max-width: 140px;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .cube-logo {
        width: 36px;
        height: 36px;
    }
}

body.menu-open {
    overflow: hidden;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: modalFadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.image-modal.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    animation: modalZoomIn 0.4s ease;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

@keyframes modalZoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 300;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    line-height: 1;
    border: none;
}

.modal-close:hover,
.modal-close:focus-visible {
    color: #F39C12;
    transform: rotate(90deg);
    background-color: rgba(0,0,0,0.8);
    outline: none;
}

.modal-caption {
    margin-top: 20px;
    text-align: center;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
    animation: modalSlideUp 0.5s ease 0.2s both;
}

.modal-link {
    display: inline-block;
    margin-top: 10px;
    color: #F39C12;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    background-color: rgba(243, 156, 18, 0.1);
    border-radius: 20px;
    border: 1px solid #F39C12;
}

.modal-link:hover,
.modal-link:focus-visible {
    background-color: #F39C12;
    color: #ffffff;
    transform: translateY(-2px);
    outline: none;
}

.modal-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

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

@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 28px;
        width: 40px;
        height: 40px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }

    .modal-caption {
        font-size: 1rem;
        padding: 8px 15px;
    }
}

.trust-logo {
    background-image: none !important;
}
