/*
Theme Name: DOSX Light
Theme URI: https://application.in.th
Description: Light theme for DOSX - Digitalmedia Outsource Solution corporate website
Author: DOSX Team
Author URI: https://digitalmedia.co.th
Template: blockpress
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dosx-light
*/

/* ===== CSS VARIABLES ===== */
:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #3b82f6;
    --brand-subtle: #dbeafe;
    --bg-1: #ffffff;
    --bg-2: #f8fafc;
    --bg-3: #ffffff;
    --bg-4: #f1f5f9;
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --border: rgba(0,0,0,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
}

/* ===== GLOBAL RESET & BASE ===== */
body {
    font-family: 'IBM Plex Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-1);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

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

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--brand);
    color: #fff !important;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
    color: #fff !important;
}
.btn-outline {
    background: var(--bg-1);
    color: var(--text) !important;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand) !important;
    background: var(--brand-subtle);
}
.btn-lg {
    font-size: 17px;
    padding: 16px 36px;
    border-radius: 14px;
}

/* ===== NAV ===== */
.dosx-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.dosx-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dosx-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.dosx-nav-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
}
.dosx-nav-logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--text);
}
.dosx-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.dosx-nav-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
    text-decoration: none;
}
.dosx-nav-links a:hover {
    color: var(--text);
}
.dosx-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dosx-nav-phone {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
    text-decoration: none;
}
.dosx-nav-phone:hover {
    color: var(--text);
}

@media (max-width: 768px) {
    .dosx-nav-links,
    .dosx-nav-phone {
        display: none;
    }
}

/* ===== HERO ===== */
.dosx-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 24px 60px;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(37,99,235,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(99,102,241,0.04) 0%, transparent 50%),
        linear-gradient(180deg, #f0f5ff 0%, #ffffff 40%);
    position: relative;
    overflow: hidden;
}
.dosx-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.dosx-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-subtle);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: 100px;
    padding: 6px 18px;
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--brand);
}
.dosx-hero-badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: dosxPulse 2s ease-in-out infinite;
}
@keyframes dosxPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.dosx-hero h1 {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text);
}
.dosx-gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 40%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dosx-hero p {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 40px;
    line-height: 1.7;
}
.dosx-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 80px;
}

/* ===== STATS ===== */
.dosx-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.dosx-stat-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.dosx-stat-num {
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 4px;
}
.dosx-stat-label {
    font-size: 13px;
    color: var(--text-dim);
}
@media (max-width: 640px) {
    .dosx-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== SECTIONS ===== */
.dosx-section {
    padding: 100px 24px;
}
.dosx-section-alt {
    background: var(--bg-2);
}
.dosx-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.dosx-section-header {
    text-align: center;
    margin-bottom: 64px;
}
.dosx-section-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
}
.dosx-section-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    color: var(--text);
}
.dosx-section-subtitle {
    color: var(--text-muted);
    max-width: 560px;
    margin: 16px auto 0;
}

/* ===== CARDS GRID ===== */
.dosx-cards-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.dosx-cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) {
    .dosx-cards-4 { grid-template-columns: repeat(2, 1fr); }
    .dosx-cards-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .dosx-cards-4,
    .dosx-cards-3 {
        grid-template-columns: 1fr;
    }
}

