/**
 * Siam Self Storage — marketing pages (public/)
 * Primary orange aligned with space-calculator.php
 */
:root {
    --ss-orange: #e85d04;
    --ss-orange-dark: #c44f03;
    --ss-orange-soft: #fff5f0;
    --ss-text: #1a2332;
    --ss-muted: #5c6570;
    --ss-bg: #f7f8fa;
    --ss-white: #fff;
    --ss-border: #e8ecf0;
    --ss-hero-dark: #0f1419;
    /* Sukhumvit Set: มีใน macOS/iOS หลายเครื่อง — Windows มัก fallback เป็น Leelawadee UI / Sarabun */
    --font: "Sukhumvit Set", "Sukhumvit", "Leelawadee UI", "Segoe UI", "Sarabun", system-ui, sans-serif;
    --header-h: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ss-text);
    background: var(--ss-bg);
    line-height: 1.6;
}

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

a {
    color: var(--ss-orange);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.ss-container {
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

/* ——— Header ——— */
.ss-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ss-border);
    min-height: var(--header-h);
}

.ss-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

@media (min-width: 901px) {
    .ss-header-inner > .ss-nav {
        flex: 1;
        justify-content: flex-end;
    }
}

.ss-header-tools {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.ss-lang {
    display: flex;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.ss-lang button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ss-muted);
    font-family: inherit;
}

.ss-lang button:hover {
    color: var(--ss-orange);
    background: var(--ss-orange-soft);
}

.ss-lang button.is-active {
    background: var(--ss-orange);
    color: #fff;
}

@media (max-width: 900px) {
    .ss-header-inner {
        flex-wrap: wrap;
    }

    .ss-header-tools {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
}

.ss-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--ss-text);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.ss-logo:hover {
    text-decoration: none;
    color: var(--ss-orange);
}

/* อย่าบังคับ height อย่างเดียวใน flex — จะโดนบีบความกว้างแล้วยืดแนวตั้ง */
.ss-logo img {
    display: block;
    width: auto;
    height: auto;
    max-height: 44px;
    max-width: min(220px, 55vw);
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
    align-self: center;
}

.ss-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ss-nav a {
    color: var(--ss-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
}

.ss-nav a:hover {
    background: var(--ss-orange-soft);
    color: var(--ss-orange-dark);
    text-decoration: none;
}

.ss-nav a.is-active {
    color: var(--ss-orange);
}

.ss-nav-cta {
    background: var(--ss-orange) !important;
    color: #fff !important;
}

.ss-nav-cta:hover {
    background: var(--ss-orange-dark) !important;
    color: #fff !important;
}

.ss-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.ss-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ss-text);
}

@media (max-width: 900px) {
    .ss-burger {
        display: flex;
    }

    .ss-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 24px;
        border-bottom: 1px solid var(--ss-border);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .ss-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .ss-nav a {
        padding: 12px 16px;
    }
}

/* ——— Buttons ——— */
.ss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.ss-btn-primary {
    background: var(--ss-orange);
    color: #fff;
}

.ss-btn-primary:hover {
    background: var(--ss-orange-dark);
    color: #fff;
    text-decoration: none;
}

.ss-btn-outline {
    background: #fff;
    color: var(--ss-orange);
    border: 2px solid var(--ss-orange);
}

.ss-btn-outline:hover {
    background: var(--ss-orange-soft);
    text-decoration: none;
}

/* ——— Hero: full-bleed photo + เลเยอร์มืดบาง (ไม่ใช่ blur/hover — ช่วยให้อ่านข้อความ) ——— */
.ss-hero {
    position: relative;
    background-color: #050608;
    color: #fff;
    overflow: hidden;
    min-height: clamp(340px, 48vh, 520px);
}

.ss-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.ss-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    /* โปร่งขึ้นเพื่อให้เห็นรูปชัด — ข้อความใช้ text-shadow ช่วยแทน */
    background:
        linear-gradient(105deg, rgba(5, 8, 12, 0.5) 0%, rgba(5, 8, 12, 0.28) 45%, rgba(8, 12, 18, 0.1) 100%),
        radial-gradient(ellipse 90% 75% at 78% 30%, rgba(232, 93, 4, 0.1), transparent 55%);
    pointer-events: none;
}

.ss-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: center;
    padding: 48px 0 56px;
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

.ss-hero-copy {
    max-width: 38rem;
}

@media (max-width: 900px) {
    .ss-hero {
        min-height: clamp(300px, 44vh, 480px);
    }

    .ss-hero-grid {
        padding: 36px 0 44px;
        text-align: center;
    }

    .ss-hero-copy {
        max-width: none;
        margin-inline: auto;
    }

    .ss-hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.ss-hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ss-orange);
    margin-bottom: 16px;
}

.ss-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65), 0 2px 18px rgba(0, 0, 0, 0.35);
}

.ss-hero-lead {
    margin: 0 0 28px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    max-width: 34ch;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 1px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
    .ss-hero-lead {
        max-width: none;
    }
}

.ss-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ss-hero-visual {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    aspect-ratio: 4/3;
    background: #2a3544;
}

