/* ==========================================================================
   Escape Route Daily — Custom Travel Theme
   ========================================================================== */

/* Variables
   ========================================================================== */
:root {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-surface-hover: #334155;
    --color-border: #334155;
    --color-accent: #f59e0b;
    --color-accent-light: #fbbf24;
    --color-accent-red: #ef4444;
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-white: #ffffff;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --transition: 0.3s ease;
}

.dark-mode {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-text: #f1f5f9;
}

html:not(.dark-mode):not(.auto-color) {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-hover: #f1f5f9;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
}

@media (prefers-color-scheme: light) {
    .auto-color {
        --color-bg: #f8fafc;
        --color-surface: #ffffff;
        --color-surface-hover: #f1f5f9;
        --color-border: #e2e8f0;
        --color-text: #1e293b;
        --color-text-secondary: #475569;
        --color-text-muted: #94a3b8;
    }
}

/* Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 62.5%;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-light); }

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

::selection { background: var(--color-accent); color: var(--color-bg); }

/* Layout
   ========================================================================== */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gh-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4vmin;
}

.gh-canvas {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 4vmin;
}

.gh-main {
    flex: 1;
    padding: 8vmin 0;
}

/* Header
   ========================================================================== */
.gh-head {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.9);
}

html:not(.dark-mode):not(.auto-color) .gh-head {
    background: rgba(248, 250, 252, 0.9);
}

@media (prefers-color-scheme: light) {
    .auto-color .gh-head {
        background: rgba(248, 250, 252, 0.9);
    }
}

.gh-head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4vmin;
    height: 64px;
}

.gh-head-brand {
    display: flex;
    align-items: center;
}

.gh-head-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
}

.gh-head-logo img {
    max-height: 44px;
    width: auto;
}

.gh-head-menu {
    display: flex;
    gap: 2.4rem;
}

.gh-head-menu a {
    color: var(--color-text-secondary);
    font-size: 1.4rem;
    font-weight: 500;
    transition: color var(--transition);
}

.gh-head-menu a:hover { color: var(--color-accent); }

.gh-head-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gh-icon-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color var(--transition);
}

.gh-icon-btn:hover { color: var(--color-accent); }

/* Burger menu */
.gh-burger {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    margin-left: 1.5rem;
}

.gh-burger::before,
.gh-burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition);
}

.gh-burger::before { top: 8px; }
.gh-burger::after { bottom: 8px; }

@media (max-width: 767px) {
    .gh-head-menu { display: none; }
    .gh-burger { display: block; }

    .gh-head-open .gh-head-menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 2rem 4vmin;
        gap: 1.6rem;
    }

    .gh-head-open .gh-head-menu a {
        font-size: 1.8rem;
    }

    .gh-head-open .gh-burger::before {
        top: 14px;
        transform: rotate(45deg);
    }
    .gh-head-open .gh-burger::after {
        bottom: 14px;
        transform: rotate(-45deg);
    }
}

/* Cover / Hero
   ========================================================================== */
.gh-cover {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: var(--color-surface);
}

.gh-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.3) 0%, rgba(15,23,42,0.85) 100%);
}

.gh-cover-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 8vmin 4vmin;
    text-align: center;
}

.gh-cover-content { text-align: center; }
.gh-cover-left { text-align: left; }

.site-logo {
    max-height: 400px;
    width: auto;
    margin-bottom: 2rem;
}

.site-description {
    font-size: 2.2rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Featured Card
   ========================================================================== */
.gh-featured-card {
    position: relative;
    margin-bottom: 6vmin;
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-surface);
}

.gh-featured-image {
    display: block;
    position: relative;
    aspect-ratio: 21/9;
    overflow: hidden;
}

.gh-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gh-featured-card:hover .gh-featured-image img {
    transform: scale(1.05);
}

.gh-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.2) 60%, transparent 100%);
}

.gh-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem;
}

.gh-featured-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    margin-bottom: 1.2rem;
}

.gh-featured-tag {
    display: inline-block;
    color: var(--color-accent-light);
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 1rem;
}

