/*
Theme Name: ICC WordPress Layout
Theme URI: https://internetcom.co.th/
Author: Codex
Description: A bold, responsive WordPress layout for ICC with hero, services, showcase, certificates, and contact sections.
Version: 1.0.0
Text Domain: icc-wordpress-layout
*/

:root {
    --bg: #07111f;
    --bg-soft: #0d1728;
    --surface: rgba(12, 20, 36, 0.78);
    --surface-strong: #0b1424;
    --surface-light: rgba(255, 255, 255, 0.06);
    --text: #f6f8fc;
    --muted: #a9b7cc;
    --line: rgba(255, 255, 255, 0.12);
    --primary: #71d7ff;
    --primary-strong: #2ea1ff;
    --accent: #ffb24d;
    --success: #32d583;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(46, 161, 255, 0.22), transparent 28%),
        radial-gradient(circle at left center, rgba(113, 215, 255, 0.12), transparent 24%),
        linear-gradient(180deg, #08111f 0%, #0d1728 55%, #09111d 100%);
    font-family: "Kanit", "Segoe UI", "Aptos", "Noto Sans Thai", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin-inline: auto;
}

/* --- Header & Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    backdrop-filter: blur(20px);
    background: rgba(7, 17, 31, 0.72);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding-block: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* --- ปรับแต่งโลโก้ให้เป็นสี่เหลี่ยมผืนผ้าขอบมน (เวอร์ชันบังคับผลลัพธ์) --- */
.site-header .custom-logo-link,
.site-logo,
.brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 14px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
}

.site-header .custom-logo,
.site-header img.logo,
.site-logo img,
.brand__logo {
    display: block !important;
    width: auto !important;
    height: 48px !important;
    max-height: 48px !important;
    max-width: 100% !important;
    border-radius: 14px !important; 
    object-fit: contain !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    padding: 4px !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* บังคับให้เบราว์เซอร์ตัดมุมรูปภาพตาม border-radius */
}

.brand__text {
    display: grid;
    min-width: 0;
}

.brand__text strong {
    font-size: 1rem;
    line-height: 1.2;
}

.brand__text span {
    color: var(--muted);
    font-size: 0.86rem;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu a:hover,
.menu a:focus-visible,
.menu .current-menu-item > a {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Buttons --- */
.button,
.wp-block-button__link,
.site-button,
.chat-actions a,
.chat-restart,
.showcase-arrow,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: #04101d;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(46, 161, 255, 0.22);
}

.button--ghost,
.site-button--ghost,
.showcase-arrow,
.chat-actions a {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}

.menu-toggle {
    display: none;
    width: 46px;
    padding: 0;
}

/* --- Hero Section --- */
.home-layout {
    padding-bottom: 72px;
}

.hero {
    position: relative;
    overflow: clip;
    padding: 42px 0 24px;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}

.hero::before {
    top: 40px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(113, 215, 255, 0.22), transparent 68%);
}

.hero::after {
    bottom: 0;
    left: -120px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(255, 178, 77, 0.16), transparent 70%);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 28px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 900;
}

.hero h1 {
    margin: 0;
    font-size: clamp(3rem, 5vw, 5.45rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    max-width: 10ch;
}

.hero__copy {
    max-width: 54ch;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero__actions,
.contact-actions,
.chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.stat-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px var(--line);
}

.stat-card small {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.3;
}

/* --- Hero Visual & Dashboard Component --- */
.hero-visual {
    position: relative;
    min-height: 660px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
        rgba(7, 17, 31, 0.86);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--line);
}

.hero-visual__image {
    position: absolute;
    inset: 0;
}

.hero-visual__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    filter: saturate(1.05) contrast(1.05);
}

.hero-visual__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 17, 31, 0.12) 0%, rgba(7, 17, 31, 0.82) 100%),
        linear-gradient(130deg, rgba(46, 161, 255, 0.12), rgba(255, 178, 77, 0.02));
}

.dashboard-card {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    padding: 22px;
    border-radius: 26px;
    background: rgba(10, 18, 32, 0.82);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.dashboard-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-card__brand {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.dashboard-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8f7d0;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.dashboard-live i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(50, 213, 131, 0.16);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 18px;
    margin-top: 18px;
}

.chart-panel,
.metric-stack {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chart-panel small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.chart-panel strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
    line-height: 1;
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    align-items: end;
    min-height: 160px;
    margin-top: 18px;
}

.chart-bars span {
    display: block;
    border-radius: 999px 999px 10px 10px;
    background: linear-gradient(180deg, var(--primary), rgba(46, 161, 255, 0.42));
    min-height: 28px;
}

.metric-stack {
    display: grid;
    gap: 12px;
}

.metric-pill {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.metric-pill small {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.metric-pill strong {
    font-size: 0.96rem;
}

/* --- General Sections & Layout --- */
.section {
    padding: 74px 0;
}

.section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section__heading h2 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.section__heading p {
    margin: 0;
    max-width: 58ch;
    color: var(--muted);
}

.section-kicker {
    margin: 0 0 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 900;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.quick-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow);
}

.quick-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
}

.quick-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 17, 31, 0.08), rgba(7, 17, 31, 0.84)),
        linear-gradient(120deg, rgba(46, 161, 255, 0.18), transparent);
}

