/* Modern CSS for Travel Blog */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5f7c;
    --secondary-color: #e8956b;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    border-bottom: 4px solid var(--secondary-color);
}

header.simple-header {
    background: var(--primary-color);
    padding: 1.5rem 0;
    border-bottom: 3px solid var(--secondary-color);
}

header.simple-header .site-title {
    font-size: 1.8rem;
    margin: 0;
}

header.simple-header .site-title a {
    color: white;
    text-decoration: none;
}

header.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3f54 100%);
    padding: 4rem 0;
    text-align: center;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    background: #000;
}

.hero-header-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 90%;
    max-width: 900px;
    padding: 2rem 1.5rem;
    background: rgba(44, 95, 124, 0.35);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-header-overlay .site-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
}

.hero-header-overlay .tagline {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 1);
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 3rem 2rem 2rem;
    color: white;
}

.carousel-caption h2 {
    font-size: 2rem;
    margin: 0;
}

.carousel-caption a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.carousel-caption a:hover {
    opacity: 0.8;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: 60vh;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    margin-top: 0;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: center;
}

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

.welcome-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.post-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
    display: block;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.post-card h2 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card h2 a:hover {
    color: var(--secondary-color);
}

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

.post-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
}

/* Single Post */
.post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--light-bg);
    border-bottom: 3px solid var(--secondary-color);
}

.post-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

/* Post Hero (Featured Image with Overlay) */
.post-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #000;
    margin-bottom: 3rem;
}

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

.post-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    background: linear-gradient(to top, rgba(44, 95, 124, 0.95) 0%, rgba(44, 95, 124, 0.85) 70%, transparent 100%);
    color: white;
}

.post-hero-overlay h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.post-hero-overlay time {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Featured Image in Post (old style, kept for fallback) */
.post-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

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

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content figure {
    margin: 2rem 0;
    text-align: center;
}

.post-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.post-content figcaption {
    margin-top: 0.5rem;
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-caption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
}

/* Post Footer */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
}

.nav-prev, .nav-next, .nav-home {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.nav-prev {
    background: var(--light-bg);
    color: var(--primary-color);
    justify-self: start;
}

.nav-next {
    background: var(--light-bg);
    color: var(--primary-color);
    justify-self: end;
}

.nav-home {
    background: var(--primary-color);
    color: white;
}

.nav-prev:hover, .nav-next:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.nav-home:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.nav-prev.disabled, .nav-next.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Site Footer */
.site-footer {
    background: var(--light-bg);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: #666;
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-header-overlay {
        padding: 1rem 0.8rem;
        width: 75%;
        background: rgba(44, 95, 124, 0.3);
    }

    .hero-header-overlay .site-title {
        font-size: 1.5rem;
    }

    .post-hero {
        height: 400px;
    }

    .post-hero-overlay {
        padding: 2rem 1.5rem;
    }

    .post-hero-overlay h1 {
        font-size: 2rem;
    }

    .post-hero-overlay time {
        font-size: 0.95rem;
    }

    .hero-header-overlay .tagline {
        font-size: 1.1rem;
    }

    header.simple-header .site-title {
        font-size: 1.5rem;
    }

    .carousel-container {
        height: 400px;
    }

    .site-title {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .nav-prev, .nav-next {
        justify-self: stretch;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .nav-home {
        order: -1;
    }
}
