/*
 * Alpine Style - New Page Template CSS (Clean Version)
 * ====================================
 * Minimal styles for template-new-page.php
 * Homepage section styles (brands, products, etc.) are loaded separately
 */

/* ==========================================================================
   Base Layout
   ========================================================================== */

body.page-template-template-new-page #content {
    padding: 0;
}

.new-page-main {
    padding-top: 0;
}

.new-page-section {
    padding: 40px 0;
    position: relative;
}

/* ==========================================================================
   Mobile Fixed Positioning Fixes
   ========================================================================== */

@media (max-width: 768px) {
    .alpine-mobile-filter-fab,
    .alpine-mobile-nav-panel-v2,
    [data-position="fixed"] {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
        backface-visibility: hidden;
    }

    html {
        height: 100%;
        -webkit-overflow-scrolling: touch;
    }

    body {
        min-height: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .fixed-element {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* ==========================================================================
   Split Parallax Hero Section
   ========================================================================== */

.split-parallax-hero {
    height: 80vh;
    max-height: 800px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1480px;
    margin: 20px auto;
    border-radius: 20px;
    background: url(/wp-content/themes/bf2022/images/hero.png);
    background-blend-mode: color-burn;
    background-color: #ffffffba;
    background-size: cover;
    background-position: top center;
}

/* Hero responsive gaps */
@media (max-width: 1520px) {
    .split-parallax-hero {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
}

@media (max-width: 991px) {
    .split-parallax-hero {
        margin: 15px;
        max-width: calc(100vw - 30px);
        height: 60vh;
        max-height: 600px;
        border-radius: 15px;
    }
}

@media (max-width: 767px) {
    .split-parallax-hero {
        margin: 10px;
        max-width: calc(100vw - 20px);
        height: 50vh;
        max-height: 500px;
        border-radius: 12px;
    }

    .hero-content-side {
        padding: 30px 15px;
    }

    .hero-main-title {
        font-size: clamp(32px, 8vw, 42px);
    }

    .hero-slogan {
        font-size: clamp(16px, 4vw, 24px);
    }

    .hero-description p {
        font-size: 15px;
    }

    .hero-buttons {
        gap: 12px;
    }

    .alpine-button {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 120px;
    }
}

.hero-split-container {
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
    height: -webkit-fill-available;
    margin: auto;
}

/* Hero Content */
.hero-content-side {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.hero-content-inner {
    max-width: 600px;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: contentSlideIn 1.2s ease 0.3s forwards;
}

.hero-main-title {
    font-size: clamp(48px, 6vw, 46px);
    font-weight: 900;
    color: #1B1B1B;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero-slogan {
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 700;
    color: #e0192e;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.hero-description {
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.6;
    color: #495057;
    margin: 0 0 40px 0;
}

.hero-description p {
    margin: auto;
    font-size: 18px;
    max-width: 520px;
    text-wrap-style: balance;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   Alpine Button System
   ========================================================================== */

.alpine-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 19px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    background: linear-gradient(135deg, #e0192e, #c01729);
    color: #fff;
    border-color: #e0192e;
}

.alpine-button:hover {
    background: linear-gradient(135deg, #ff1f3d, #d0162b);
    box-shadow: 0 8px 25px rgba(224, 25, 46, 0.4);
    color: #fff;
    text-decoration: none;
    border-color: transparent;
}

/* Button Variations */
.alpine-button.button-secondary {
    background: #ffffff;
    color: #1B1B1B;
    border-color: #e0192e;
}

.alpine-button.button-secondary:hover {
    background: #e0192e;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 25, 46, 0.3);
}

.alpine-button.button-outline {
    background: transparent;
    color: #e0192e;
    border-color: #e0192e;
}

.alpine-button.button-outline:hover {
    background: #e0192e;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 25, 46, 0.3);
}

/* Hero Specific Buttons */
.hero-btn-primary {
    background: linear-gradient(135deg, #e0192e, #c01729);
    color: #fff;
    border-color: #e0192e;
}

.hero-btn-primary:hover {
    background: linear-gradient(135deg, #ff1f3d, #d0162b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 25, 46, 0.4);
    color: #fff;
}

.hero-btn-secondary {
    background: #ffffff;
    color: #1B1B1B;
    border-color: #f0f0f0;
}

.hero-btn-secondary:hover {
    background: #1B1B1B;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 27, 27, 0.3);
}

/* Animation Side (hidden by default) */
.hero-animation-side {
    display: none;
}

/* Parallax Elements */
.parallax-bg-1,
.parallax-bg-2 {
    position: absolute;
    border-radius: 50%;
}

.parallax-bg-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    top: 20%;
    right: -100px;
    animation: floatSlow 8s ease-in-out infinite;
}

.parallax-bg-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    bottom: 30%;
    left: -50px;
    animation: floatSlow 10s ease-in-out infinite reverse;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.floating-circle-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 20%;
    animation: float 6s ease-in-out infinite;
}

.floating-circle-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation: float 8s ease-in-out infinite reverse;
}

.floating-circle-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 30%;
    animation: float 7s ease-in-out infinite;
}

.floating-circle-4 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 70%;
    animation: float 5s ease-in-out infinite reverse;
}

.gradient-overlay-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.gradient-overlay-2 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-30px) translateX(15px);
    }
}

@keyframes contentSlideIn {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

[dir="rtl"] .hero-content-inner {
    animation: contentSlideInRTL 1.2s ease 0.3s forwards;
}

@keyframes contentSlideInRTL {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-content-inner {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .alpine-button:hover {
        transform: none;
    }

    .floating-element,
    .parallax-bg-1,
    .parallax-bg-2 {
        animation: none;
    }
}

.hero-btn:focus,
.alpine-button:focus {
    outline: 3px solid rgba(224, 25, 46, 0.5);
    outline-offset: 2px;
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

.floating-element {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero-btn,
.alpine-button {
    position: relative;
    overflow: hidden;
}

/* Hero Loading State */
.split-parallax-hero {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
}

/* ==========================================================================
   Mobile Categories Carousel
   ========================================================================== */

@media (max-width: 767px) {
    /* Mobile Categories Carousel */
    .mobile-cats-carousel {
        display: block !important;
        width: -webkit-fill-available;
        position: relative;
        overflow: hidden;
        margin: auto -15px;
        height: auto !important;
    }

    .mobile-cats-wrapper {
        width: 100%;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mobile-cats-wrapper::-webkit-scrollbar {
        display: none;
    }

    .mobile-cats-track {
        display: flex;
        transition: transform 0.3s ease;
        margin: auto 0px;
        width: -webkit-fill-available;
    }

    .mobile-cat-item {
        flex: 0 0 100vw;
        width: -webkit-fill-available;
        height: 60vh;
        min-height: 400px;
        position: relative;
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: flex-end;
        color: white;
        text-decoration: none;
    }

    .mobile-cat-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.8) 100%
        );
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 40px 20px;
        text-align: center;
        width: -webkit-fill-available;
    }

    .mobile-cat-title {
        font-size: 28px;
        font-weight: 700;
        margin: 0 0 15px 0;
        color: white;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        line-height: 1.2;
    }

    .mobile-cat-desc {
        font-size: 16px;
        line-height: 1.5;
        margin: 0 0 25px 0;
        color: rgba(255, 255, 255, 0.9);
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .mobile-cat-btn {
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.5);
        color: white;
        padding: 12px 30px;
        border-radius: 30px;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
        display: inline-block;
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        margin: 0 auto;
        max-width: 200px;
    }

    .mobile-cat-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.7);
        color: white;
        text-decoration: none;
    }

    /* Navigation Arrows */
    .mobile-cats-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #333;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .mobile-cats-nav:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
    }

    .mobile-cats-nav.prev {
        left: 15px;
    }

    .mobile-cats-nav.next {
        right: 15px;
    }

    /* Dots Indicator */
    .mobile-cats-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 10;
        display: none;
    }

    .mobile-cats-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-cats-dot.active {
        background: white;
        transform: scale(1.2);
    }
}

/* Show desktop layout on larger screens */
@media (min-width: 768px) {
    .mobile-cats-carousel {
        display: none !important;
    }
}

/* RTL Support for Mobile Categories */
[dir="rtl"] .mobile-cats-nav.prev {
    right: 15px;
    left: auto;
}

[dir="rtl"] .mobile-cats-nav.next {
    left: 15px;
    right: auto;
}
