/* ===== Local Fonts ===== */
@font-face{
    font-family: 'Marcellus';
    src: url('Fonts/Marcellus-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Prompt (หลายน้ำหนัก) */
@font-face{
    font-family: 'Prompt';
    src: url('Fonts/Prompt-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family: 'Prompt';
    src: url('Fonts/Prompt-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family: 'Prompt';
    src: url('Fonts/Prompt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family: 'Prompt';
    src: url('Fonts/Prompt-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family: 'Prompt';
    src: url('Fonts/Prompt-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family: 'Prompt';
    src: url('Fonts/Prompt-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== Helper classes ===== */
.font-marcellus { font-family: 'Marcellus', serif; }
.font-prompt    { font-family: 'Prompt', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

/* ===== HEADER STYLES ===== */
header {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    padding: 12px 60px;
    gap: 20px;
}

.header-top a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 12px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 60px 15px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-left {
    display: flex;
    gap: 35px;
}

.nav-left a {
    color: white;
    text-decoration: none;
    font-size: 17px; 
    font-weight: 300 !important;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 8px;
    letter-spacing: 2px;
}

.nav-right {
    display: flex;
    gap: 35px;
}

.nav-right a {
    color: white;
    text-decoration: none;
    font-size: 17px; 
    font-weight: 300 !important;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.burger-menu span {
    width: 25px;
    height: 2px;
    background: white;
    transition: all 0.3s;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #2a2a2a;
    padding: 20px;
    gap: 15px;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-corebusiness {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 40px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 16px;
    line-height: 1.7;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
    margin: 0 auto;
}

/* ===== CORE BUSINESS SECTION - FULL WIDTH ===== */
.core-business {
    background: #fff;
    padding: 90px 80px;
}

/* เปลี่ยน core-wrapper ให้เต็มความกว้าง - เอาส่วนขวาออก */
.core-wrapper {
    display: block; /* เปลี่ยนจาก grid */
    width: 100%;
}

/* ซ่อนส่วนข้อความฝั่งขวา */
.core-header {
    display: none;
}

/* Business Carousel - Full Width */
.business-carousel {
    display: flex;
    height: 580px;          /* ปรับให้เหมาะกับรูป 340px */
    width: 100%;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

.business-column {
    flex: 0 0 60px;
    background: #ebebeb;
    background-size: cover;
    background-position: center;
    border-right: 1px solid #d8d8d8;
    position: relative;
    cursor: pointer;
    transition: flex 0.4s ease;
}

/* ใช้รูปพื้นหลังเมื่อมี data-bg-url */
.business-column[data-bg-url]:not([data-bg-url=""]) {
    background-image: var(--bg-url);
}

.business-column:first-child {
    border-left: 1px solid #d8d8d8;
}

.business-column:hover {
    background: #e5e5e5;
}

.business-column.active {
    flex: 1;
    background: #f9f9f9;
}

.business-number {
    position: absolute;
    left: 22px;
    top: 20px;
    font-size: 18px;
    color: #bcbcbc;
    font-weight: 500;
    z-index: 10;            /* เพิ่ม z-index เพื่อให้ลอยเหนือรูป */
}

.business-column.active .business-number {
    color: #888;            /* เปลี่ยนสีเมื่อ active เหมือน index */
}

.business-side-text {
    writing-mode: vertical-rl;
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) rotate(180deg);
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.business-column.active .business-side-text {
    display: none;
}

.business-main {
    display: none;
    height: 100%;           /* เหมือน index - ไม่มี padding มาก */
}

.business-column.active .business-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 0px 30px;    /* เอา padding บน ซ้าย ขวา ออกหมด เหลือแค่ล่าง */
}

.business-image {
    width: 100%;
    height: 340px;          /* ขนาดกลางๆ - ไม่เล็กเกินไป ไม่ใหญ่เกินไป */
    overflow: hidden;
    background: #d5d5d5;
    margin-bottom: 20px;
    position: relative;
}

.business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.business-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #111;
    text-align: center;
}

.business-info h5 {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 16px;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

.business-info p {
    font-size: 13px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 24px;
    text-align: center;
    max-width: 300px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #2e7df6;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #1c6ce8;
}

/* ===== INFO SECTION (รูปแบบเดียวกับ about.php) ===== */
.info-section {
    padding: 90px 80px;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

.info-left h2 {
    font-size: 32px;
    font-weight: 600;
    color: #333;
}

.info-right h3 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
}

.info-right p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* ===== FOOTER ===== */
footer {
    background: #f5f5f5;
    padding: 50px 80px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.footer-col p, .footer-col a {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    text-decoration: none;
}

.footer-col a:hover {
    color: #333;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
}

.footer-nav {
    display: flex;
    gap: 30px;
}

.footer-nav a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.footer-nav a:hover {
    color: #333;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .core-business {
        padding: 60px 40px;
    }
    
    .business-carousel {
        height: auto;
        min-height: 400px;
    }
    
    .info-section {
        padding: 60px 40px;
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
        background: #2a2a2a;
    }

    .header-top {
        padding: 10px 20px;
    }

    .header-main {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: none;
    }

    .nav-left, .nav-right {
        display: none;
    }

    .logo-container {
        position: static;
        transform: none;
    }

    .burger-menu {
        display: flex;
    }

    .hero-corebusiness {
        height: 70vh;
        background-attachment: scroll;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .core-business {
        padding: 40px 15px;
    }

    .business-carousel {
        flex-direction: column;
        height: auto;
    }

    .business-column {
        flex: none;
        height: 60px;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d8d8d8;
    }

    .business-column:last-child {
        border-bottom: none;
    }

    .business-column.active {
        height: auto;
        min-height: 550px;      /* ปรับให้เหมาะกับขนาดใหม่ */
    }

    .business-number {
        top: 20px;
        left: 20px;
    }

    .business-side-text {
        writing-mode: horizontal-tb;
        transform: none;
        left: 70px;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        font-size: 13px;
    }

    .business-column.active .business-side-text {
        display: none;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-section {
        padding: 40px 20px;
    }

    footer {
        padding: 40px 20px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

/* --- Mobile visibility classes --- */
.mobile_off {
    display: block !important;
}
.mobile_on {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .mobile_off {
        display: none !important;
    }
    .mobile_on {
        display: block !important;
    }
}

a:focus, a:active {
    outline: none !important;
    }