.ss-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ——— Trust strip (ดึงดูด + ความน่าเชื่อถือ) ——— */
.ss-trust-strip {
    background: #fff;
    border-bottom: 1px solid var(--ss-border);
    padding: 20px 0;
}

.ss-trust-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 40px;
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

.ss-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ss-text);
}

.ss-trust-item span.ico {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--ss-orange-soft);
    color: var(--ss-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ——— Sections ——— */
.ss-section {
    padding: 64px 0;
}

.ss-section--white {
    background: var(--ss-white);
}

.ss-section-title {
    text-align: center;
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ss-section-sub {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 560px;
    color: var(--ss-muted);
    font-size: 1.05rem;
}

/* ——— Feature cards ——— */
.ss-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .ss-features {
        grid-template-columns: 1fr;
    }
}

.ss-feature {
    background: var(--ss-white);
    border: 1px solid var(--ss-border);
    border-radius: 14px;
    padding: 28px 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ss-feature:hover {
    border-color: rgba(232, 93, 4, 0.35);
    box-shadow: 0 12px 40px rgba(232, 93, 4, 0.08);
}

.ss-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--ss-orange-soft);
    color: var(--ss-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.ss-feature h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.ss-feature p {
    margin: 0;
    color: var(--ss-muted);
    font-size: 0.95rem;
}

/* ——— Branch cards ——— */
.ss-branch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1000px) {
    .ss-branch-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .ss-branch-grid {
        grid-template-columns: 1fr;
    }
}

.ss-branch-card {
    background: var(--ss-white);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ss-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ss-branch-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.ss-branch-card a {
    color: inherit;
    text-decoration: none;
}

.ss-branch-card a:hover {
    text-decoration: none;
}

.ss-branch-img {
    aspect-ratio: 16/10;
    background: linear-gradient(145deg, #e8ecf0, #dfe5eb);
}

.ss-branch-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ss-branch-body {
    padding: 18px 18px 20px;
}

.ss-branch-body h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.ss-branch-meta {
    font-size: 0.88rem;
    color: var(--ss-muted);
    margin-bottom: 12px;
}

.ss-link-arrow {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ss-orange);
}

/* ——— CTA strip ——— */
.ss-cta-strip {
    background: linear-gradient(90deg, var(--ss-orange) 0%, var(--ss-orange-dark) 100%);
    color: #fff;
    padding: 48px 0;
    text-align: center;
}

.ss-cta-strip h2 {
    margin: 0 0 12px;
    font-size: 1.65rem;
}

.ss-cta-strip p {
    margin: 0 0 24px;
    opacity: 0.95;
}

.ss-cta-strip .ss-btn-outline {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.ss-cta-strip .ss-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ——— Footer ——— */
.ss-footer {
    background: var(--ss-hero-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 48px 0 28px;
    font-size: 0.92rem;
}

.ss-footer a {
    color: rgba(255, 255, 255, 0.88);
}

.ss-footer a:hover {
    color: var(--ss-orange);
}

.ss-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 36px;
}

@media (max-width: 900px) {
    .ss-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .ss-footer-grid {
        grid-template-columns: 1fr;
    }
}

.ss-footer h4 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 0.95rem;
}

.ss-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ss-footer li {
    margin-bottom: 8px;
}

.ss-footer-brand {
    font-weight: 800;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.ss-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Back-to-top — float above compact public footer (find-unit, space-calculator2) */
body[data-ss-page="sc-calculator2"] .scroll-to-top-btn,
body[data-ss-page="uf-find-unit"] .scroll-to-top-btn {
    bottom: calc(var(--ss-scroll-top-bottom, 120px) + env(safe-area-inset-bottom, 0px));
}

/* ——— Page header (inner pages) ——— */
.ss-page-hero {
    background: linear-gradient(135deg, var(--ss-hero-dark) 0%, #1e2a3a 100%);
    color: #fff;
    padding: 48px 0 40px;
    text-align: center;
}

.ss-page-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
}

.ss-page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    max-width: 560px;
    margin-inline: auto;
}

/* ——— Content prose / tables ——— */
.ss-prose {
    max-width: 720px;
    margin-inline: auto;
}

.ss-prose h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.ss-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ss-border);
    border-radius: 12px;
    background: var(--ss-white);
}

.ss-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ss-table th,
.ss-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ss-border);
}

.ss-table th {
    background: var(--ss-orange-soft);
    font-weight: 700;
    color: var(--ss-text);
}

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

/* ——— Contact form ——— */
.ss-form {
    max-width: 520px;
    margin-inline: auto;
    background: var(--ss-white);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--ss-border);
}

.ss-field {
    margin-bottom: 18px;
}

.ss-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.ss-field input,
.ss-field textarea,
.ss-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
}

.ss-field textarea {
    min-height: 120px;
    resize: vertical;
}

.ss-note {
    font-size: 0.88rem;
    color: var(--ss-muted);
    margin-top: 16px;
}

/* ——— Branch detail blocks (branches.html) ——— */
.ss-branch-detail {
    background: #fff;
    border: 1px solid var(--ss-border);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
    scroll-margin-top: 88px;
}

.ss-branch-detail h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.ss-branch-detail p {
    margin: 0 0 10px;
    color: var(--ss-muted);
}

.ss-branch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}
