/**
 * MG Hero Slider Styles
 *
 * @package MG_Hero_Slider
 */

/* ==============================================
   1. BASE STYLES
   ============================================== */

.mghs-hero-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
}

/* ==============================================
   2. SLIDE CONTAINER
   ============================================== */

.mghs-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.mghs-slide-active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* ==============================================
   3. BACKGROUND (IMAGE & VIDEO)
   ============================================== */

.mghs-slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mghs-bg-image,
.mghs-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 確保影片在所有裝置上正確顯示 */
.mghs-bg-video {
    min-width: 100%;
    min-height: 100%;
}

/* ==============================================
   4. OVERLAY
   ============================================== */

.mghs-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* ==============================================
   5. CONTENT CONTAINER
   ============================================== */

.mghs-slide-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;

    display: flex;
    align-items: center;
    padding: 0 5%;
}

.mghs-slide-content-inner {
    max-width: 100%;
    width: 100%;
}

/* Alignment */
.mghs-align-left {
    justify-content: flex-start;
}

.mghs-align-center {
    justify-content: center;
    text-align: center;
}

.mghs-align-right {
    justify-content: flex-end;
    text-align: right;
}

/* ==============================================
   6. CONTENT ELEMENTS
   ============================================== */

.mghs-slide-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #f0f0f0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mghs-slide-title {
    font-size: 56px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.mghs-slide-content {
    font-size: 18px;
    color: #e0e0e0;
    margin-bottom: 30px;
    line-height: 1.6;
}

.mghs-slide-content p {
    margin: 0 0 10px 0;
}

.mghs-slide-buttons {
    margin-bottom: 20px;
}

.mghs-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mghs-button:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.mghs-slide-secondary {
    font-size: 14px;
}

.mghs-secondary-link {
    color: #ffffff;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.mghs-secondary-link:hover {
    opacity: 0.8;
}

/* ==============================================
   7. NAVIGATION DOTS
   ============================================== */

.mghs-navigation-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;

    display: flex;
    gap: 10px;
}

.mghs-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.mghs-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.mghs-dot-active {
    background-color: #ffffff;
    width: 30px;
    border-radius: 6px;
}

/* ==============================================
   8. ANIMATIONS
   ============================================== */

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mghs-fade-out {
    animation: fadeOut 0.8s ease forwards;
}

.mghs-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.mghs-slide-active .mghs-slide-content-inner {
    animation: contentFadeIn 1s ease 0.3s backwards;
}

/* ==============================================
   9. RESPONSIVE DESIGN
   ============================================== */

/* Tablet (1024px 以下) */
@media (max-width: 1024px) {
    .mghs-slide {
        height: 60vh;
    }

    .mghs-slide-title {
        font-size: 42px;
    }

    .mghs-slide-content {
        font-size: 16px;
    }
}

/* Mobile (767px 以下) */
@media (max-width: 767px) {
    .mghs-slide {
        height: 70vh;
    }

    .mghs-slide-content-wrapper {
        padding: 0 20px;
        align-items: flex-end;
        padding-bottom: 60px;
    }

    .mghs-slide-content-inner {
        max-width: 100%;
    }

    .mghs-slide-subtitle {
        font-size: 14px;
    }

    .mghs-slide-title {
        font-size: 32px;
    }

    .mghs-slide-content {
        font-size: 15px;
    }

    .mghs-button {
        padding: 12px 30px;
        font-size: 14px;
    }

    /* 移動端強制左對齊 */
    .mghs-align-center,
    .mghs-align-right {
        justify-content: flex-start;
        text-align: left;
    }

    .mghs-navigation-dots {
        bottom: 20px;
    }
}
