/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #00628f;
    --accent-red: #ee3724;
    --dark-bg: #1c2023;
    --light-bg: #f1f1f1;
    --secondary-gray: #424143;
    --white: #ffffff;
}

body {
    font-family: "Bai Jamjuree", sans-serif;
    font-size: 106%;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Container */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    height: 72px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--dark-bg);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-blue);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-bg);
}

/* Hero Section */
.hero {
    margin-top: 72px;
    background-image: url('../assets/images/hero-banner.png');
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--accent-red);
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--dark-bg);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-red);
    margin: 15px auto 0;
}

/* About Section */
.about-section {
    background-color: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-bg);
}

.btn-secondary {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--accent-red);
    color: var(--white);
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
}

/* Benefits Section */
.benefits-section {
    background-color: var(--dark-bg);
    color: var(--white);
}

.benefits-section .section-title {
    color: var(--white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.benefit-card {
    text-align: center;
    padding: 30px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: background-color 0.3s;
}

.benefit-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.benefit-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.benefit-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent-red);
}

.benefit-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* News Section */
.news-banner {
    margin-top: 72px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--secondary-gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-bg);
}

.news-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--secondary-gray);
}

/* Blog Post Cards */
.blog-post-inner {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-post-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.box-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-post-inner:hover .box-image img {
    transform: scale(1.05);
}

.post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-bg);
    padding: 20px 20px 10px 20px;
    min-height: 65px;
    line-height: 1.4;
}

.post-meta {
    padding: 0 20px;
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--secondary-gray);
    margin-bottom: 10px;
}

.post-date,
.post-author {
    display: flex;
    align-items: center;
}

.post-author::before {
    content: '👤';
    margin-right: 5px;
}

.from_the_blog_excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: justify;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--secondary-gray);
    padding: 0 20px;
    margin-bottom: 15px;
    min-height: 100px;
}

.read-more {
    display: inline-block;
    padding: 10px 20px 20px 20px;
    color: var(--primary-blue);
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--accent-red);
}

/* Partners Section */
.partners-section {
    background-color: var(--light-bg);
    padding: 80px 0;
}

.partners-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--light-bg);
}

.partners-carousel::-webkit-scrollbar {
    height: 8px;
}

.partners-carousel::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 10px;
}

.partners-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

.partners-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

.partners-carousel.grabbing {
    cursor: grabbing;
}

.partners-track {
    display: flex;
    gap: 60px;
    padding: 20px 0;
    animation: scroll 40s linear infinite;
}

.partners-carousel.paused .partners-track {
    animation-play-state: paused;
}

.partner-logo {
    flex-shrink: 0;
    width: 220px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.partner-logo:hover img {
    transform: scale(1.05);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.carousel-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background-color: var(--accent-red);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--accent-red);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-section p,
.footer-section a {
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Fixed Hotline Widget */
.hotline-widget {
    position: fixed;
    right: 0;
    bottom: 30%;
    z-index: 999;
    background-color: var(--accent-red);
    color: var(--white);
    padding: 15px;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s;
}

.hotline-widget:hover {
    background-color: var(--primary-blue);
}

.hotline-widget a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.hotline-icon {
    font-size: 24px;
}

.hotline-text {
    display: flex;
    flex-direction: column;
}

.hotline-label {
    font-size: 0.8rem;
}

.hotline-number {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .about-content,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .products-grid,
    .benefits-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 549px) and (max-width: 850px) {
    .products-grid,
    .benefits-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partner-logo {
        width: 180px;
        height: 150px;
        padding: 20px;
    }
}

@media (max-width: 549px) {
    .partners-section {
        padding: 60px 0;
    }

    .partner-logo {
        width: 150px;
        height: 130px;
        padding: 15px;
    }

    .partners-track {
        gap: 40px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
