/* ========================================================
   HOME PAGE SPECIFIC STYLES  –  css/home.css
   ======================================================== */

/* ---------- SHARED UTILITY ---------- */
.img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    line-height: 1.6;
    border: none;
}
.img-placeholder.dark { background: #1a1a2e; }
.img-placeholder.short { min-height: 200px; }
.img-placeholder small { font-size: 12px; opacity: .7; }

.hp-btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.hp-btn-solid {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}
.hp-btn-solid:hover { background: var(--yamaha-red-dark); border-color: var(--yamaha-red-dark); }

.hp-btn-outline {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.hp-btn-outline:hover { background: #fff; color: var(--dark-blue); }

.hp-btn-outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}
.hp-btn-outline-white:hover { background: #fff; color: var(--dark-blue); }

/* ---------- HERO ---------- */
.hp-hero {
    margin-top: 72px;
    min-height: calc(100vh - 72px);
    display: flex;
    background: var(--dark-blue);
    position: relative;
    overflow: hidden;
}
.hp-hero-text {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 60px 80px 80px;
    position: relative;
    z-index: 2;
}
.hp-hero-tag {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-blue);
    margin-bottom: 24px;
}
.hp-hero-text h1 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 900;
    color: #fff;
    line-height: 1.12;
    margin-bottom: 36px;
}
.hp-hero-img {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 60px 20px;
}
.hp-hero-img img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* ---------- DEALERSHIP INTRO ---------- */
.hp-intro {
    background: #fff;
    padding: 60px 80px;
}
.hp-intro.dark-bg {
    background: var(--dark-blue);
    color: #fff;
}
.hp-intro.dark-bg h2 {
    color: #fff;
}
.hp-intro.dark-bg p {
    color: rgba(255, 255, 255, 0.75);
}
.hp-intro-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 80px;
    align-items: center;
}
.hp-intro-text { flex: 1; }
.hp-intro-text h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: var(--dark-blue);
    margin-bottom: 20px;
    line-height: 1.2;
}
.hp-intro-text p {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 32px;
}
.hp-intro-img {
    flex: 0 0 45%;
    height: 400px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
}
.hp-intro-img .img-placeholder { min-height: 400px; }

/* ---------- FEATURE BIKE SECTIONS ---------- */
.hp-feature {
    position: relative;
    padding: 60px 80px;
}
.hp-feature.dark-bg { background: var(--dark-blue); }
.hp-feature.light-bg { background: var(--light-gray); }

.hp-feature-label {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #999;
    text-align: center;
    margin-bottom: 30px;
}
.hp-feature-label.dark-label { color: #999; }

.hp-feature-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 80px;
}

.hp-feature-img {
    flex: 0 0 45%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-feature-reverse .hp-feature-inner { flex-direction: row-reverse; }
.hp-feature-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- BIKE FADE ANIMATION ---------- */
.bike-fade-container {
    position: relative;
    height: 550px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bike-fade-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
    max-height: 550px;
    width: auto;
    max-width: 100%;
}

.bike-fade-item.bike-fade-active {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- TEXT FADE ANIMATION ---------- */
.text-fade-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 280px;
}

.text-fade-item {
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.text-fade-item.text-fade-active {
    opacity: 1;
    pointer-events: auto;
}

.text-fade-item h2 {
    margin-bottom: 15px;
}

.text-fade-item p {
    margin-bottom: 20px;
}

.text-fade-item .hp-btn {
    margin-top: 5px;
}

/* ---------- BIKE SLIDER PAGINATION DOTS ---------- */
.bike-slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    padding-bottom: 10px;
}

.slider-dot {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: #ffffff;
    color: var(--text-gray);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.slider-dot:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.15);
}

.slider-dot.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 82, 204, 0.35);
    transform: translateY(-2px);
}

/* ---------- GALLERY SECTION ---------- */
.hp-gallery-section {
    padding: 60px 20px;
    background: var(--light-gray);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ---------- GALLERY LIGHTBOX ---------- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
}

.lightbox-img {
    position: relative;
    z-index: 5;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.35s ease;
}

.gallery-lightbox.active .lightbox-img {
    transform: scale(1);
}

@media (max-width: 600px) {
    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }

    .lightbox-img {
        max-width: 95vw;
        max-height: 80vh;
        border-radius: 10px;
    }
}

.hp-feature-text { flex: 1; }
.hp-feature-text h2 {
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 20px;
}
.hp-feature-text.dark-text h2 { color: var(--dark-blue); }
.hp-feature-text p { font-size: 16px; line-height: 1.8; color: rgba(255,255,255,0.75); margin-bottom: 36px; }
.hp-feature-text.dark-text p { color: var(--text-gray); }

/* ---------- YEARS BANNER ---------- */
.hp-years-banner {
    background: var(--dark-blue);
    padding: 60px 80px;
}
.hp-years-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}
.hp-years-text { flex: 1; }
.hp-years-text h2 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 20px;
}
.hp-years-text p { font-size: 16px; color: rgba(255,255,255,0.7); line-height: 1.8; margin-bottom: 32px; }
.hp-years-logo { flex-shrink: 0; opacity: 0.8; }

