/*
Theme Name: Thailand HomeAtlas - Dark Atlas Portal
Author: PBN Creative
Description: Modern dark theme with sidebar navigation. Deep blues, purples, and card-based layout for Thai real estate intelligence.
Version: 1.0.0
*/

:root {
    /* HomeAtlas Dark Palette */
    --primary: #6366f1;      /* Electric Indigo */
    --secondary: #8b5cf6;    /* Vibrant Purple */
    --accent: #14b8a6;       /* Teal Accent */
    --bg-dark: #0a0e27;      /* Deep Navy */
    --bg-card: #141936;      /* Card Background */
    --bg-elevated: #1e2442;  /* Elevated Surface */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-dim: #1e293b;
    
    --container-width: 1400px;
    --content-width: 860px;
    --sidebar-width: 280px;
    --radius: 12px;
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sidebar Navigation */
.site-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-dim);
    padding: 3rem 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    color: var(--text-main);
}

.sidebar-logo span {
    color: var(--primary);
}

.sidebar-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
}

.sidebar-nav a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: var(--bg-elevated);
    color: var(--primary);
}

/* Main Content with Sidebar Offset */
.site-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Hero Section */
.hero-atlas {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f1629 100%);
    position: relative;
    overflow: hidden;
}

.hero-atlas::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-atlas-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-atlas-content h1 {
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    line-height: 0.95;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-atlas-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    line-height: 1.7;
}

.atlas-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 1.4rem 3.5rem;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: var(--shadow-glow);
}

.atlas-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.3);
}

/* Hero Visual */
.hero-atlas-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.atlas-emoji-wrap {
    position: relative;
    width: 400px;
    height: 400px;
}

.atlas-emoji-main {
    font-size: 14rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.5));
    animation: atlas-pulse 4s ease-in-out infinite;
}

.atlas-emoji-orbit {
    position: absolute;
    font-size: 3.5rem;
    animation: orbit 10s linear infinite;
}

.atlas-emoji-orbit:nth-child(2) { animation-delay: -2.5s; }
.atlas-emoji-orbit:nth-child(3) { animation-delay: -5s; }
.atlas-emoji-orbit:nth-child(4) { animation-delay: -7.5s; }

@keyframes atlas-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(150px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

/* Sections */
.section-atlas {
    padding: 8rem 0;
}

.section-atlas-head {
    text-align: center;
    margin-bottom: 6rem;
}

.section-atlas-head h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-atlas-head p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Atlas Cards */
.atlas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.atlas-card {
    background: var(--bg-card);
    padding: 3.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-dim);
    transition: var(--transition);
}

.atlas-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.atlas-card-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
}

.atlas-card h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.atlas-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Post Cards Dark */
.posts-atlas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

.post-atlas-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-dim);
    transition: var(--transition);
}

.post-atlas-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}

.post-atlas-thumb {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.post-atlas-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-atlas-card:hover .post-atlas-thumb img {
    transform: scale(1.1);
}

.post-atlas-body {
    padding: 2.5rem;
}

.post-atlas-cat {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: block;
}

.post-atlas-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.atlas-post-link {
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.atlas-post-link:hover {
    color: var(--secondary);
}

/* Single Post Dark */
.single-atlas-header {
    padding: 8rem 0 5rem;
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-dark) 100%);
    text-align: center;
}

.single-atlas-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.single-atlas-header h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    max-width: 1100px;
    margin: 0 auto;
    line-height: 1.1;
    color: var(--text-main);
}

.single-atlas-content {
    padding: 6rem 0;
}

.single-atlas-body {
    max-width: var(--content-width);
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
}

.single-atlas-body h2 {
    font-size: 2.8rem;
    font-weight: 900;
    margin: 4.5rem 0 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single-atlas-body p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Unique Dark Lists for HomeAtlas */
.single-atlas-body ul {
    margin: 4rem 0;
    background: var(--bg-card);
    padding: 3.5rem;
    border-radius: var(--radius);
    list-style: none;
    border: 1px solid var(--primary);
}

.single-atlas-body li {
    padding: 1.5rem 0 1.5rem 3.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-dim);
    font-weight: 600;
    color: var(--text-main);
}

.single-atlas-body li:last-child {
    border-bottom: none;
}

.single-atlas-body li::before {
    content: '🗺️';
    position: absolute;
    left: 0;
    top: 1.5rem;
    font-size: 1.5rem;
}

/* Footer Dark */
.site-footer-atlas {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--border-dim);
}

.footer-atlas-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 6rem;
    margin-bottom: 5rem;
}

.footer-atlas-logo {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.footer-atlas-logo span {
    color: var(--primary);
}

.footer-atlas-desc {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-atlas-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.footer-atlas-links a {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.footer-atlas-links a:hover {
    color: var(--primary);
}

.footer-atlas-contact p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
}

.footer-atlas-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--border-dim);
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Pagination Dark */
.pagination-container {
    margin-top: 6rem;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.8rem;
}

.pagination-list a, .pagination-list span {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    font-weight: 800;
    color: var(--text-main);
}

.pagination-list a:hover, .pagination-list .is-active span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Mobile */
@media (max-width: 1024px) {
    .site-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 2rem;
    }
    
    .site-main {
        margin-left: 0;
    }
    
    .hero-atlas-grid, .atlas-grid, .posts-atlas-grid, .footer-atlas-grid {
        grid-template-columns: 1fr;
    }
}