.gh-featured-title {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.gh-featured-title a { color: var(--color-white); }
.gh-featured-title a:hover { color: var(--color-accent-light); }

.gh-featured-excerpt {
    font-size: 1.7rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.2rem;
    max-width: 600px;
}

.gh-featured-meta {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.gh-featured-dot { margin: 0 0.6rem; }

@media (max-width: 767px) {
    .gh-featured-image { aspect-ratio: 16/10; }
    .gh-featured-content { padding: 2.5rem; }
    .gh-featured-title { font-size: 2.4rem; }
    .gh-featured-excerpt { display: none; }
}


/* Magazine Layout — Hero + Duo + Grid
   ========================================================================== */
.gh-magazine-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3.2rem;
    background: var(--color-surface);
}

.gh-magazine-hero-image {
    display: block;
    position: relative;
    aspect-ratio: 21/9;
    overflow: hidden;
}

.gh-magazine-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gh-magazine-hero:hover .gh-magazine-hero-image img {
    transform: scale(1.03);
}

.gh-magazine-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.92) 0%, rgba(15,23,42,0.4) 50%, transparent 100%);
}

.gh-magazine-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 4.5rem;
}

.gh-magazine-hero-content .gh-card-tag {
    font-size: 1.3rem;
}

.gh-magazine-hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0.8rem 0 1rem;
    max-width: 750px;
}

.gh-magazine-hero-title a {
    color: var(--color-white);
}

.gh-magazine-hero-title a:hover {
    color: var(--color-accent-light);
}

.gh-magazine-hero-excerpt {
    font-size: 1.7rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.2rem;
    max-width: 600px;
    line-height: 1.5;
}

.gh-magazine-hero-content .gh-card-footer {
    color: var(--color-text-muted);
}

@media (max-width: 767px) {
    .gh-magazine-hero-image {
        aspect-ratio: 16/10;
    }
    .gh-magazine-hero-content {
        padding: 2.5rem;
    }
    .gh-magazine-hero-title {
        font-size: 2.4rem;
    }
    .gh-magazine-hero-excerpt {
        display: none;
    }
}

/* Duo row — 2 side-by-side cards */
.gh-magazine-duo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.2rem;
    margin-bottom: 3.2rem;
}

.gh-magazine-duo .gh-card {
    /* Make duo cards slightly taller images */
}

.gh-magazine-duo .gh-card-image {
    aspect-ratio: 16/10;
}

.gh-magazine-duo .gh-card-title {
    font-size: 2.2rem;
}

.gh-magazine-duo .gh-card-excerpt {
    -webkit-line-clamp: 2;
}

@media (max-width: 600px) {
    .gh-magazine-duo {
        grid-template-columns: 1fr;
    }
}

/* Post Feed Grid
   ========================================================================== */
.gh-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.2rem;
}

@media (max-width: 991px) {
    .gh-feed { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .gh-feed { grid-template-columns: 1fr; }
}

/* Post Card
   ========================================================================== */
.gh-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.gh-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--color-accent);
}

.gh-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.gh-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gh-card:hover .gh-card-image img {
    transform: scale(1.08);
}

.gh-card-wrapper {
    padding: 2rem;
}

.gh-card-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.gh-card-tag {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}

.gh-card-featured {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-accent-red);
    text-transform: uppercase;
}

.gh-card-title {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.6rem;
}

.gh-card-title a { color: var(--color-text); }
.gh-card-title a:hover { color: var(--color-accent); }