.dosx-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-sm);
}
.dosx-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.dosx-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}
.dosx-card-icon-blue { background: #dbeafe; color: #2563eb; }
.dosx-card-icon-green { background: #dcfce7; color: #16a34a; }
.dosx-card-icon-purple { background: #f3e8ff; color: #9333ea; }
.dosx-card-icon-amber { background: #fef3c7; color: #d97706; }

.dosx-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}
.dosx-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== PROCESS ===== */
.dosx-process-step {
    position: relative;
}
.dosx-step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.dosx-step-num {
    width: 48px;
    height: 48px;
    background: var(--brand);
    border-radius: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.dosx-step-line {
    height: 2px;
    flex: 1;
    background: linear-gradient(90deg, var(--brand-subtle), transparent);
}
.dosx-process-step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.dosx-process-step p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== PORTFOLIO ===== */
.dosx-portfolio-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: block;
}
.dosx-portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.dosx-portfolio-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.dosx-portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.dosx-portfolio-card:hover .dosx-portfolio-thumb img {
    transform: scale(1.05);
}
.dosx-portfolio-body {
    padding: 24px;
}
.dosx-portfolio-tag {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand);
}
.dosx-portfolio-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0;
    color: var(--text);
}
.dosx-portfolio-body p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== LOGO SCROLL ===== */
.dosx-logo-section {
    padding: 60px 24px;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.dosx-logo-section p {
    text-align: center;
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 40px;
}
.dosx-logo-track-wrapper {
    overflow: hidden;
}
.dosx-logo-track {
    display: flex;
    animation: dosxScrollLogos 25s linear infinite;
}
.dosx-logo-item {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: rgba(0,0,0,0.08);
    padding: 0 40px;
    white-space: nowrap;
}
@keyframes dosxScrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== TECH GRID ===== */
.dosx-tech-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}
.dosx-tech-item {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 12px;
    text-align: center;
    transition: all 0.2s;
    cursor: default;
    box-shadow: var(--shadow-sm);
}
.dosx-tech-item:hover {
    border-color: var(--brand);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}
.dosx-tech-item-label {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    background: var(--brand-subtle);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: var(--brand);
}
.dosx-tech-item-name {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.dosx-tech-grid-sm {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 20px auto 0;
}
.dosx-tech-item-sm {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.dosx-tech-item-sm:hover {
    border-color: var(--brand);
}
.dosx-tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dosx-tech-item-sm span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
@media (max-width: 1024px) {
    .dosx-tech-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
    .dosx-tech-grid { grid-template-columns: repeat(2, 1fr); }
    .dosx-tech-grid-sm { grid-template-columns: repeat(2, 1fr); }
}

/* ===== CTA ===== */
.dosx-cta {
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(37,99,235,0.06) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f0f5ff 100%);
}
.dosx-cta-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}
.dosx-cta h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
    color: var(--text);
}
.dosx-cta p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}
.dosx-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}
.dosx-cta-address {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}
.dosx-cta-address-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

/* ===== FOOTER ===== */
.dosx-footer {
    background: #0f172a;
    color: #fff;
    padding: 60px 24px;
}
.dosx-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.dosx-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.dosx-footer h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}
.dosx-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dosx-footer li {
    font-size: 14px;
    color: #94a3b8;
    padding: 3px 0;
}
.dosx-footer-brand p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin-top: 16px;
}
.dosx-footer .dosx-nav-logo-text {
    color: #fff;
}
.dosx-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.dosx-footer-bottom p {
    font-size: 13px;
    color: #64748b;
}
.dosx-footer-link {
    color: #60a5fa !important;
    transition: color 0.2s;
}
.dosx-footer-link:hover {
    color: #93c5fd !important;
}
@media (max-width: 768px) {
    .dosx-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .dosx-footer-grid { grid-template-columns: 1fr; }
}

/* ===== ANIMATIONS ===== */
@keyframes dosxFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.dosx-fade-up { animation: dosxFadeUp 0.7s ease-out both; }
.dosx-fade-up-d1 { animation-delay: 0.1s; }
.dosx-fade-up-d2 { animation-delay: 0.2s; }
.dosx-fade-up-d3 { animation-delay: 0.3s; }
.dosx-fade-up-d4 { animation-delay: 0.4s; }


/* ===================================================================
   GLOBAL OVERRIDES — Apply to all pages (works, work/*, quatation, etc.)
   =================================================================== */

/* Override WordPress default spacing for our theme */
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 1200px;
}

/* ===== WORKS / PORTFOLIO PAGES ===== */

