/* Minimalist Travel Blog Styles */

html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #0066cc;
    --border-color: #eeeeee;
    --max-width: 800px;
    --spacing: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
}

body {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing);
}

header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
}

.email-subscribe {
    margin-bottom: 1rem;
    max-width: 400px;
}

.email-subscribe h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.email-subscribe p {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 0.125rem 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    background: white;
    font-size: 0.7rem;
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: #999;
}

.subscribe-form button {
    padding: 0.125rem 0.375rem;
    background: #888;
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.7rem;
}

.subscribe-form button:hover {
    background: #666;
}

.subscribe-confirmation {
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #495057;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

nav {
    display: flex;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero p {
    color: #666;
    font-size: 1.1rem;
}

.posts {
    display: grid;
    gap: 2rem;
}

.post-preview {
    margin-bottom: 1.5rem;
}

.post-preview h3 {
    margin: 0 0 0.5rem 0;
}

.post-preview h3 a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    display: block;
    /* This should be identical to .post-header h2 styling */
}

.post-preview h3 a:hover {
    color: var(--accent-color);
}

.post-preview time {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.post-preview p {
    color: #555;
    line-height: 1.6;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
    color: #666;
    font-size: 0.9rem;
}

.archive-button {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
}

.archive-button:hover {
    text-decoration: underline;
}

/* Post page styles */
.post {
    line-height: 1.7;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Make post page title identical to index page title */
.post-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-decoration: none;
    color: var(--text-color);
    line-height: 1.2;
    display: block;
}

.post-header time {
    color: #666;
    font-size: 0.9rem;
}

.post-content {
    max-width: none;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-color);
}

.post-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.post-content .image-container {
    position: relative;
    float: left;
    margin: 1rem 1rem 0.5rem 0;
    max-width: 400px;
}

.post-content .image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    max-height: 300px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content .image-container figcaption {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.7rem;
    color: white;
    font-style: italic;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 2px;
    backdrop-filter: blur(2px);
}

.post-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.post-content a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }

    .posts {
        gap: 1rem;
    }

    .post-preview {
        padding: 1rem;
    }

    /* Ensure mobile horizontal alignment matches index and post pages */
    .post-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .post-content .image-container {
        float: none;
        margin: 1rem 0 0.5rem 0;
        max-width: 100%;
    }

    .post-content .image-container figcaption {
        position: static;
        background: none;
        color: #666;
        padding: 0;
        margin-top: 0.5rem;
        font-size: 0.8rem;
    }
}
