/**
 * HumusZiegel Theme - Component Styles
 *
 * @package HumusZiegel
 */

/* ==========================================================================
   Header Component
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    height: 80px;
    display: flex;
    align-items: center;
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-stone-100);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.site-header .header-inner {
    width: 100%;
}

/* Home page transparent header */
body.home .site-header:not(.scrolled) {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.home .site-header:not(.scrolled) .header-logo-text,
body.home .site-header:not(.scrolled) .nav-link {
    color: white !important;
}

/* Scrolled state: dark text for nav links and logo */
.site-header.scrolled .nav-link,
.site-header.scrolled .header-logo-text {
    color: var(--color-primary) !important;
}

/* Preserve bronze-colored elements in all states */
.site-header.scrolled .text-bronze {
    color: var(--color-bronze) !important;
}

/* Non-home pages: always dark text */
body:not(.home) .site-header .nav-link,
body:not(.home) .site-header .header-logo-text {
    color: var(--color-primary) !important;
}

/* Mobile menu open: white text on dark background */
.site-header.mobile-menu-open .nav-link,
.site-header.mobile-menu-open .header-logo-text,
.site-header.mobile-menu-open a,
.site-header.mobile-menu-open button,
.site-header.mobile-menu-open span {
    color: white !important;
}

/* Hamburger Menu Animation */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 1px;
    background-color: currentColor;
    transition: all 0.3s ease;
    position: absolute;
}

.hamburger-line-1 { top: 7px; }
.hamburger-line-2 { top: 11px; }
.hamburger-line-3 { top: 15px; }

.hamburger-icon.open .hamburger-line-1 {
    transform: rotate(45deg);
    top: 11px;
}

.hamburger-icon.open .hamburger-line-2 {
    opacity: 0;
}

.hamburger-icon.open .hamburger-line-3 {
    transform: rotate(-45deg);
    top: 11px;
}

/* Mobile Menu */
.mobile-menu {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Navigation Links
   ========================================================================== */
.nav-link {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-bronze);
}

.mobile-link {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    text-decoration: none;
}

.mobile-link:hover {
    color: var(--color-bronze);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 1rem;
    transition: all 0.2s ease;
}

.dropdown-menu-inner {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border: 1px solid var(--color-stone-100);
    padding: 0.5rem 0;
    width: 14rem;
    overflow: hidden;
    backdrop-filter: blur(24px);
}

.dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: rgba(28, 25, 23, 0.7);
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: var(--color-stone-50);
    color: var(--color-primary);
}

.dropdown-item.active {
    color: var(--color-bronze);
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
.site-footer .footer-menu a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
    text-decoration: none;
}

.site-footer .footer-menu a:hover {
    color: var(--color-bronze);
}

.site-footer .footer-menu li + li {
    margin-top: 1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-bronze);
    border-color: var(--color-bronze);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-white {
    background-color: white;
    color: var(--color-primary);
    border-color: white;
}

.btn-white:hover {
    background-color: var(--color-bronze);
    color: white;
    border-color: var(--color-bronze);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.product-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.5s ease;
}

.product-card:hover {
    border-color: var(--color-stone-200);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.1);
}

.blog-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.5s ease;
}

.blog-card:hover {
    border-color: var(--color-stone-200);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-stone-200);
    border-radius: 0.5rem;
    background-color: white;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-bronze);
    box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: 9999px;
}

.badge-primary {
    background-color: var(--color-primary);
    color: white;
}

.badge-bronze {
    background-color: var(--color-bronze);
    color: white;
}

.badge-accent {
    background-color: var(--color-accent);
    color: white;
}

/* ==========================================================================
   Prose (Content Styling)
   ========================================================================== */
.prose {
    color: var(--color-secondary);
    line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 400;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h2 {
    font-size: 1.5rem;
}

.prose h3 {
    font-size: 1.25rem;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose a {
    color: var(--color-bronze);
    text-decoration: underline;
    transition: color 0.2s ease;
}

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

.prose ul,
.prose ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose blockquote {
    border-left: 3px solid var(--color-bronze);
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: var(--color-primary);
}

.prose img {
    border-radius: 0.75rem;
    margin: 2em 0;
}

.prose code {
    background-color: var(--color-stone-100);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre {
    background-color: var(--color-primary);
    color: white;
    padding: 1.5em;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2em 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations */
.animate-on-scroll[data-delay="100"] { transition-delay: 0.1s; }
.animate-on-scroll[data-delay="200"] { transition-delay: 0.2s; }
.animate-on-scroll[data-delay="300"] { transition-delay: 0.3s; }
.animate-on-scroll[data-delay="400"] { transition-delay: 0.4s; }
.animate-on-scroll[data-delay="500"] { transition-delay: 0.5s; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--color-secondary);
}

.pagination .page-numbers:hover {
    background-color: var(--color-stone-100);
    color: var(--color-primary);
}

.pagination .page-numbers.current {
    background-color: var(--color-primary);
    color: white;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    background-color: var(--color-stone-100);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    font-size: 0.75rem;
    color: var(--color-secondary);
}

.breadcrumbs a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--color-bronze);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--color-stone-300);
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--color-stone-100) 25%, var(--color-stone-200) 50%, var(--color-stone-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Tooltips
   ========================================================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background-color: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Product Image Cards - ensure images fill aspect container
   ========================================================================== */
.aspect-\[4\/5\] img,
.aspect-\[4\/5\] .wp-post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: absolute !important;
    top: 0;
    left: 0;
}

.aspect-\[4\/5\] {
    position: relative;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .site-header,
    .site-footer,
    .mobile-sticky-cta,
    .live-activity-feed,
    .cookie-banner {
        display: none !important;
    }

    .prose {
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