/* Cover header on works/quatation pages */
body.page .wp-block-cover.alignfull {
    min-height: 300px !important;
    margin-bottom: 48px;
}
body.page .wp-block-cover .wp-block-cover__inner-container {
    max-width: 1200px;
}
body.page .wp-block-cover h1,
body.page .wp-block-cover h2,
body.page .wp-block-cover .wp-block-heading {
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* Getwid tabs (portfolio filters) */
.wp-block-getwid-tabs .wp-block-getwid-tabs__nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px !important;
    border: none !important;
    flex-wrap: wrap;
}
.wp-block-getwid-tabs .wp-block-getwid-tabs__nav-link {
    border: 1px solid var(--border) !important;
    border-radius: 100px !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 500;
    color: var(--text-muted) !important;
    background: var(--bg-1) !important;
    transition: all 0.2s;
    cursor: pointer;
}
.wp-block-getwid-tabs .wp-block-getwid-tabs__nav-link:hover {
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}
.wp-block-getwid-tabs .wp-block-getwid-tabs__nav-link.is-active,
.wp-block-getwid-tabs .wp-block-getwid-tabs__nav-link[aria-selected="true"] {
    background: var(--brand) !important;
    color: #fff !important;
    border-color: var(--brand) !important;
}

/* Portfolio grid inside tabs */
.wp-block-getwid-tabs .wp-block-post-template,
body.post-type-archive-work .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (max-width: 1024px) {
    .wp-block-getwid-tabs .wp-block-post-template,
    body.post-type-archive-work .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .wp-block-getwid-tabs .wp-block-post-template,
    body.post-type-archive-work .wp-block-post-template {
        grid-template-columns: 1fr;
    }
}

/* Portfolio cards */
.wp-block-getwid-tabs .wp-block-post,
body.post-type-archive-work .wp-block-post-template > .wp-block-post {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}
.wp-block-getwid-tabs .wp-block-post:hover,
body.post-type-archive-work .wp-block-post-template > .wp-block-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Portfolio card images */
.wp-block-getwid-tabs .wp-block-post-featured-image,
body.post-type-archive-work .wp-block-post-featured-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    margin: 0;
}
.wp-block-getwid-tabs .wp-block-post-featured-image img,
body.post-type-archive-work .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.wp-block-getwid-tabs .wp-block-post:hover .wp-block-post-featured-image img,
body.post-type-archive-work .wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.05);
}

/* Portfolio card title */
.wp-block-getwid-tabs .wp-block-post-title,
body.post-type-archive-work .wp-block-post-title {
    padding: 20px 24px 16px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}
.wp-block-getwid-tabs .wp-block-post-title a,
body.post-type-archive-work .wp-block-post-title a {
    color: var(--text);
    text-decoration: none;
}
.wp-block-getwid-tabs .wp-block-post-title a:hover,
body.post-type-archive-work .wp-block-post-title a:hover {
    color: var(--brand);
}
body.post-type-archive-work .wp-block-post-excerpt {
    padding: 0 24px 24px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Getwid image boxes (service cards on various pages) */
.wp-block-getwid-image-box {
    padding: 24px 20px;
    border-radius: 16px;
    border: 1px solid var(--border) !important;
    background: var(--bg-1);
    transition: all 0.3s;
}
.wp-block-getwid-image-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
    border-color: rgba(37,99,235,0.1) !important;
}

/* ===== SINGLE WORK PAGE (/work/{slug}/) ===== */
body.single-work {
    padding-top: 72px;
    background: var(--bg-1);
}

