/* ===========================
   Travel with JZ - Main Styles
   =========================== */

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

:root {
    /* Colors */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f6ad55;
    --success: #48bb78;
    --danger: #f56565;
    
    /* Grays */
    --gray-900: #1a202c;
    --gray-800: #2d3748;
    --gray-700: #4a5568;
    --gray-600: #718096;
    --gray-500: #a0aec0;
    --gray-400: #cbd5e0;
    --gray-300: #e2e8f0;
    --gray-200: #edf2f7;
    --gray-100: #f7fafc;
    --white: #ffffff;
    
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-900: #f7fafc;
        --gray-800: #edf2f7;
        --gray-700: #e2e8f0;
        --gray-100: #1a202c;
        --gray-200: #2d3748;
        --gray-300: #4a5568;
        --white: #1a202c;
    }
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-sm);
}

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

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--gray-900);
}

.logo {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: var(--space-md);
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    opacity: 0.95;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.rainbow-bar {
    height: 4px;
    background: linear-gradient(90deg, 
        #e74c3c 0%, 
        #f39c12 16.66%, 
        #f1c40f 33.33%, 
        #2ecc71 50%, 
        #3498db 66.66%, 
        #9b59b6 83.33%, 
        #e74c3c 100%);
    margin-top: var(--space-lg);
    animation: rainbow-slide 10s linear infinite;
}

@keyframes rainbow-slide {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* Stats Bar */
.stats-bar {
    background: var(--gray-100);
    padding: var(--space-lg) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Posts Section */
.posts-section {
    padding: var(--space-2xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* Featured Post */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.featured-image {
    position: relative;
    height: 400px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: var(--primary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.featured-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-date {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.post-title {
    margin: var(--space-sm) 0;
}

.post-title a {
    color: var(--gray-900);
    font-size: 1.875rem;
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.post-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.reading-time {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.post-tags {
    display: flex;
    gap: var(--space-xs);
}

.tag {
    background: var(--gray-200);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--gray-700);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.post-card-image {
    height: 200px;
    overflow: hidden;
}

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

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

.post-card-content {
    padding: var(--space-md);
}

.post-card-title {
    margin: var(--space-xs) 0;
}

.post-card-title a {
    color: var(--gray-900);
    font-size: 1.25rem;
}

/* Loading Skeletons */
.post-skeleton {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.skeleton-image {
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-content {
    padding: var(--space-md);
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-sm);
}

.skeleton-line.short {
    width: 60%;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: var(--space-xl);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: var(--space-2xl) 0;
    color: white;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-box h2 {
    margin-bottom: var(--space-sm);
}

.newsletter-box p {
    margin-bottom: var(--space-lg);
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.newsletter-privacy {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Article Styles */
.article-header {
    padding: var(--space-xl) 0;
    background: var(--gray-100);
}

.article-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.article-category {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.article-date {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-md);
}

.article-excerpt {
    font-size: 1.25rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.author-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    display: block;
}

.author-bio {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Featured Image */
.featured-image-container {
    max-height: 500px;
    overflow: hidden;
}

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

/* Article Content */
.article-content {
    padding: var(--space-2xl) 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: var(--space-2xl);
}

.article-body {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-800);
}

.article-body h2 {
    font-family: var(--font-sans);
    margin: var(--space-xl) 0 var(--space-md);
}

.article-body h3 {
    font-family: var(--font-sans);
    margin: var(--space-lg) 0 var(--space-sm);
}

.article-body p {
    margin-bottom: var(--space-md);
}

.article-body img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
    font-style: italic;
    color: var(--gray-700);
}

.article-body ul,
.article-body ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.article-body li {
    margin-bottom: var(--space-xs);
}

/* Sidebar */
.article-sidebar {
    position: relative;
}

.sticky {
    position: sticky;
    top: calc(60px + var(--space-md));
}

.toc-container {
    background: var(--gray-100);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.toc-container h3 {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.toc {
    list-style: none;
}

.toc a {
    color: var(--gray-700);
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
}

.toc a:hover,
.toc a.active {
    color: var(--primary);
}

.article-stats {
    background: var(--gray-100);
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
}

.stat-label {
    color: var(--gray-600);
}

.stat-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Photo Gallery */
.photo-gallery {
    margin: var(--space-2xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: var(--space-md);
    font-size: 0.875rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: var(--space-sm);
    transition: var(--transition);
}

.lightbox-close {
    top: var(--space-md);
    right: var(--space-md);
}

.lightbox-prev {
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

/* Cost Breakdown */
.cost-breakdown {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.cost-card {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
}

.cost-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.cost-label {
    display: block;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.cost-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Share Buttons */
.article-actions {
    margin: var(--space-2xl) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-300);
}

.share-buttons h3 {
    margin-bottom: var(--space-md);
}

.share-links {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary);
    color: white;
}

.share-btn svg {
    fill: currentColor;
}

/* Related Posts */
.related-posts {
    margin: var(--space-2xl) 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 0%;
    z-index: 1001;
    transition: width 0.2s;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h3 {
    margin-bottom: var(--space-md);
    font-size: 1.125rem;
}

.footer-section p {
    color: var(--gray-400);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: var(--gray-400);
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-links a {
    color: var(--gray-400);
    transition: var(--transition);
}

.social-links a:hover {
    color: white;
}

.social-links svg {
    fill: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-800);
    color: var(--gray-400);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-md);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 250px;
    }

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

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

    .article-sidebar {
        display: none;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .cost-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .newsletter-cta,
    .article-actions,
    .related-posts,
    .article-sidebar {
        display: none;
    }

    .article-body {
        font-size: 12pt;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }
}