.quick-card span {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 1;
    font-size: 1.05rem;
    font-weight: 800;
}

.section-grid {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 26px;
    align-items: start;
}

.content-card {
    padding: 26px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.about-copy p,
.section-copy p {
    margin: 0 0 16px;
    color: var(--muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* --- Gallery Grid Overlay & Mood --- */
.gallery-grid figure,
.gallery-grid div,
.gallery-grid .gallery-item {
    position: relative !important;
    margin: 0;
    min-height: 200px;
    overflow: hidden !important;
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #07111f !important;
}

.gallery-grid img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: brightness(0.85) contrast(1.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-grid figure::after,
.gallery-grid div::after,
.gallery-grid .gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: 
        linear-gradient(180deg, rgba(7, 17, 31, 0.25) 0%, rgba(7, 17, 31, 0.88) 100%),
        linear-gradient(135deg, rgba(46, 161, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.gallery-grid figure:hover img,
.gallery-grid div:hover img,
.gallery-grid .gallery-item:hover img {
    opacity: 0.65;
    transform: scale(1.04);
}

/* --- Services & Certificates --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.service-card,
.certificate-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.service-card {
    min-height: 266px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.service-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
}

.service-card::after,
.certificate-card::after,
.contact-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(7, 17, 31, 0.86) 100%);
}

.service-card__body,
.certificate-card__body {
    position: relative;
    z-index: 1;
}

.service-card h3,
.certificate-card h3,
.showcase-slide h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.1;
}

.service-card p,
.certificate-card p,
.showcase-slide p {
    margin: 10px 0 0;
    color: var(--muted);
}

.service-card--crm {
    background:
        radial-gradient(circle at top right, rgba(113, 215, 255, 0.22), transparent 28%),
        rgba(255, 255, 255, 0.06);
}

.service-card--crm .service-card__body {
    display: grid;
    gap: 12px;
}

.service-card--crm .service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
}

.certificate-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.certificate-card {
    min-height: 360px;
}

.certificate-media {
    position: absolute;
    inset: 0;
}

.certificate-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.26;
}

.certificate-card__body {
    position: absolute;
    inset: auto 22px 22px;
}

/* --- Showcase Layout System --- */
.showcase-shell {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: center;
}

.showcase-info-box {
    display: flex;
    flex-direction: column;
}

.showcase-counter {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.showcase-carousel {
    display: grid;
    gap: 14px;
}

.showcase-stage {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, 0.03);
}

.showcase-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1;
}

.showcase-slide.is-active,
.showcase-slide:first-child {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.showcase-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 28px;
}

.showcase-dynamic-info {
    margin-top: 24px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.showcase-tag {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 900;
}

.showcase-dynamic-info h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: var(--text);
}

.showcase-dynamic-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.showcase-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.showcase-arrow {
    width: 48px;
    padding: 0;
}

.showcase-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.showcase-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.showcase-dot.is-active {
    width: 28px;
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: stretch;
}

.contact-panel {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.contact-panel__map {
    min-height: 100%;
}

.contact-map {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 18px;
}

.contact-map img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.address-box {
    font-style: normal;
    color: var(--muted);
}

.address-box strong {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
}

/* --- Floating Contact Button --- */
.floating-contact {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0073aa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-contact:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.floating-contact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* --- Contact Popup System --- */
.contact-popup {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 95;
    width: min(380px, calc(100vw - 24px));
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(9, 16, 28, 0.96);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.contact-popup.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, rgba(46, 161, 255, 0.18), rgba(255, 178, 77, 0.08));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header h3 {
    margin: 6px 0 0;
    font-size: 1.2rem;
}

.chat-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8f7d0;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.chat-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.chat-header button {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
}

.chat-body {
    padding: 18px;
    display: grid;
    gap: 16px;
}

.chat-progress {
    display: flex;
    gap: 8px;
}

.chat-progress span {
    height: 6px;
    flex: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.chat-progress .active {
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
}

.chat-bubble {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: #05101c;
    font-size: 0.75rem;
    font-weight: 900;
}

.chat-bubble p,
.chat-question,
.chat-privacy {
    margin: 0;
    color: var(--muted);
}

.chat-step {
    display: none;
    gap: 12px;
}

.chat-step.active {
    display: grid;
}

.chat-options {
    display: grid;
    gap: 10px;
}

.chat-options button {
    width: 100%;
    justify-content: start;
    min-height: 46px;
    padding-inline: 16px;
    text-align: left;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    box-shadow: none;
}

.chat-result {
    align-content: start;
}

.chat-summary {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 10px 12px;
}

.chat-summary dt {
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.chat-summary dd {
    margin: 0;
    color: var(--text);
}

.chat-privacy {
    font-size: 0.94rem;
}

.chat-actions a {
    min-height: 42px;
    padding-inline: 16px;
}

/* --- Footer --- */
.footer {
    margin-top: 16px;
    padding: 32px 0 42px;
    border-top: 1px solid var(--line);
    background: rgba(4, 10, 20, 0.66);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.7fr;
    gap: 24px;
    align-items: start;
}

.footer__grid h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.footer__grid p,
.footer__grid address {
    margin: 0;
    color: var(--muted);
    font-style: normal;
}

.footer__links {
    display: grid;
    gap: 10px;
}

.footer__links a {
    color: var(--primary);
    font-weight: 800;
}

.site-credit {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* --- Blog & Content Layout --- */
.archive-layout,
.content-layout {
    padding: 48px 0 72px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.post-card {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.post-card__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.post-card h2,
.post-card h1 {
    margin: 10px 0;
    line-height: 1.1;
}

.post-card p {
    color: var(--muted);
}

/* --- Custom Language Switcher --- */
.custom-lang-switch {
    display: inline-flex;
    align-items: center;
    margin: 0 10px;
}

.custom-lang-switch input { 
    display: none; 
}

.lang-slider {
    position: relative;
    width: 64px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    transition: all 0.3s ease;
}

.lang-text {
    font-size: 11px;
    font-weight: bold;
    color: #a0aec0;
    z-index: 1;
    user-select: none;
}

.lang-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background-color: #00d2ff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.5);
}

.custom-lang-switch input:checked + .lang-slider .lang-knob {
    transform: translateX(34px);
}

.goog-te-banner-frame, 
.skiptranslate { 
    display: none !important; 
}

/* --- Support Widget Styles --- */
.support-widget {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 999;
    width: 380px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: none;
}

.support-widget.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.widget-header {
    background: linear-gradient(135deg, #003366, #0055a5);
    color: #fff;
    padding: 16px 20px 12px;
    position: relative;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff66;
    border-radius: 50%;
}

.header-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar-container {
    display: flex;
    gap: 6px;
    padding: 12px 20px 0;
    background: #fff;
}

.step-indicator {
    flex: 1;
    height: 4px;
    background-color: #e0e6ed;
    border-radius: 2px;
    transition: background-color 0.3s;
}

.step-indicator.active {
    background-color: #0066cc;
}

.widget-body {
    padding: 16px 20px 20px;
    color: #333333;
}

.chat-bubble-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #004080, #0066cc);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.support-widget .chat-bubble {
    background-color: #f4f7fa;
    border: 1px solid #e1e8ed;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-question {
    font-weight: 600;
    font-size: 14px;
    color: #1a202c;
    margin-bottom: 12px;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: #0066cc;
    background-color: #f0f7ff;
    color: #0066cc;
}

.summary-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: #718096;
}

.summary-value {
    font-weight: 700;
    color: #1a202c;
}

.summary-note {
    font-size: 11px;
    color: #a0aec0;
    text-align: center;
    margin-bottom: 16px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #0066cc;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.reset-container {
    text-align: center;
    margin-top: 12px;
}

.btn-reset {
    background: none;
    border: none;
    color: #718096;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1120px) {
    .hero__grid,
    .section-grid,
    .showcase-shell,
    .contact-grid,
    .footer__grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-visual {
        min-height: 520px;
    }

    .dashboard-grid,
    .gallery-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .showcase-stage {
        height: 380px;
    }
}

@media (max-width: 860px) {
    .site-header__inner {
        position: relative;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-header__nav {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: 0;
        display: grid;
        gap: 16px;
        padding: 18px;
        border-radius: 24px;
        background: rgba(8, 16, 29, 0.96);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .site-header__nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .menu {
        flex-direction: column;
        align-items: stretch;
    }

    .menu a {
        justify-content: center;
    }

    .hero h1 {
        max-width: none;
    }

    .hero__stats,
    .services-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }

    .section__heading {
        align-items: start;
        flex-direction: column;
    }

    .contact-popup,
    .support-widget {
        right: 12px;
        bottom: 84px;
        width: min(100vw - 24px, 380px);
    }
}

@media (max-width: 540px) {
    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .site-header__inner {
        min-height: 78px;
    }

    .brand__logo,
    .site-header .custom-logo,
    .site-header img.logo,
    .site-logo img {
        height: 44px !important;
        max-height: 44px !important;
    }

    .hero {
        padding-top: 24px;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.6rem);
    }

    .hero-visual {
        min-height: 440px;
    }

    .dashboard-card,
    .content-card,
    .contact-panel,
    .post-card {
        padding: 18px;
    }

    .floating-contact {
        right: 16px;
        bottom: 16px;
    }

    body { 
        top: 0px !important; 
    }
}

/* --- Added Fixes for Contact Actions & Floating Elements --- */

/* ป้องกันไม่ให้ Floating Icon บังพื้นที่ของ Contact Panel */
.contact-grid {
    position: relative;
    z-index: 10; /* ดันให้ Panel ด้านหน้าขึ้นมาเหนือ Layer อื่น */
}

/* บังคับให้พื้นที่ปุ่มและแท็ก <a> ใน section contact สามารถคลิกได้แน่ๆ */
.contact-actions {
    position: relative;
    z-index: 20;
    pointer-events: auto !important;
}

.contact-actions a,
.contact-actions .button {
    position: relative;
    z-index: 21;
    cursor: pointer !important;
    pointer-events: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ป้องกัน iframe ของ Google Maps ขยายมาทับฝั่งซ้าย */
.contact-panel__map iframe {
    pointer-events: auto;
}

/* 1. กรณีเป็น 3 กล่องด้านซ้ายมือสุด (Network, Support, Backup) */
.hero__stats .stat-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 2. กรณีเป็นกรอบฝั่งซ้ายด้านในการ์ด CRM (ที่มีกราฟแท่ง) */
.dashboard-grid > div:first-child,
.chart-panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
/* ตั้งค่าภาพพื้นหลังให้ทั้งหน้าเว็บ */
body, 
.home-layout {
    background-image: url('https://www.internetcom.co.th/icc/wp-content/uploads/2026/09/sdsd.png?_t=1790246515') !important;
    background-repeat: repeat !important;        /* หรือเปลี่ยนเป็น no-repeat ถ้าไม่อยากให้รูปซ้ำ */
    background-position: center top !important;  /* จัดตำแหน่งภาพให้อยู่ตรงกลางด้านบน */
    background-attachment: fixed !important;     /* ให้พื้นหลังอยู่กับที่เวลาเลื่อนสกอร์เม้าส์ */
    background-size: cover !important;          /* ปรับขนาดภาพให้เต็มจอพอดี */
}

/* ============================================================
   ลบกรอบ ขอบมืด แผ่นฟิล์มซ้อน และเงาออกจากรูปภาพทุกจุดในหน้าเว็บ
   ============================================================ */

/* 1. ลบกรอบและเงาจาก Container/Figure/Card ทั้งหมด */
.hero-visual,
.hero-visual__image,
.gallery-grid,
.gallery-grid figure,
.showcase-card,
.showcase-media,
.service-card,
.quick-card,
figure {
    border: none !important;
    border-radius: 16px !important; /* คงความโค้งมนของมุมรูปไว้อย่างเดียว */
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
    overflow: hidden !important;
}

/* 2. เคลียร์ชั้น Overlay / Pseudo-elements (แผ่นสีเทาดำที่ซ้อนหลัง/ทับรูป) */
.hero-visual::before, .hero-visual::after,
.hero-visual__image::before, .hero-visual__image::after,
.gallery-grid figure::before, .gallery-grid figure::after,
.showcase-media::before, .showcase-media::after,
.service-card::before, .service-card::after,
.quick-card::before, .quick-card::after,
figure::before, figure::after {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* 3. ปรับตัวรูปภาพ (<img>) ให้แสดงผลเต็มๆ ชัดๆ ไม่มีฟิลเตอร์มืด */
.hero-visual img,
.gallery-grid img,
.showcase-media img,
.service-card img,
.quick-card img,
figure img {
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
}

<style>
/* Style พิเศษสั่งปลดเงาและเอฟเฟกต์มืดของการ์ดในหน้านี้โดยตรง */
.home-layout *, 
.home-layout *::before, 
.home-layout *::after {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}
.quick-card, 
.stat-card, 
.content-card, 
.service-card, 
.certificate-card, 
.gallery-grid figure, 
.hero-visual__image, 
.showcase-stage, 
.showcase-slide {
    box-shadow: none !important;
    filter: none !important;
    background-image: none !important;
}
.quick-card img, 
.hero-visual__image img, 
.gallery-grid img, 
.service-card img, 
.showcase-slide img {
    box-shadow: none !important;
    filter: none !important;
}

/* ===================================================
   บังคับให้ข้อความและลิงก์ในกล่อง Contact เป็นสีขาวตัวหนา
   =================================================== */
.contact-panel,
.contact-panel *,
.contact-panel .section-kicker,
.contact-panel h2,
.contact-panel p,
.contact-panel address,
.contact-panel address strong,
.contact-panel address a,
.contact-panel .button--ghost {
    color: #ffffff !important;
    font-weight: 700 !important; /* ตัวหนา */
}
</style>