/* Title area */
body.single-work .site-title-area {
    background: var(--bg-2);
    padding-bottom: 0;
}
body.single-work .site-title-area .wp-block-group {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 0;
}
body.single-work .wp-block-post-title.has-max-huge-font-size {
    font-size: clamp(28px, 4vw, 42px) !important;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* Post meta (date) */
body.single-work .post-meta {
    color: var(--text-dim);
    font-size: 13px !important;
    gap: 8px;
    margin-bottom: 24px;
}

/* Featured image / Cover */
body.single-work .wp-block-post-featured-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 0 !important;
}
body.single-work .wp-block-post-featured-image img {
    border-radius: 16px;
}
body.single-work .wp-block-cover {
    border-radius: 16px;
    overflow: hidden;
    min-height: 400px !important;
    box-shadow: var(--shadow-lg);
}

/* Content area */
body.single-work .entry-content,
body.single-work .wp-block-post-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Two-column layout (app info + details) */
body.single-work .application-info,
body.single-work .wp-block-columns {
    gap: 48px !important;
    max-width: 1100px;
    margin: 0 auto;
}

/* Left column — App icon + meta info */
body.single-work .application-info > .wp-block-column:first-child {
    background: var(--bg-2);
    border-radius: 20px;
    padding: 40px 32px !important;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
body.single-work .application-info .wp-block-image img {
    border-radius: 24px !important;
    box-shadow: var(--shadow-md);
}
body.single-work .application-info h1.wp-block-post-title {
    font-size: 22px !important;
    margin-top: 20px;
}

/* Info section labels */
body.single-work .wp-block-post-content h2.has-medium-font-size,
body.single-work .wp-block-post-content .wp-block-heading.has-medium-font-size {
    font-size: 13px !important;
    font-weight: 600;
    color: var(--brand) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
    padding-bottom: 0;
}
/* Remove the red underline decoration from h2 headings in work pages */
body.single-work .wp-block-heading::after {
    display: none !important;
}

/* Info section values */
body.single-work .is-style-border-bottom {
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

/* Right column — Screenshots + Description */
body.single-work .application-info > .wp-block-column:last-child {
    padding-top: 0 !important;
}

/* Screenshots slider */
body.single-work .wp-block-getwid-images-slider {
    margin: 16px 0 32px;
}
body.single-work .wp-block-getwid-images-slider figure {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--bg-2);
}
body.single-work .wp-block-getwid-images-slider img {
    border-radius: 16px;
    transition: transform 0.3s;
}
body.single-work .wp-block-getwid-images-slider img:hover {
    transform: scale(1.03);
}

/* Description text */
body.single-work .wp-block-post-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 12px;
}
body.single-work .wp-block-post-content p:first-of-type {
    font-size: 16px;
    color: var(--text);
}

/* Spacers — reduce excessive whitespace */
body.single-work .wp-block-spacer {
    height: 24px !important;
}

/* Gallery images */
body.single-work .wp-block-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
body.single-work .wp-block-gallery {
    gap: 16px;
}
body.single-work .wp-block-gallery .wp-block-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Post navigation (prev/next project) */
body.single-work .wp-block-post-navigation-link {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 24px;
    transition: all 0.2s;
    text-decoration: none;
}
body.single-work .wp-block-post-navigation-link:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}
body.single-work .wp-block-post-navigation-link a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}
body.single-work .post-navigation-link__label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Works archive page heading */
body.single-work .site-content {
    padding-bottom: 0 !important;
}

/* ===== QUOTATION PAGE (/quatation/) ===== */
body.page-template-default .nf-form-cont,
body.page-slug-quatation .nf-form-cont {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
}
body .nf-form-cont .nf-field-container {
    margin-bottom: 16px;
}
body .nf-form-cont input[type="text"],
body .nf-form-cont input[type="email"],
body .nf-form-cont input[type="tel"],
body .nf-form-cont textarea,
body .nf-form-cont select {
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-family: 'IBM Plex Sans Thai', sans-serif !important;
    font-size: 15px !important;
    transition: border-color 0.2s !important;
    background: var(--bg-1) !important;
}
body .nf-form-cont input:focus,
body .nf-form-cont textarea:focus,
body .nf-form-cont select:focus {
    border-color: var(--brand) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px var(--brand-subtle) !important;
}
body .nf-form-cont .nf-field-label label {
    font-weight: 500 !important;
    color: var(--text) !important;
    margin-bottom: 6px !important;
}
body .nf-form-cont input[type="submit"],
body .nf-form-cont .ninja-forms-field.nf-element[type="submit"] {
    background: var(--brand) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-family: 'IBM Plex Sans Thai', sans-serif !important;
}
body .nf-form-cont input[type="submit"]:hover,
body .nf-form-cont .ninja-forms-field.nf-element[type="submit"]:hover {
    background: var(--brand-dark) !important;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3) !important;
}

