/**
 * Hero Carousel Styles
 * The Porto Life - Premium Magazine Theme
 */

/* Hero Carousel Container */
.hero-carousel {
    position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 100vh;
    overflow: hidden;
    background: #1a1a1a;
}

/* Individual Slides */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
}

/* Background Image */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 8s ease-out;
}

/* Ken Burns effect for active slides */
.hero-slide.active .hero-bg {
    transform: scale(1.05);
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);

}

/* Content Container */
.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 600px;
    color: var(--white);
    padding-left: 60px;
    animation: slideInContent 1s ease-out;
    position: relative;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -60px;
    bottom: -20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    z-index: -1;
}

[dir="rtl"] .hero-content {
    padding-left: 0;
    padding-right: 60px;
}

[dir="rtl"] .hero-content::before {
    left: -60px;
    right: -20px;
}

/* Slide-in animation for content */
@keyframes slideInContent {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Category Badge */
.hero-category {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    text-decoration: none;
}

/* Title */
.hero-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.5);
        color: rgba(255, 255, 255, 0.95);
}

.hero-title-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.hero-title-link:hover {
    opacity: 0.9;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Hebrew Typography */
[dir="rtl"] .hero-title {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-weight: 700;
    line-height: 1.2;
}

/* Excerpt */
.hero-excerpt {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Meta Information */
.hero-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-author a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.hero-author a:hover {
    color: var(--white, #ffffff);
}

.hero-date {
    position: relative;
}

.hero-date::before {
    content: '•';
    position: absolute;
    left: -12px;
    color: rgba(255, 255, 255, 0.6);
}

[dir="rtl"] .hero-date::before {
    left: auto;
    right: -12px;
}

/* Read More Button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--white, #ffffff);
    border: 2px solid var(--white, #ffffff);
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.read-more-btn span::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

[dir="rtl"] .read-more-btn span::after {
    content: '←';
    margin-left: 0;
    margin-right: 0.5rem;
}

.read-more-btn:hover {
    background: var(--white, #ffffff);
    color: var(--primary-black, #1a1a1a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.read-more-btn .arrow {
    transition: transform 0.3s ease;
}

.read-more-btn:hover .arrow {
    transform: translateX(4px);
}

[dir="rtl"] .read-more-btn:hover .arrow {
    transform: translateX(-4px);
}

/* Navigation Dots */
.hero-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.nav-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s ease;
}

.nav-dot:hover::after {
    background: rgba(255, 255, 255, 0.1);
}

.nav-dot.active {
    background: var(--white, #ffffff);
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Arrow Navigation */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white, #ffffff);
    width: 50px;
    height: 50px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 300;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 3;
    backdrop-filter: blur(20px);
    opacity: 0.7;
}

.hero-arrow:hover {
    background: var(--accent-blue, #2c5aa0);
    border-color: var(--accent-blue, #2c5aa0);
    opacity: 1;
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
}

.hero-arrow.prev {
    left: 30px;
}

.hero-arrow.next {
    right: 30px;
}

.hero-arrow.prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.hero-arrow.next:hover {
    transform: translateY(-50%) translateX(3px);
}

/* RTL Arrow Support */
[dir="rtl"] .hero-arrow.prev {
    left: auto;
    right: 30px;
}

[dir="rtl"] .hero-arrow.next {
    right: auto;
    left: 30px;
}

[dir="rtl"] .hero-arrow.prev:hover {
    transform: translateY(-50%) translateX(3px);
}

[dir="rtl"] .hero-arrow.next:hover {
    transform: translateY(-50%) translateX(-3px);
}

/* RTL Arrow Icon Flipping - flip the visual direction */
[dir="rtl"] .hero-arrow.prev svg {
    transform: scaleX(-1);
}

[dir="rtl"] .hero-arrow.next svg {
    transform: scaleX(-1);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hero container uses common container from main.css */

    .hero-content {
        padding: 0 !important;
        max-width: 100%;
    }

    .hero-content::before {
        left: -15px;
        right: -15px;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(6px);
    }

    [dir="rtl"] .hero-content::before {
        left: -15px;
        right: -15px;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 42px);
        margin-bottom: 15px;
    }

    .hero-excerpt {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hero-meta {
        margin-bottom: 25px;
        gap: 15px;
        flex-wrap: wrap;
    }

    .hero-arrow {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .hero-arrow.prev {
        left: 15px;
    }

    .hero-arrow.next {
        right: 15px;
    }    [dir="rtl"] .hero-arrow.prev {
        left: auto;
        right: 15px;
    }

    [dir="rtl"] .hero-arrow.next {
        right: auto;
        left: 15px;
    }

    /* RTL Arrow Icon Flipping for mobile */
    [dir="rtl"] .hero-arrow.prev svg {
        transform: scaleX(-1);
    }

    [dir="rtl"] .hero-arrow.next svg {
        transform: scaleX(-1);
    }

    .hero-nav {
        bottom: 20px;
        gap: 10px;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
    }

    .read-more-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* .hero-carousel {
        height: 60vh;
        min-height: 400px;
    } */

    .hero-category {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 15px;
    }

    .hero-content {
        padding: 0 !important;
    }

    .hero-excerpt {
        display: none; /* Hide excerpt on very small screens */
    }

    .hero-meta {
        font-size: 13px;
        margin-bottom: 20px;
    }
}

/* Print Styles */
@media print {
    .hero-carousel {
        height: auto;
        min-height: auto;
        page-break-inside: avoid;
    }

    .hero-slide:not(.active) {
        display: none;
    }

    .hero-arrow,
    .hero-nav {
        display: none;
    }

    .hero-bg::after {
        background: rgba(26, 26, 26, 0.5);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-bg,
    .nav-dot,
    .hero-arrow,
    .read-more-btn {
        transition: none;
    }

    .hero-bg {
        transform: none !important;
    }

    @keyframes slideInContent {
        from, to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-bg::after {
        background: rgba(0, 0, 0, 0.8);
    }

    .hero-category {
        border: 2px solid currentColor;
    }

    .read-more-btn {
        border-width: 3px;
    }
}
