/**
 * AIEdu Platform - Design System & Flank Pano Banners
 * Scoped styles for Launcher / Hub Canvas and Propaganda Pano Flanks
 *
 * @package AppStyle
 * @author Luong Huu Nam
 * @version 3.4.10
 */

/* ==========================================================
   1. Viewport 3-Column Layout Container (Flush Edge Pinning)
   ========================================================== */
.aiedu-viewport-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: calc(100dvh - var(--nav-min-height, 65px));
    width: 100%;
    overflow-x: hidden;
    position: relative;
    padding: 0 var(--flank-edge-gap, 10px);
    gap: 15px;
    box-sizing: border-box;
}

/* Center Stage Canvas */
.aiedu-center-stage {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    transition: max-width 0.3s ease;
}

/* ==========================================================
   2. Flank Pano Banners (Left & Right Wings)
   ========================================================== */
.aiedu-flank-banner {
    width: 260px;
    min-width: 220px;
    max-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    box-sizing: border-box;
    z-index: 10;
    position: sticky;
    top: 15px;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100dvh - var(--nav-min-height, 65px) - 30px);
}

/* Sát mép viền bên trái */
.aiedu-flank-left {
    order: -1;
    margin-left: 0 !important;
    margin-right: auto;
}

/* Sát mép viền bên phải */
.aiedu-flank-right {
    order: 1;
    margin-right: 0 !important;
    margin-left: auto;
}

/* Common Link Container */
.aiedu-flank-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 18px;
    outline: none;
}

.aiedu-flank-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(251, 192, 45, 0.7);
}

/* ==========================================================
   3. Formal Propaganda Pano Card (HTML / Text Mode)
   ========================================================== */
.aiedu-flank-pano-card {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #b71c1c 0%, #c62828 35%, #8b0000 100%);
    border: 2px solid rgba(251, 192, 45, 0.6);
    border-radius: 18px;
    padding: 28px 18px 75px 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 
                0 0 25px rgba(211, 47, 47, 0.35), 
                inset 0 0 25px rgba(251, 192, 45, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.aiedu-flank-pano-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65), 
                0 0 35px rgba(251, 192, 45, 0.45), 
                inset 0 0 30px rgba(251, 192, 45, 0.25);
    border-color: #ffd54f;
}

/* Inner Frame Lines */
.aiedu-pano-inner-border {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid rgba(251, 192, 45, 0.3);
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

/* Emblem Badge */
.aiedu-pano-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 192, 45, 0.25) 0%, rgba(183, 28, 28, 0.6) 80%);
    border: 1.5px solid #fbc02d;
    box-shadow: 0 0 16px rgba(251, 192, 45, 0.5), inset 0 0 8px rgba(251, 192, 45, 0.4);
    margin-bottom: 14px;
    z-index: 2;
    flex-shrink: 0;
}

.aiedu-pano-emblem svg {
    width: 28px;
    height: 28px;
    fill: #fbc02d;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Pano Title (Supports Solid Color or CSS Gradient) */
.aiedu-pano-title {
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.45;
    color: #fbc02d;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
    margin: 0 0 14px 0;
    z-index: 2;
    word-break: break-word;
}

/* Golden Decorative Divider */
.aiedu-pano-divider {
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fbc02d 50%, transparent);
    border-radius: 2px;
    margin-bottom: 16px;
    z-index: 2;
    flex-shrink: 0;
}

/* Pano Slogan Content (Supports Solid Color or CSS Gradient) */
.aiedu-pano-body {
    font-family: var(--font-family);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.65;
    color: #fff9c4;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    margin: 0;
    z-index: 2;
    white-space: pre-line;
    word-break: break-word;
}

/* Lotus Watermark at Bottom */
.aiedu-pano-lotus-watermark {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 85px;
    pointer-events: none;
    opacity: 0.24;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(251, 192, 45, 0.6));
    transition: opacity 0.3s ease;
}

.aiedu-flank-pano-card:hover .aiedu-pano-lotus-watermark {
    opacity: 0.38;
}

/* ==========================================================
   4. Image Pano Card (Image Mode)
   ========================================================== */
.aiedu-flank-image-card {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(251, 192, 45, 0.4);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 
                0 0 20px rgba(211, 47, 47, 0.25);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.aiedu-flank-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65), 
                0 0 30px rgba(251, 192, 45, 0.4);
    border-color: #ffd54f;
}

.aiedu-flank-img {
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    transition: transform 0.4s ease;
}

.aiedu-flank-image-card:hover .aiedu-flank-img {
    transform: scale(1.02);
}

/* ==========================================================
   5. Responsive Breakpoints
   ========================================================== */
@media screen and (max-width: 1400px) {
    .aiedu-viewport-container {
        padding: 0 var(--flank-edge-gap, 8px);
        gap: 10px;
    }
    .aiedu-flank-banner {
        width: 220px;
        min-width: 190px;
        padding: 16px 0;
    }
    .aiedu-flank-pano-card {
        padding: 22px 14px 65px 14px;
    }
    .aiedu-pano-emblem {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }
    .aiedu-pano-emblem svg {
        width: 24px;
        height: 24px;
    }
    .aiedu-pano-title {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    .aiedu-pano-body {
        font-size: 0.84rem;
        line-height: 1.55;
    }
    .aiedu-pano-lotus-watermark {
        width: 110px;
        height: 70px;
    }
}

@media screen and (max-width: 1100px) {
    .aiedu-flank-banner {
        display: none !important;
    }
    .aiedu-center-stage {
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100%;
    }
    .aiedu-viewport-container {
        padding: 0;
        gap: 0;
    }
}
