/* ==========================================================
   STYLE-SECTIONS.CSS - จัดการเลย์เอาต์และดีไซน์ส่วนต่างๆ ของเว็บไซต์
   ========================================================== */

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.65) 100%);
    z-index: 2;
}

.hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    z-index: 3;
    width: 100%;
}

.hero-content {
    max-width: 700px;
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 40px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f-icon {
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1.1rem;
}

.f-text {
    display: flex;
    flex-direction: column;
}

.f-text strong {
    font-size: 0.9rem;
    color: #ffffff;
}

.f-text span {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* --- Intro / Services Section --- */
.intro-section {
    padding: 80px 20px;
    background-color: #ffffff;
}

.intro-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.section-tag {
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 10px;
}

.intro-text-box h2 {
    font-size: 2.2rem;
    color: #0f172a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.intro-lead {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 15px;
}

.intro-action {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.call-out-text {
    font-weight: 600;
    color: #0f172a;
}

.btn-intro-action {
    background-color: #10b981;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
    text-decoration: none;
}

.btn-intro-action:hover {
    background-color: #059669;
}

/* การ์ดโปรโมชั่นด้านขวา */
.car-card-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
}

.price-tag-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.price-label {
    font-size: 0.8rem;
    color: #64748b;
}

.price-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2563eb;
}

.car-features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 20px;
}

.car-features-list i {
    color: #10b981;
    margin-right: 5px;
}

.car-img-wrapper {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.showcase-car-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-footer-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-footer-contact a {
    color: #2563eb;
    text-decoration: none;
}

.web-url {
    color: #64748b;
    font-size: 0.85rem;
}

/* --- Fleet Section --- */
.fleet-section {
    padding: 80px 20px;
    background-color: #ffffff;
}

.fleet-container {
    max-width: 1200px;
    margin: 0 auto;
}

.fleet-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px auto;
}

.fleet-tag {
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fleet-header h2 {
    font-size: 2.2rem;
    color: #0f172a;
    margin: 10px 0;
}

.fleet-header p {
    color: #64748b;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.fleet-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.fleet-img-box {
    position: relative;
    height: 220px;
}

.fleet-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
}

.fleet-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.fleet-info h3 {
    font-size: 1.5rem;
    color: #0f172a;
    margin: 5px 0 15px 0;
}

.fleet-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.fleet-features i {
    color: #10b981;
    margin-right: 8px;
}

.fleet-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.p-label {
    font-size: 0.75rem;
    color: #64748b;
}

.p-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2563eb;
}

.p-amount span {
    font-size: 0.8rem;
    font-weight: normal;
    color: #64748b;
}

.btn-fleet-book {
    background-color: #f1f5f9;
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-fleet-book:hover {
    background-color: #2563eb;
    color: #ffffff;
}

/* --- Modal รายละเอียดรถตู้ (Popup) --- */
.car-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85); /* เอา backdrop-filter ออกเพื่อแก้ปัญหาหน่วง/ค้างเวลากดรัวๆ */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow-y: auto; 
}

.car-modal.active {
    display: flex; 
}

.modal-content-box {
    background: #ffffff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh; 
    overflow-y: auto; 
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s ease;
    margin: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close-btn {
    position: sticky; 
    top: 0;
    float: right;
    z-index: 100;
    background: #f1f5f9;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* --- จัดการกล่องแสดงภาพหลักใน Modal --- */
.modal-slider-container {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.modal-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
    will-change: transform; /* เพิ่มเพื่อให้เบราว์เซอร์เรนเดอร์ผ่าน GPU ลื่นไหลขึ้น */
}

.modal-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* --- จัดการแถบภาพย่อย (Thumbnails) ใน Modal --- */
.modal-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.modal-thumb {
    width: 75px;
    height: 55px; 
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: #e2e8f0;
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumb:hover {
    opacity: 0.9;
}

.modal-thumb.active {
    border-color: #2563eb;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
/* เปิดใช้งานการเลื่อนหน้าจอแบบสมูททั่วทั้งเว็บไซต์ */
html {
    scroll-behavior: smooth;
}

/* ป้องกันไม่ให้แถบเมนูแบบ Fixed บดบังหัวข้อเวลาเลื่อนลงไป */
section, div[id] {
    scroll-margin-top: 90px; /* ปรับความสูงตามขนาดของ Navbar คุณ (ประมาณ 80-100px) */
}