.gh-card-excerpt {
    font-size: 1.4rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.2rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-card-footer {
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

.gh-card-dot { margin: 0 0.4rem; }

/* Article
   ========================================================================== */
.gh-article-header {
    padding-top: 6vmin;
    margin-bottom: 4vmin;
}

.gh-article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.gh-article-tag {
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}

.gh-article-featured {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-accent-red);
    text-transform: uppercase;
}

.gh-article-title {
    font-size: 4.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.6rem;
}

.gh-article-excerpt {
    font-size: 2rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0 0 2rem;
}

.gh-article-byline {
    display: flex;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.gh-article-byline-content {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.gh-article-author-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.gh-article-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-article-author-image svg {
    width: 100%;
    height: 100%;
    color: var(--color-text-muted);
}

.gh-article-author {
    font-weight: 600;
    color: var(--color-text);
}

.gh-article-date,
.gh-article-readtime {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.gh-article-dot { margin: 0 0.4rem; color: var(--color-text-muted); }

.gh-article-image {
    margin-bottom: 4vmin;
}

.gh-article-image img {
    border-radius: 8px;
    width: 100%;
}

.gh-article-image-full {
    max-width: none;
    padding: 0;
}

.gh-article-image-full img {
    border-radius: 0;
}

.gh-article-image figcaption {
    margin-top: 1rem;
    font-size: 1.3rem;
    color: var(--color-text-muted);
    text-align: center;
}

@media (max-width: 767px) {
    .gh-article-title { font-size: 3rem; }
    .gh-article-excerpt { font-size: 1.7rem; }
}

/* Content
   ========================================================================== */
.gh-content {
    font-size: 1.8rem;
    line-height: 1.75;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.gh-content > * + * { margin-top: 2.4rem; }

.gh-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-top: 4.8rem;
}

.gh-content h3 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-top: 4rem;
}

.gh-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-content blockquote {
    margin: 3.2rem 0;
    padding: 2rem 2.4rem;
    border-left: 4px solid var(--color-accent);
    background: var(--color-surface);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.gh-content pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    overflow-x: auto;
    font-size: 1.4rem;
}

.gh-content code {
    background: var(--color-surface);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.gh-content pre code {
    background: none;
    padding: 0;
}

.gh-content img {
    border-radius: 8px;
}

.gh-content figcaption {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 1rem;
}

.gh-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.gh-content .kg-gallery-row {
    display: flex;
    gap: 1.2rem;
}

.gh-content .kg-gallery-image img {
    border-radius: 6px;
}

/* Read More / Related Posts
   ========================================================================== */
.gh-read-more {
    margin-top: 8vmin;
    padding-top: 4vmin;
    border-top: 1px solid var(--color-border);
}

.gh-read-more-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 3rem;
}

.gh-read-more-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.4rem;
}

@media (max-width: 767px) {
    .gh-read-more-feed {
        grid-template-columns: 1fr;
    }
}

/* Tag / Author Headers
   ========================================================================== */
.gh-tag-header,
.gh-author-header {
    text-align: center;
    padding: 4vmin 0 6vmin;
}

.gh-tag-header h1,
.gh-author-header h1 {
    font-size: 3.6rem;
    font-weight: 800;
    margin: 0 0 1rem;
}

.gh-tag-header p,
.gh-author-bio {
    font-size: 1.7rem;
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.gh-author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1.6rem;
}

/* Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 6vmin;
    font-size: 1.4rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-weight: 500;
    transition: all var(--transition);
}

.pagination a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg);
}

/* Footer
   ========================================================================== */
.gh-foot {
    padding: 4rem 0;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.gh-foot-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4vmin;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gh-foot-menu {
    display: flex;
    gap: 2rem;
}

.gh-foot-menu a {
    color: var(--color-text-muted);
    font-size: 1.3rem;
    transition: color var(--transition);
}

.gh-foot-menu a:hover { color: var(--color-accent); }

.gh-copyright {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

@media (max-width: 600px) {
    .gh-foot-inner {
        flex-direction: column;
        gap: 1.6rem;
        text-align: center;
    }
}

/* Error Pages
   ========================================================================== */
.gh-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.gh-error-code {
    font-size: 12rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
}

.gh-error-message,
.gh-error-description {
    font-size: 2rem;
    color: var(--color-text-secondary);
    margin: 1.6rem 0 3rem;
}

.gh-error-link {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--color-accent);
    color: var(--color-bg);
    border-radius: 8px;
    font-weight: 600;
    transition: background var(--transition);
}

.gh-error-link:hover {
    background: var(--color-accent-light);
    color: var(--color-bg);
}

/* Comments
   ========================================================================== */
.gh-comments {
    margin-top: 4vmin;
    padding-top: 4vmin;
    border-top: 1px solid var(--color-border);
}


/* Koenig Editor Width Classes
   ========================================================================== */
.gh-content .kg-width-wide {
    max-width: min(1040px, calc(100vw - 8vmin));
    margin-left: calc(50% - min(520px, calc(50vw - 4vmin)));
    margin-right: calc(50% - min(520px, calc(50vw - 4vmin)));
}

.gh-content .kg-width-full {
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

.gh-content .kg-width-wide img,
.gh-content .kg-width-full img {
    width: 100%;
}
/* Utilities
   ========================================================================== */
.gh-head-menu .nav li { list-style: none; }
.gh-head-menu .nav { display: flex; gap: 2.4rem; margin: 0; padding: 0; }
.gh-foot-menu .nav { display: flex; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.gh-foot-menu .nav li { list-style: none; }
