/* --- Definitive Stylesheet - Airsense 11 Specialist --- */
/* --- Final Version: August 3, 2025 --- */

/* --- Variables & Global Resets --- */
:root {
    --primary-blue: #005A9C; /* A deep, trustworthy blue */
    --cta-green: #28a745;
    --cta-green-hover: #218838;
    --light-bg: #f8f9fa; /* Off-white for sections */
    --text-dark: #333333;
    --text-light: #555555;
    --border-color: #dee2e6;
    --font-main: 'Inter', 'Sarabun', sans-serif;
    --container-width: 1140px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Fade-in Animation */
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Language Toggling Logic */
[data-lang-en] { display: none; }
body.lang-en [data-lang-en] { display: inline; }
body.lang-en [data-lang-th] { display: none; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    line-height: 1.4;
    margin-bottom: 20px;
    font-weight: 700;
}

h1 { font-size: 2.8rem; color: var(--primary-blue); }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 20px; color: var(--text-light); }
a { color: var(--primary-blue); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #003d69; }

/* --- Redesigned Header --- */
header.main-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

header.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark);
}
.logo:hover {
    color: var(--primary-blue);
}

nav.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li { margin: 0 15px; }

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    font-size: 1rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.header-cta-group {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

#lang-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-right: 15px;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}
#lang-toggle:hover {
    background-color: var(--light-bg);
    border-color: #aaa;
}

.header-line-btn {
    background-color: var(--cta-green);
    color: #fff;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}
.header-line-btn:hover {
    background-color: var(--cta-green-hover);
    color: #fff;
}

.mobile-menu-toggle { display: none; }

/* Mobile Navigation (Initially Hidden) */
.mobile-nav {
    display: none;
    position: fixed;
    top: 80px; /* Height of header */
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 999;
    padding: 30px;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-nav.active {
    display: flex;
}
.mobile-nav .nav-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.mobile-nav .nav-links li {
    margin: 15px 0;
}
.mobile-nav .nav-links a {
    font-size: 1.5rem;
}
.mobile-nav .header-cta-group {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mobile-nav #mobile-lang-toggle {
    margin: 0 0 20px 0;
    padding: 12px 20px;
    font-size: 1.2rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: var(--border-radius);
    cursor: pointer;
}
.mobile-nav .header-line-btn {
    font-size: 1.2rem;
    padding: 15px 30px;
}


/* --- Main Button Style --- */
.cta-button {
    display: inline-block;
    background-color: var(--cta-green);
    color: #fff !important;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
    border: none;
}
.cta-button:hover {
    background-color: var(--cta-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

/* --- Hero Section --- */
.hero {
    background-color: var(--light-bg);
    padding: 80px 0;
}
.hero .container { display: flex; align-items: center; gap: 60px; }
.hero-text { flex: 1; }
.hero-image { flex: 1; text-align: center; }
.hero-image img { max-width: 100%; border-radius: var(--border-radius); box-shadow: var(--shadow); }

/* --- Features Section --- */
.features { padding: 80px 0; }
.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.feature-item {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.feature-icon { width: 50px; margin-bottom: 20px; }

/* --- Redesigned Footer --- */
footer {
    background-color: var(--text-dark);
    color: #ccc;
    padding: 60px 0 20px 0;
    font-size: 0.95rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}
.footer-col p, .footer-col a {
    color: #ccc;
    margin-bottom: 10px;
}
.footer-col a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; }
.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}
.footer-bottom p { margin: 0; }

/* --- Inner Page & Article Styles --- */
.page-header {
    background-color: var(--primary-blue);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}
.page-header h1 { color: #fff; }
.page-header p { color: rgba(255,255,255,0.8); max-width: 700px; margin: 0 auto; }

.page-content { padding: 80px 0; }
.text-container { max-width: 800px; margin: 0 auto; }
.text-container h2 { margin-top: 40px; }
.text-container ul, .text-container ol { margin-left: 25px; margin-bottom: 20px; padding-left: 0; }
.text-container ul li, .text-container ol li { margin-bottom: 10px; }

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.article-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.article-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.article-card-content h3 { font-size: 1.3rem; margin-bottom: 15px; }
.article-card-content p { flex-grow: 1; }
.read-more {
    font-weight: 700;
    color: var(--primary-blue);
    align-self: flex-start;
    margin-top: 15px;
}

/* Product & Rental Page */
.product-layout { display: flex; gap: 40px; margin: 40px 0; align-items: flex-start; }
.product-image-gallery { flex: 1; }
.product-image-gallery img { width: 100%; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.product-details { flex: 1; }
.price-box {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 20px;
}
.price-label { font-size: 1rem; color: var(--text-light); margin: 0; font-weight: 700; }
.price-amount { font-size: 2.5rem; font-weight: 700; color: var(--primary-blue); margin: 5px 0 15px 0; }
.price-includes-list { list-style: none; padding: 0; }
.price-includes-list li { 
    margin-bottom: 10px;
    padding-left: 25px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2328a745' class='bi bi-check-circle-fill' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3E%3C/svg%3E"); 
    background-repeat: no-repeat; 
    background-position: left center; 
    background-size: 16px; 
}

/* --- Search Bar --- */
.search-container {
    margin-bottom: 40px;
}
#article-search {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-family: var(--font-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#article-search:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    nav.desktop-nav { display: none; } 
    .header-cta-group { display: none; } 
    .mobile-menu-toggle {
        display: block;
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-dark);
    }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .hero .container { flex-direction: column; text-align: center; }
    .product-layout { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
}
