/* Empires Listicle Section - Matching Pattern Background */
.empires-section {
    position: relative;
    padding: 0;
    overflow: hidden;
    min-height: 100vh;
    background-color: #111111;
    background-image: linear-gradient(32deg,
            rgba(8, 8, 8, 0.74) 30px,
            transparent);
    background-size: 60px 60px;
    background-position: -5px -5px;
}

/* Content Wrapper */
.empires-content {
    position: relative;
    z-index: 2;
}

/* Section Intro */
.section-intro {
    max-width: 900px;
    margin: 0 auto 6rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.section-number {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    color: rgba(122, 170, 160, 0.411);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.section-header .ornament {
    margin-bottom: 0.5rem;
}

.section-header .ornament img {
    height: 60px;
    width: auto;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #e4d88a;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-subtitle {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    line-height: 1.6;
    color: #a8c8c0;
    margin: 0;
}

.section-description {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    line-height: 2;
    color: #a8c8c0;
}

/* Empire Item */
.empire-item {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 6rem calc((100% - 1400px) / 2 + 2rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    justify-items: center;
    opacity: 1;
    transform: none;
    position: relative;
    z-index: 2;
    background-size: cover;
    background-position: left top;
    background-repeat: no-repeat;
    overflow: hidden;
}

@media (max-width: 1400px) {
    .empire-item {
        padding: 6rem 2rem;
    }
}

.empire-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.empire-content {
    padding: 2rem;
    padding-top: 32rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.75) 100%);
    border-radius: 12px;
    justify-self: start;
    margin-left: -3rem;
}

.empire-number {
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 300;
    color: rgba(196, 164, 74, 0.322);
    line-height: 0.8;
    margin-bottom: 1rem;
}

.empire-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #f4e4aa;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.empire-period {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #ffffff;
    font-style: italic;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
}

.empire-description {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.9;
    color: #ffffff;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
}

.empire-highlights {
    list-style: none;
    margin-bottom: 2rem;
}

.empire-highlights li {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: #ffffff;
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
}

.empire-highlights li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: #c4a44a;
}

.watch-video-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.05) 2px,
            transparent 2px,
            transparent 4px),
        repeating-linear-gradient(-45deg,
            rgba(200, 220, 255, 0.08) 0px,
            rgba(200, 220, 255, 0.08) 1px,
            transparent 1px,
            transparent 3px),
        rgba(220, 235, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        inset 1px 1px 5px rgba(200, 230, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.watch-video-btn:hover {
    background:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(255, 255, 255, 0.08) 2px,
            transparent 2px,
            transparent 4px),
        repeating-linear-gradient(-45deg,
            rgba(200, 220, 255, 0.1) 0px,
            rgba(200, 220, 255, 0.1) 1px,
            transparent 1px,
            transparent 3px),
        rgba(220, 235, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.25),
        inset 0 0 25px rgba(255, 255, 255, 0.15),
        inset 1px 1px 8px rgba(200, 230, 255, 0.3);
}

/* Ensure TV wrapper is also above background */
.main_wrapper {
    position: relative;
    z-index: 2;
    margin-top: 32rem;
    justify-self: end;
    margin-right: -3rem;
}

/* Empire title - hidden on desktop, shown on mobile */
.empire-title {
    display: none;
}

/* Mobile Video Thumbnail - hidden on desktop */
.mobile-video-thumb {
    display: none;
}

/* ===== SMALL LAPTOP BREAKPOINT ===== */
@media (max-width: 1440px) and (min-width: 1025px) {
    .main_wrapper {
        transform: scale(0.8);
        transform-origin: center top;
    }
}

/* ===== TABLET BREAKPOINT ===== */
@media (max-width: 1024px) {
    .empire-item {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4rem 2rem;
        background-position: center bottom;
    }

    .empire-title {
        display: block;
        font-size: 2rem;
        color: #f4e4aa;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 700;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
        margin: 0 0 0.5rem;
    }

    .empire-content {
        padding-top: 2rem;
        margin-left: 0;
        justify-self: center;
        max-width: 700px;
    }

    .main_wrapper {
        display: none;
    }

    .mobile-video-thumb {
        display: flex;
        justify-self: stretch;
        max-width: 100%;
    }

    .watch-video-btn {
        display: none;
    }

    .section-intro {
        margin: 0 auto 4rem;
    }
}

/* ===== MOBILE BREAKPOINT ===== */
@media (max-width: 768px) {
    .empire-item {
        padding: 3rem 1rem;
        gap: 1.5rem;
    }

    .empire-content {
        padding-top: 14rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .empire-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .empire-highlights li {
        font-size: 0.95rem;
        padding-left: 1.5rem;
    }

    .section-intro {
        margin: 0 auto 3rem;
    }

    .section-header {
        padding: 1.5rem 1rem 1rem;
    }
}

/* ===== SMALL PHONE BREAKPOINT ===== */
@media (max-width: 480px) {
    .empire-item {
        padding: 2rem 0.75rem;
        gap: 1rem;
    }

    .empire-content {
        padding-top: 10rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .empire-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .empire-period {
        margin-bottom: 1rem;
    }

    .empire-description {
        margin-bottom: 1.5rem;
    }

    .empire-highlights {
        margin-bottom: 1.5rem;
    }

}

/* Mobile Video Thumbnail Styles */
.mobile-video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.mobile-video-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

.mobile-video-thumb:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

.mobile-video-thumb .thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.mobile-video-thumb:hover .thumb-play {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
}

.mobile-video-thumb .thumb-play::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 3px;
}

.mobile-video-thumb .thumb-label {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}