/* ========================================
   HERO SLIDER SECTION
   Full-screen hero slider with Ken Burns effect
   ======================================== */

/* Hero Slider Section */
#home {
    padding-top: 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    height: 100vh;
}

/* Hero Slider Container */
.hero-slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--gray-900);
}

/* Hero Slider Wrapper */
.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Hero Slide */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Hero Slide Image with Ken Burns Effect */
.hero-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.hero-slide-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1);
    display: block;
}

/* Default Background for slides without images */
.hero-default-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #8b5cf6 100%);
}

.hero-default-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff20" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,213.3C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

/* Hero Slide Content */
.hero-slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2;
    padding: 0 50px 40px;
}

.hero-content-inner {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (max-width: 968px) {
    .hero-content-inner {
        width: 80%;
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .hero-content-inner {
        width: 90%;
        padding: 25px 20px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .hero-content-inner {
        width: 95%;
        padding: 20px 15px;
        border-radius: 12px;
    }
}

/* Hero Title with Fade Animation */
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-shadow:
        0 2px 10px rgba(0,0,0,0.8),
        0 4px 20px rgba(0,0,0,0.6),
        0 0 40px rgba(0,0,0,0.4);
    word-break: break-word;
    hyphens: auto;
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.en .hero-title {
    font-size: 2.5rem;
}

body.th .hero-title {
    font-size: 2.2rem;
    line-height: 1.4;
}

/* Hero Subtitle with Fade Animation */
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 400;
    text-shadow:
        0 1px 5px rgba(0,0,0,0.8),
        0 2px 10px rgba(0,0,0,0.6),
        0 0 20px rgba(0,0,0,0.4);
    word-break: break-word;
    hyphens: auto;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

body.th .hero-subtitle {
    font-size: 1rem;
    line-height: 1.7;
}

/* Camera Caption Override */
.camera_caption {
    height: 100% !important;
    bottom: 0 !important;
}

.camera_caption > div {
    padding: 0 !important;
}

/* Camera Controls - Move to Bottom Right */
.camera_commands {
    position: absolute !important;
    top: auto !important;
    bottom: 30px !important;
    right: 20px !important;
    margin-top: 0 !important;
}

@media (max-width: 768px) {
    .camera_commands {
        bottom: 80px !important;
        right: 15px !important;
    }

    .camera_pie {
        top: 118px;
        right: 5px;
    }
}

/* Camera Pie Loader - Position next to Controls */
.camera_pie {
    position: absolute;
    top: auto;
    bottom: 68px;
    right: 64px;
}

/* Hero Buttons with Fade Animation */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Navigation Arrows */
.hero-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-size: 20px;
}

.hero-nav-arrow i {
    color: white;
    font-size: 1em;
}

.hero-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-50%) scale(1.1);
}

.hero-nav-prev {
    left: 30px;
}

.hero-nav-next {
    right: 30px;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    display: none;
}

/* Dots Indicator */
.hero-dots-container {
    position: absolute;
    bottom: 13px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.hero-dot.active {
    background: white;
    width: 35px;
    border-radius: 6px;
}

/* Loading Animation */
.hero-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hero-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================
   HERO SLIDER RESPONSIVE DESIGN
   Breakpoints for all device sizes:
   - 1366px: Large tablets landscape (iPad Pro)
   - 1200px: Desktop / Small laptops
   - 1024px: iPad Pro portrait
   - 968px: Tablets landscape / Small laptops
   - 768px: Tablets portrait (iPad Mini/Air)
   - 480px: Large phones (iPhone Plus, Android)
   - 375px: Small phones (iPhone 6/7/8/SE)
   - 320px: Extra small phones (iPhone 5/SE)
   ======================================== */

/* Large Tablets Landscape - iPad Pro 12.9" Landscape */
@media (max-width: 1366px) {
    .hero-slide-content {
        padding: 0 40px 35px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    body.en .hero-title {
        font-size: 2.4rem;
    }

    body.th .hero-title {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 1.08rem;
    }

    body.th .hero-subtitle {
        font-size: 0.98rem;
    }
}

/* Desktop / Small Laptops */
@media (max-width: 1200px) {
    .hero-slider-container {
        height: 100vh;
    }

    .hero-slide-content {
        padding: 0 15px 12px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    body.th .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    body.th .hero-subtitle {
        font-size: 0.95rem;
    }
}

/* iPad Pro Portrait - 1024px */
@media (max-width: 1024px) {
    .hero-slide-content {
        padding: 0 25px 25px;
    }

    .hero-title {
        font-size: 2rem;
    }

    body.en .hero-title {
        font-size: 2rem;
    }

    body.th .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 750px;
    }

    body.th .hero-subtitle {
        font-size: 0.92rem;
    }

    .hero-nav-arrow {
        width: 48px;
        height: 48px;
        font-size: 19px;
    }

    .hero-nav-prev {
        left: 25px;
    }

    .hero-nav-next {
        right: 25px;
    }
}

/* Tablets Landscape / Small Laptops - 968px */
@media (max-width: 968px) {
    .hero-slider-container {
        height: 500px;
    }

    .hero-slide-content {
        padding: 0 30px 30px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    body.th .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 700px;
        margin-bottom: 20px;
    }

    body.th .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .hero-nav-prev {
        left: 20px;
    }

    .hero-nav-next {
        right: 20px;
    }

    .hero-dots-container {
        bottom: 20px;
    }
}

@media (max-width: 768px) {
    #home, .hero-slider-container {
        height: 100vh;
    }

    /* Bottom Card Style for Mobile */
    .hero-slide-content {
        padding: 0;
        padding-bottom: 65px; /* Space for mobile-bottom-nav */
        align-items: flex-end;
        justify-content: flex-end;
    }

    .hero-content-inner {
        width: 100%;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 24px 24px 0 0;
        padding: 28px 24px 24px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    }

    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 12px;
        color: #1e3a8a;
        text-shadow: none;
    }

    body.th .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.92rem;
        margin-bottom: 20px;
        color: #475569;
        text-shadow: none;
    }

    body.th .hero-subtitle {
        font-size: 0.88rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 12px;
        width: 100%;
    }

    .hero-buttons .btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 14px;
        min-width: 0;
    }

    .hero-btn-secondary {
        background: #f1f5f9;
        color: #1e3a8a;
        border: 2px solid #e2e8f0;
    }

    .hero-btn-secondary:hover {
        background: #e2e8f0;
        color: #1e3a8a;
        border-color: #cbd5e1;
    }

    body.th .btn {
        font-size: 13px;
        padding: 14px 14px;
    }

    .hero-nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: 35%;
    }

    .hero-nav-prev {
        left: 12px;
    }

    .hero-nav-next {
        right: 12px;
    }

    .hero-dots-container {
        bottom: auto;
        top: 58%;
        gap: 10px;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
        background: rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }

    .hero-dot.active {
        width: 30px;
        background: white;
    }
}