/* Ninja Forms — validation error styling */
body .nf-form-cont .nf-error .ninja-forms-field {
    border-color: #ef4444 !important;
}
body .nf-form-cont .nf-error-msg {
    color: #ef4444 !important;
    font-size: 13px !important;
    margin-top: 4px;
}
/* Fix the ugly red square ! icon */
body .nf-form-cont .nf-field-element::after,
body .nf-form-cont .nf-error .nf-field-element::after {
    display: none !important;
}
body .nf-form-cont .nf-error-wrap .nf-error-msg {
    color: #ef4444 !important;
    font-size: 13px !important;
}
/* Hide the giant red ! button entirely */
body .nf-form-cont .nf-field-element .nf-error-tip,
body .nf-form-cont .ninja-forms-req-symbol,
body .nf-form-cont .nf-field-element > .nf-field-description + div[style],
body .nf-form-cont .nf-after-field .nf-error-msg {
    font-size: 13px !important;
    color: #ef4444 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}
/* The red square is .nf-pass.field-wrap .nf-field-element::after or a separate element */
body .nf-form-cont .nf-fail .nf-field-element::after,
body .nf-form-cont .nf-error .nf-field-element::after,
body .nf-form-cont .nf-field-element .nf-input-limit,
body .nf-form-cont .field-wrap:not(.submit-wrap) .nf-field-element > [style*="background"] {
    display: none !important;
}
/* Style the validation icon as a small inline indicator */
body .nf-form-cont .nf-fail .nf-field-element {
    position: relative;
    border-color: #ef4444 !important;
}
body .nf-form-cont .nf-pass .nf-field-element {
    border-color: #22c55e !important;
}

/* ===== ARTICLE/BLOG PAGES ===== */
body.single-post .entry-content,
body.single-post .wp-block-post-content,
body.single-article .entry-content,
body.single-article .wp-block-post-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}
body.single-post h1,
body.single-article h1,
body.single-post .wp-block-post-title,
body.single-article .wp-block-post-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 16px;
}
body.single-post h2,
body.single-article h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-top: 48px;
    margin-bottom: 16px;
}
body.single-post h3,
body.single-article h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 12px;
}
body.single-post p,
body.single-article p {
    margin-bottom: 24px;
}
body.single-post .wp-block-image,
body.single-article .wp-block-image {
    border-radius: 12px;
    overflow: hidden;
    margin: 32px 0;
}

/* ===== OVERRIDE PARENT THEME & PLUGIN CONFLICTING STYLES ===== */

/* Force hide preloader from parent theme/plugin */
.fr-page-preloader {
    display: none !important;
}

/* Override scrollbar to match brand blue */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--brand), var(--brand-dark)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-dark); }

/* Override selection color */
::selection { background: rgba(37, 99, 235, 0.15); color: var(--brand); }
::-moz-selection { background: rgba(37, 99, 235, 0.15); color: var(--brand); }

/* Override parent theme button styles that use !important */
.wp-block-button__link,
.wp-element-button {
    background: var(--brand) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
    background: var(--brand-dark) !important;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3) !important;
    transform: translateY(-2px);
}

