/**
 * Breadcrumb Hero Component
 * Professional, responsive breadcrumb section with BEM methodology
 * Mobile-first approach with RTL support
 */

:root {
    --breadcrumb-bg: #FDF8F0;
    --breadcrumb-text-primary: #212529;
    --breadcrumb-text-secondary: #6c757d;
    --breadcrumb-divider-color: #FBBB04;
    --breadcrumb-spacing-xs: 1rem;
    --breadcrumb-spacing-sm: 1.5rem;
    --breadcrumb-spacing-md: 2rem;
    --breadcrumb-spacing-lg: 3rem;
    --breadcrumb-spacing-xl: 4.5rem;
    --breadcrumb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles - Mobile First */
section.breadcrumb-hero {
    background-color: var(--breadcrumb-bg) !important;
    padding: var(--breadcrumb-spacing-lg) 0 !important;
    position: relative;
    overflow: hidden;
}

.breadcrumb-hero__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--breadcrumb-spacing-xs);
}

.breadcrumb-hero__wrapper {
    display: flex;
    align-items: center;
    gap: var(--breadcrumb-spacing-md);
    flex-wrap: wrap;
    flex-direction: column;
}

.breadcrumb-hero__image-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    max-width: 48px !important;
    margin: 0 auto;
}

.breadcrumb-hero__image-wrapper img,
.breadcrumb-hero__image {
    width: 100% !important;
    max-width: 48px !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: 8px;
    transition: var(--breadcrumb-transition);
}

.breadcrumb-hero__divider {
    display: none;
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 2px;
    height: 80%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--breadcrumb-divider-color),
        transparent
    );
    margin-left: var(--breadcrumb-spacing-sm);
}

[dir="rtl"] .breadcrumb-hero__divider {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: var(--breadcrumb-spacing-sm);
}


.breadcrumb-hero__content {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.breadcrumb-hero__content h1,
.breadcrumb-hero__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--breadcrumb-text-primary) !important;
    margin: 0 0 var(--breadcrumb-spacing-xs) 0 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.breadcrumb-hero__description {
    font-size: clamp(0.875rem, 2vw, 1rem) !important;
    line-height: 1.7 !important;
    color: var(--breadcrumb-text-secondary) !important;
    margin: 0 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Video Wrapper Styles */
.breadcrumb-hero__video-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    max-width: 100% !important;
    margin: 0 auto;
    order: -1; /* Default: video appears first on mobile */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.breadcrumb-hero__video-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Mobile: Reduce video size */
@media (max-width: 767px) {
    .breadcrumb-hero__video-wrapper {
        max-width: 90% !important;
    }
}

.breadcrumb-hero__video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
    max-width: 100% !important;
    transition: all 0.3s ease;
}

.breadcrumb-hero__video-wrapper:hover .breadcrumb-hero__video-responsive {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(175, 137, 70, 0.3);
}

.breadcrumb-hero__video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Hide YouTube's play button overlay */
.breadcrumb-hero__video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 0;
}


@media (max-width: 767px) {
    .breadcrumb-hero__video-wrapper::before {
        width: 50px;
        height: 50px;
    }

    .breadcrumb-hero__video-wrapper::after {
        border-left: 16px solid #FBBB04;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }
}

/* Tablet Styles - 576px and up */
@media (min-width: 576px) {
    .breadcrumb-hero {
        padding: var(--breadcrumb-spacing-xl) 0;
    }

    .breadcrumb-hero__container {
        padding: 0 var(--breadcrumb-spacing-sm);
    }

    .breadcrumb-hero__image-wrapper {
        max-width: 60px !important;
    }

    .breadcrumb-hero__image-wrapper img,
    .breadcrumb-hero__image {
        max-width: 60px !important;
    }
}

/* Desktop Styles - 768px and up */
@media (min-width: 768px) {
    .breadcrumb-hero__wrapper {
        flex-wrap: nowrap;
        gap: var(--breadcrumb-spacing-lg);
        flex-direction: row;
    }

    .breadcrumb-hero__image-wrapper {
        max-width: 72px !important;
        margin: 0;
    }

    .breadcrumb-hero__image-wrapper img,
    .breadcrumb-hero__image {
        max-width: 72px !important;
    }

    .breadcrumb-hero__divider {
        display: block;
    }

    .breadcrumb-hero__title {
        margin-bottom: var(--breadcrumb-spacing-sm);
    }

    .breadcrumb-hero__content {
        text-align: left;
        flex: 1;
    }

    [dir="rtl"] .breadcrumb-hero__content {
        text-align: right;
    }

    /* Video wrapper on desktop */
    .breadcrumb-hero__video-wrapper {
        max-width: 280px !important;
        flex: 0 0 280px !important;
        margin: 0;
        order: 0; /* Reset order for desktop */
    }

    /* Arabic (RTL): Video on right */
    [dir="rtl"] .breadcrumb-hero__video-wrapper {
        order: 2;
    }

    /* English (LTR): Video on left */
    html:not([dir="rtl"]) .breadcrumb-hero__video-wrapper {
        order: -1;
    }
}

/* Large Desktop Styles - 992px and up */
@media (min-width: 992px) {
    .breadcrumb-hero__container {
        padding: 0 var(--breadcrumb-spacing-md);
    }

    .breadcrumb-hero__image-wrapper {
        max-width: 84px !important;
    }

    .breadcrumb-hero__image-wrapper img,
    .breadcrumb-hero__image {
        max-width: 84px !important;
    }

    .breadcrumb-hero__video-wrapper {
        max-width: 320px !important;
        flex: 0 0 320px !important;
    }

    .breadcrumb-hero__title {
        font-size: 1.875rem !important;
    }

    .breadcrumb-hero__description {
        font-size: 1.0625rem !important;
    }
}

/* Extra Large Desktop Styles - 1200px and up */
@media (min-width: 1200px) {
    .breadcrumb-hero__image-wrapper {
        max-width: 96px !important;
    }

    .breadcrumb-hero__image-wrapper img,
    .breadcrumb-hero__image {
        max-width: 96px !important;
    }

    .breadcrumb-hero__video-wrapper {
        max-width: 350px !important;
        flex: 0 0 350px !important;
    }
}

/* Print Styles */
@media print {
    .breadcrumb-hero {
        background: transparent;
        padding: var(--breadcrumb-spacing-sm) 0;
    }

    .breadcrumb-hero__divider {
        display: none;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .breadcrumb-hero__image-wrapper img,
    .breadcrumb-hero__image {
        transition: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .breadcrumb-hero {
        border: 2px solid var(--breadcrumb-text-primary);
    }

    .breadcrumb-hero__divider {
        background-color: var(--breadcrumb-text-primary);
    }
}