@media (max-width: 480px) {
    #home, .hero-slider-container {
        height: 100vh;
    }

    .hero-slide-content {
        padding: 0;
        padding-bottom: 0 !important;
    }

    .hero-content-inner {
        padding: 24px 20px 22px;
        border-radius: 20px 20px 0 0;
    }

    .hero-title,
    body.en .hero-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    body.th .hero-title {
        font-size: 0.95rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 18px;
        line-height: 1.6;
    }

    body.th .hero-subtitle {
        font-size: 0.82rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }

    .hero-buttons .btn {
        flex: 1;
        padding: 12px 12px;
        font-size: 13px;
    }

    body.th .hero-buttons .btn {
        font-size: 12px;
        padding: 12px 10px;
    }

    .hero-nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
        top: 30%;
    }

    .hero-nav-prev {
        left: 10px;
    }

    .hero-nav-next {
        right: 10px;
    }

    .hero-dots-container {
        top: 52%;
        gap: 8px;
    }

    .hero-dot {
        width: 8px;
        height: 8px;
    }

    .hero-dot.active {
        width: 24px;
    }
}

/* Small Phones - iPhone 6/7/8/SE - 375px */
@media (max-width: 375px) {
    .hero-content-inner {
        padding: 20px 16px 18px;
        border-radius: 18px 18px 0 0;
    }

    .hero-title,
    body.en .hero-title {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    body.th .hero-title {
        font-size: 0.9rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 15px;
        line-height: 1.5;
    }

    body.th .hero-subtitle {
        font-size: 0.78rem;
    }

    .hero-buttons {
        gap: 8px;
    }

    .hero-buttons .btn {
        padding: 10px 10px;
        font-size: 12px;
    }

    body.th .hero-buttons .btn {
        font-size: 11px;
        padding: 10px 8px;
    }

    .hero-nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 12px;
        top: 28%;
    }

    .hero-nav-prev {
        left: 8px;
    }

    .hero-nav-next {
        right: 8px;
    }

    .hero-dots-container {
        top: 48%;
        gap: 6px;
    }

    .hero-dot {
        width: 7px;
        height: 7px;
    }

    .hero-dot.active {
        width: 20px;
    }
}

/* Extra Small Phones - iPhone 5/SE - 320px */
@media (max-width: 320px) {
    .hero-content-inner {
        padding: 16px 12px 14px;
        border-radius: 16px 16px 0 0;
    }

    .hero-title,
    body.en .hero-title {
        font-size: 0.88rem;
        margin-bottom: 6px;
    }

    body.th .hero-title {
        font-size: 0.85rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
        margin-bottom: 12px;
        line-height: 1.45;
    }

    body.th .hero-subtitle {
        font-size: 0.72rem;
    }

    .hero-buttons {
        gap: 6px;
    }

    .hero-buttons .btn {
        padding: 8px 8px;
        font-size: 11px;
    }

    body.th .hero-buttons .btn {
        font-size: 10px;
        padding: 8px 6px;
    }

    .hero-nav-arrow {
        width: 28px;
        height: 28px;
        font-size: 10px;
        top: 25%;
    }

    .hero-nav-prev {
        left: 6px;
    }

    .hero-nav-next {
        right: 6px;
    }

    .hero-dots-container {
        top: 45%;
        gap: 5px;
    }

    .hero-dot {
        width: 6px;
        height: 6px;
    }

    .hero-dot.active {
        width: 16px;
    }
}
