﻿/* ===================================================
   banner image
=================================================== */
.hero-index {
    background-image: url('/images/banner/hero-index.webp');
    animation: heroZoom 12s ease-in-out infinite, heroFade1 12s infinite;
}
/* Mobile */
@media (max-width: 768px) {
    .hero-index {
        background-position: 78% center !important;
    }
}

.hero-about {
    background-image: url('/images/banner/banner_aboutUs.webp');
}
.banner-article {
    background-image: url('/images/banner/banner_article.webp');
}
.banner-contact {
    background-image: url('/images/banner/banner_contactus.webp');
}
.banner-lawyer {
    background-image: url('/images/banner/banner_lawyers.webp');
}
.banner-service {
    background-image: url('/images/banner/banner_service.webp');
}

/* ==============================
banner
============================== */
.banner-img {
    border-radius: 10px;
}

.banner {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center; /* กึ่งกลางแนวตั้ง */
    justify-content: center; /* กึ่งกลางแนวนอน */

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}


.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

    .banner-content h1 {
        color: #fff;
        font-size: 3rem;
        font-weight: 700;
        text-shadow: 0 3px 8px rgba(0,0,0,.55);
    }
    /*สำหรับข้อความรอง*/
    .banner-content p {
        color: #fff;
        text-shadow: 0 2px 6px rgba(0,0,0,.55);
    }


.banner-overlay {
    position: absolute;
    inset: 0;
    /*background: linear-gradient( rgba(10,20,40,.60), rgba(10,20,40,.35) );*/
    background: linear-gradient( 90deg, rgba(5,20,45,.70) 0%, rgba(5,20,45,.35) 45%, rgba(5,20,45,.20) 100% );
}

/* Overlay สีกรมเข้มด้านซ้าย to right =90deg */
.banner-overlay-golden-left {
    position: absolute;
    inset: 0;
    background: linear-gradient( 90deg, rgba(8, 25, 55, 0.85) 0%, /* ซ้ายเข้ม */
    rgba(8, 25, 55, 0.55) 35%, /* กลาง */
    rgba(8, 25, 55, 0.10) 75%, /* ขวาโปร่ง */
    rgba(8, 25, 55, 0) 100% );
}
/* Overlay สีกรมเข้มด้านขวา   to left =270deg*/
.banner-overlay-golden-right {
    position: absolute;
    inset: 0;
    background: linear-gradient( to left, rgba(8, 25, 55, 0.85) 0%, rgba(8, 25, 55, 0.55) 35%, rgba(8, 25, 55, 0.10) 75%, rgba(8, 25, 55, 0) 100% );
}


/* ==============================
   HERO 1 รูปภาพเดียว (หน้าแรก,หน้าบริการ,หน้าเกี่ยวกับเรา)
============================== */
.hero {
    min-height: 100vh;
    height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* ใส่เฉดสี จากด้านล่าง เพื่อให้สัมพันธ์กับ section ถัดไป */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px; /* ปรับได้ 50-100px */

    background: linear-gradient( to bottom, rgba(11,31,58,0) 0%, rgba(11,31,58,.25) 30%, rgba(11,31,58,.6) 60%, #0B1F3A 100% );
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}
 
.hero-content {
    position: relative;
    z-index: 2;
}

.hero-fade h1 {
    line-height: 1.1;
    margin-bottom: 0.2rem;
}
/* ==============================
Ken Burns Effect ภาพจะค่อย ๆ ซูมเข้า และซูมออก อย่างช้า ๆ
    -หน้าแรก (Home),หน้าบริการ (Services),หน้าเกี่ยวกับเรา (About)
============================== */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-index {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: heroZoom 60s linear infinite alternate; /*heroZoom 3s */
    animation: heroZoom 12s ease-in-out infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 2;
}

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
        transform: scale(1.05);
    }
}




/* ==============================
   HERO 2 รูปภาพสลับกัน 2 รูป (หน้าแรก,หน้าบริการ,หน้าเกี่ยวกับเรา)
============================== */

.hero2 {
    position: relative;
    overflow: hidden;
    height: 100vh; 
}

.hero2-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
} 

.hero2-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 35, 80, 0.31); น้ำเงินเข้ม โปร่งใส 31% 
z-index: 1;
}

/*รูปที่ 1 */
.hero2-bg-1 {
    background-image: url('../images/hero/hero3.jpg');
    animation: hero2Zoom 12s ease-in-out infinite, hero2Fade1 12s infinite;
}

/*รูปที่ 2 */
.hero2-bg-2 {
    background-image: url('../images/hero/hero4.jpg');
    animation: hero2Zoom 12s ease-in-out infinite, hero2Fade2 12s infinite;
}

.hero2-content {
    position: relative;
    z-index: 2; 
    padding-top: 320px;   ปรับตามความสูง Navbar 
}

@keyframes hero2Zoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

@keyframes hero2Fade1 {
    0%,45% {
        opacity: 1;
    }

    50%,100% {
        opacity: 0;
    }
}

@keyframes hero2Fade2 {
    0%,45% {
        opacity: 0;
    }

    50%,95% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}




