/* ============================================================================
   GDTG SHARED UI COMPONENTS: Hero, 6-Card Grid, Section Cards, Tables, Badges
   ============================================================================ */

/* 1. Light-SaaS / Dark-SaaS Hero Banner (Synced from GDTG.VN) */
.gdtg-hero {
    background: var(--gdtg-bg-hero);
    padding: 46px 16px 36px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gdtg-border);
}

.gdtg-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.gdtg-hero-center {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 28px;
}

.gdtg-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: var(--gdtg-surface);
    border: 1px solid var(--gdtg-border);
    box-shadow: var(--gdtg-shadow-sm);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gdtg-indigo);
    margin-bottom: 18px;
}

body:not(.light-theme) .gdtg-hero-eyebrow {
    color: #38bdf8;
    background: rgba(30, 41, 59, 0.8);
}

.gdtg-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.95rem, 4.1vw, 3.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--gdtg-text);
    margin-bottom: 16px;
}

.gdtg-hero-title-gradient {
    display: block;
    background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gdtg-hero-lead {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--gdtg-muted);
    max-width: 670px;
    margin: 0 auto 22px;
}

/* Quick-action pills strip */
.gdtg-quick-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.gdtg-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--gdtg-border);
    background: var(--gdtg-surface);
    color: var(--gdtg-text-secondary);
    box-shadow: var(--gdtg-shadow-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gdtg-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--gdtg-shadow-md);
}

.gdtg-pill-amber { background: #fefce8; border-color: #fde047; color: #a16207; }
.gdtg-pill-rose { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.gdtg-pill-emerald { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.gdtg-pill-cyan { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }

body:not(.light-theme) .gdtg-pill-amber { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.35); color: #fcd34d; }
body:not(.light-theme) .gdtg-pill-rose { background: rgba(244, 63, 94, 0.14); border-color: rgba(244, 63, 94, 0.35); color: #fda4af; }
body:not(.light-theme) .gdtg-pill-emerald { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.35); color: #6ee7b7; }
body:not(.light-theme) .gdtg-pill-cyan { background: rgba(6, 182, 212, 0.14); border-color: rgba(6, 182, 212, 0.35); color: #67e8f9; }

.gdtg-pill-tag {
    padding: 1px 7px;
    border-radius: 9999px;
    font-size: 10.5px;
    font-weight: 800;
    background: #ef4444;
    color: #ffffff;
}

/* 2. 6-Card Dark Vector Service Bento Grid (Synced with GDTG.VN) */
.gdtg-service-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.gdtg-service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 215px;
    padding: 18px 16px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 32px -12px rgba(2, 6, 23, 0.55);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.24s ease;
}

.gdtg-service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.22;
    pointer-events: none;
}

.gdtg-service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 22px 42px -12px rgba(14, 165, 233, 0.35);
    color: #ffffff;
}

.gdtg-sc-teal { background: linear-gradient(160deg, #0b2434 0%, #091726 100%); }
.gdtg-sc-blue { background: linear-gradient(160deg, #132c75 0%, #0b1640 100%); }
.gdtg-sc-emerald { background: linear-gradient(160deg, #0d2a24 0%, #081816 100%); }
.gdtg-sc-slate { background: linear-gradient(160deg, #181f2c 0%, #0b0f17 100%); }
.gdtg-sc-violet { background: linear-gradient(160deg, #271b52 0%, #110d2a 100%); }
.gdtg-sc-indigo { background: linear-gradient(160deg, #112442 0%, #091224 100%); }

.gdtg-sc-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.gdtg-sc-title {
    font-family: var(--font-display);
    font-size: 16.5px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.gdtg-sc-desc {
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.82);
    position: relative;
    z-index: 1;
}

.gdtg-sc-decor {
    position: absolute;
    right: -12px;
    bottom: -12px;
    width: 88px;
    height: 88px;
    opacity: 0.14;
    color: #ffffff;
    pointer-events: none;
}

/* 3. Mid-Page Content Sections (Guide Dark Card + Tools + Showcase) */
.gdtg-section {
    padding: 44px 16px;
}

.gdtg-section-alt {
    background: var(--gdtg-surface-alt);
    border-top: 1px solid var(--gdtg-border);
    border-bottom: 1px solid var(--gdtg-border);
}

.gdtg-container {
    max-width: 1280px;
    margin: 0 auto;
}

.gdtg-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
}

.gdtg-section-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--gdtg-text);
    letter-spacing: -0.02em;
}

.gdtg-section-sub {
    font-size: 14px;
    color: var(--gdtg-muted);
    margin-top: 4px;
}

.gdtg-guide-panel {
    background: linear-gradient(135deg, #0f172a 0%, #172554 100%);
    color: #f8fafc;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: var(--gdtg-shadow-md);
}

.gdtg-surface-card {
    background: var(--gdtg-card);
    border: 1px solid var(--gdtg-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--gdtg-shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gdtg-surface-card:hover {
    border-color: var(--gdtg-border-strong);
    box-shadow: var(--gdtg-shadow-md);
}

/* Light-mode safety override for legacy Home/Subpage Tailwind dark classes */
body.light-theme .gdtg-showcase-wrap h2,
body.light-theme .gdtg-showcase-wrap h3,
body.light-theme .gdtg-showcase-wrap .text-white {
    color: #0f172a;
}

body.light-theme .gdtg-showcase-wrap .text-slate-300,
body.light-theme .gdtg-showcase-wrap .text-slate-400,
body.light-theme .gdtg-showcase-wrap .text-gray-300,
body.light-theme .gdtg-showcase-wrap .text-gray-400 {
    color: #475569;
}

body.light-theme .gdtg-showcase-wrap .account-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: var(--gdtg-shadow-sm) !important;
}

body.light-theme .gdtg-showcase-wrap .account-card:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: var(--gdtg-shadow-md) !important;
}

body.light-theme .gdtg-showcase-wrap select,
body.light-theme .gdtg-showcase-wrap input[type="text"] {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Shared Table Shell */
.gdtg-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid var(--gdtg-border);
    background: var(--gdtg-card);
}

.gdtg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.gdtg-table th {
    background: var(--gdtg-surface-alt);
    color: var(--gdtg-text-secondary);
    font-weight: 700;
    text-align: left;
    padding: 13px 16px;
    border-bottom: 1px solid var(--gdtg-border);
    white-space: nowrap;
}

.gdtg-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--gdtg-border);
    color: var(--gdtg-text);
}

.gdtg-table tr:last-child td {
    border-bottom: none;
}