/* ---------- NEWS ---------- */
.hp-news { background: var(--light-gray); padding: 60px 20px; }
.hp-news.dark-bg {
    background: var(--dark-blue);
    color: #fff;
}
.hp-news.dark-bg .hp-news-card {
    background: #111a2e;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.hp-news.dark-bg .hp-news-body h3 {
    color: #fff;
}
.hp-news.dark-bg .hp-news-body p {
    color: rgba(255,255,255,0.7);
}
.hp-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.hp-news-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.hp-news-card:hover { transform: translateY(-6px); }
.hp-news-img { height: 200px; overflow: hidden; }
.hp-news-img .img-placeholder { min-height: 200px; }
.hp-news-body { padding: 24px; }
.hp-news-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-blue);
    margin-right: 10px;
}
.hp-news-date { font-size: 12px; color: #aaa; }
.hp-news-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 12px 0 10px;
    line-height: 1.35;
}
.hp-news-body p { font-size: 14px; color: var(--text-gray); line-height: 1.7; }



/* ---------- BIKE PRODUCTS SCROLLING SECTION ---------- */
.hp-bikes-scroll-section {
    background: #fff;
    padding: 60px 0;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}
.hp-bikes-scroll-section .section-title {
    color: var(--dark-blue);
    margin-bottom: 10px;
}
.bikes-scroll-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}
.bikes-scroll-track {
    display: flex;
    width: max-content;
    animation: scrollBikes 30s linear infinite;
}
.bikes-scroll-track:hover {
    animation-play-state: paused;
}
.bike-scroll-card {
    width: 280px;
    margin: 0 12px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.bike-scroll-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 82, 204, 0.15);
    border-color: var(--primary-blue);
}
.bike-scroll-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}
.bike-scroll-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bike-scroll-info {
    padding: 16px;
}
.bike-scroll-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 4px;
    line-height: 1.3;
}
.bike-scroll-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
}

@keyframes scrollBikes {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ---------- INSTAGRAM REELS ---------- */
.hp-reels-section {
    background: var(--light-gray);
    padding: 60px 0;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.hp-reels-section .section-title {
    color: var(--dark-blue);
    margin-bottom: 10px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 15px;
    margin-bottom: 40px;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
}
.reels-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}
.reels-track {
    display: flex;
    width: max-content;
    animation: scrollReels 35s linear infinite;
}
.reels-track:hover {
    animation-play-state: paused;
}
.reel-card {
    width: 320px;
    height: 480px; /* Optimized height for cropped portrait view */
    margin: 0 15px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.reel-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-blue);
    box-shadow: 0 12px 30px rgba(0, 82, 204, 0.15);
}
.reel-card iframe {
    position: absolute;
    width: 100%;
    height: calc(100% + 115px); /* Extra height to push footer out of bounds */
    top: -55px; /* Shift up to crop the header */
    left: 0;
    border: none;
    border-radius: 16px;
}

@keyframes scrollReels {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .hp-hero {
        flex-direction: column;
        min-height: auto;
        margin-top: 72px;
        padding: 0;
    }
    .hp-hero-text {
        flex: none;
        padding: 36px 24px 16px;
        text-align: left;
        align-items: flex-start;
    }
    .hp-hero-text h1 {
        max-width: none;
        font-size: clamp(24px, 5.5vw, 34px);
        line-height: 1.2;
        margin-bottom: 0;
    }
    .hp-hero-tag {
        margin-bottom: 14px;
    }
    .hp-hero-img {
        flex: none;
        width: 100%;
        padding: 8px 16px 28px;
    }
    .hp-hero-img img {
        width: 100%;
        max-height: none;
        height: clamp(200px, 42vw, 320px);
        object-fit: cover;
        border-radius: 8px;
    }

    .hp-intro, .hp-excellence, .hp-years-banner, .hp-feature { padding: 36px 24px; }
    .hp-intro-inner, .hp-excellence-inner, .hp-years-inner { flex-direction: column; gap: 40px; }
    .hp-intro-text,
    .hp-feature-text,
    .hp-years-text {
        text-align: left;
    }
    .hp-intro-img, .hp-excellence-img { width: 100%; height: 300px; flex: none; }
    .hp-intro-img .img-placeholder, .hp-excellence-img .img-placeholder { min-height: 300px; }

    .hp-feature-inner, .hp-feature-reverse .hp-feature-inner { flex-direction: column; gap: 40px; }
    .hp-feature-img { width: 100%; height: auto; flex: none; }

    .hp-years-inner { flex-direction: column; }

    /* Mobile bike fade adjustments */
    .bike-fade-container {
        height: 350px;
    }
    .bike-fade-item {
        max-height: 350px;
    }
    .text-fade-container {
        height: auto;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    section.hp-hero,
    .hp-hero {
        margin-top: 64px;
        padding: 0;
    }

    .hp-hero-text {
        padding: 24px 18px 12px;
    }
    .hp-hero-tag {
        font-size: 10px;
        letter-spacing: 1.4px;
        margin-bottom: 10px;
    }
    .hp-hero-text h1 {
        font-size: clamp(20px, 5.8vw, 26px);
        line-height: 1.28;
    }
    .hp-hero-img {
        padding: 6px 14px 20px;
    }
    .hp-hero-img img {
        height: clamp(180px, 48vw, 240px);
    }

    .hp-intro-text h2 { font-size: 22px; }
    .hp-feature-text h2 { font-size: 28px; }
    .hp-years-text h2 { font-size: 40px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
    .hp-hero-text h1 {
        font-size: 19px;
    }
    .hp-hero-img img {
        height: 175px;
    }
}