/* Override parent theme heading gradient (red → blue) */
h2.wp-block-heading.has-primary-color,
.wp-block-getwid-section h2.wp-block-heading.has-primary-color,
.wp-block-getwid-advanced-heading__content.has-primary-color {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #6366f1 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Override parent theme heading underline decoration (red/green → blue) */
.wp-block-getwid-section__inner-content > .wp-block-heading::after,
.wp-block-group:not(.wp-block-cover__inner-container *) > .wp-block-heading.has-text-align-center::after {
    background: linear-gradient(90deg, var(--brand), var(--brand-light)) !important;
}

/* Override getwid image box hover shadow (red → blue) */
.wp-block-getwid-image-box:hover {
    box-shadow: 0 10px 40px rgba(37,99,235,0.08), 0 2px 10px rgba(0,0,0,0.04) !important;
    border-color: rgba(37,99,235,0.06) !important;
}

/* Override parent theme link colors */
.wp-block-group p a:not(.wp-block-button__link) {
    color: var(--brand) !important;
    background-image: linear-gradient(var(--brand), var(--brand)) !important;
}

/* Ensure our nav doesn't get overridden */
.dosx-nav,
.dosx-nav * {
    box-sizing: border-box;
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Fix WP block gap inside our custom sections — only reset WP block margins, not our own */
.dosx-hero .wp-block-group,
.dosx-section .wp-block-group,
.dosx-cta .wp-block-group,
.dosx-footer .wp-block-group {
    margin-block-start: 0;
    margin-block-end: 0;
}
/* Preserve intentional spacing in hero */
.dosx-hero-buttons {
    margin-bottom: 80px !important;
}
.dosx-cta-buttons {
    margin-bottom: 48px !important;
}
.dosx-cta-address {
    margin-top: 0 !important;
}

/* Remove blockpress default header/body padding issues */
body.home,
body.page,
body.single {
    padding-top: 0 !important;
}

/* ===== FIX WHITE BORDERS — Homepage only ===== */
/* Homepage uses our custom front-page.html template with wp:html blocks
   that handle their own padding, so we kill outer spacing only on home */
body.home .wp-site-blocks {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove WP default site-blocks gap */
.wp-site-blocks > * {
    margin-block-start: 0;
}

/* Hide parent theme header/footer when our template parts are used */
header.wp-block-template-part:empty,
footer.wp-block-template-part:empty {
    display: none;
}

/* Clean up WordPress block spacing for light theme */
.wp-block-group {
    box-sizing: border-box;
}

/* ===== INNER PAGES — General fixes ===== */
/* Nav overlap fix — push content below fixed nav */
body:not(.home) .site-title-area {
    padding-top: 72px !important;
}
/* Hide the raw page title that bleeds above/over cover on ALL inner pages.
   The title shows in multiple locations depending on template:
   1. .site-title-area .wp-block-post-title
   2. .site-content > .wp-block-group > h1.wp-block-post-title
   3. .site-content > h1.wp-block-post-title
   We hide ALL of them — the cover block has its own title inside. */
body:not(.home) h1.wp-block-post-title.has-x-large-font-size {
    display: none !important;
}
body:not(.home) .site-title-area .wp-block-post-title {
    display: none !important;
}
/* But DON'T hide the title inside cover blocks */
body:not(.home) .wp-block-cover h1.wp-block-post-title {
    display: block !important;
}
/* And don't hide the title inside work page content (app icon area) */
body.single-work .application-info h1.wp-block-post-title {
    display: block !important;
    font-size: 22px !important;
}

/* ===== SINGLE WORK PAGES — Content overflow fix ===== */
body.single-work .site-content {
    overflow: hidden;
}
body.single-work .wp-block-cover {
    margin-left: calc(-1 * var(--wp--custom--spacing--outer, 0px)) !important;
    margin-right: calc(-1 * var(--wp--custom--spacing--outer, 0px)) !important;
    width: auto !important;
}

/* Empty space below work content — hide empty spacers and empty groups */
body.single-work .wp-block-spacer:last-child,
body.single-work .wp-block-group:empty {
    display: none !important;
}

/* ===== WORKS / INNER PAGES — Full-width covers ===== */
body:not(.home) .wp-block-cover.alignfull {
    width: auto !important;
}

/* Post navigation — clean styling, hide empty */
body.single-work .wp-block-post-navigation-link {
    min-height: 0 !important;
}
body.single-work .wp-block-post-navigation-link:empty,
body.single-work .wp-block-group.is-style-no-margin:empty {
    display: none !important;
}
/* Hide the empty CTA/comment area at bottom of work pages */
body.single-work .wp-block-comments-query-loop:empty,
body.single-work .wp-block-post-content > .wp-block-group:last-child:empty {
    display: none !important;
}

/* ===== FIX: has-primary-color — map to brand blue ===== */
.has-primary-color {
    color: var(--wp--preset--color--primary, #2563eb) !important;
}
.has-primary-background-color {
    background-color: var(--wp--preset--color--primary, #2563eb) !important;
}
/* Fix Getwid tabs — active tab must be brand blue, not red/purple */
.wp-block-getwid-tabs__nav-link.is-active,
.wp-block-getwid-tabs__nav-link[aria-selected="true"],
.wp-block-getwid-tabs__nav-link.is-active .wp-block-getwid-tabs__title-wrapper,
.wp-block-getwid-tabs__nav-link.is-active a,
.wp-block-getwid-tabs__nav-link.is-active .wp-block-getwid-tabs__title {
    color: #2563eb !important;
    border-color: #2563eb !important;
    border-bottom-color: #2563eb !important;
}
/* All tab links default state */
.wp-block-getwid-tabs__nav-link a,
.wp-block-getwid-tabs__nav-link .wp-block-getwid-tabs__title {
    color: var(--text-muted) !important;
    text-decoration: none !important;
}
.wp-block-getwid-tabs__nav-link:hover a,
.wp-block-getwid-tabs__nav-link:hover .wp-block-getwid-tabs__title {
    color: #2563eb !important;
}
/* Tab heading should not look like heading */
.wp-block-getwid-tabs__title-wrapper {
    font-size: 15px !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

/* ===== FIX: Cover text overlap on /quatation/ and /works/ ===== */
.wp-block-cover .wp-block-cover__inner-container .wp-block-post-title,
.wp-block-cover .wp-block-cover__inner-container h1,
.wp-block-cover .wp-block-cover__inner-container h2 {
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}
/* Ensure cover block text is visible and not clipped */
.wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

/* ===== FIX: Blockpress parent theme submit buttons ===== */
input[type="submit"],
button[type="submit"] {
    background-color: var(--wp--preset--color--primary, #2563eb) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
}
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--wp--preset--color--brand-dark, #1d4ed8) !important;
}

/* ===== NEW PAGES (app/*, service/*) ===== */
/* Ensure new pages with wp:html content render full-width */
body.page .wp-block-post-content > div:first-child {
    max-width: none;
    margin-left: calc(-1 * var(--wp--custom--spacing--outer, 30px));
    margin-right: calc(-1 * var(--wp--custom--spacing--outer, 30px));
}
body.page .wp-block-post-content > div:first-child > section {
    width: 100%;
}
/* New pages hero section needs padding-top for fixed nav */
body.page .wp-block-post-content > div[style*="padding-top:72px"] {
    padding-top: 72px;
}
/* Ensure hero text doesn't get cut off */
body.page .wp-block-post-content section[style*="position:relative"] {
    overflow: visible;
}
body.page .wp-block-post-content section h1 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== QUOTATION PAGE — specific fixes ===== */
/* Hide the duplicate "Get Quotation" text showing outside cover */
body.page-id-1073 .site-title-area .wp-block-post-title,
body [class*="page-slug-quatation"] .site-title-area .wp-block-post-title,
body.page .site-title-area .wp-block-post-title {
    display: none !important;
}
