/*
 * Wanderlust Travel Blog - Green Theme
 * Inspired by Ghost's clean, minimal aesthetic
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* CSS Variables */
:root {
    /* Green Theme Colors */
    --primary: #2d6a4f;
    --primary-light: #40916c;
    --primary-dark: #1b4332;
    --primary-bg: #d8f3dc;
    --primary-bg-light: #f0fff4;

    --accent: #52b788;
    --accent-light: #74c69d;
    --accent-dark: #40916c;

    /* Neutral Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;

    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;

    --border-color: #e2e8f0;
    --border-light: #f0f4f8;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-width: 1200px;
    --content-width: 720px;

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}


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

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

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.5rem;
}

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

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

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

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Header */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

/* Navigation */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a:hover::after {
    width: 100%;
}

/* Country Dropdown */
.country-dropdown {
    position: relative;
}

.country-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    font-family: inherit;
}

.country-dropdown-toggle:hover {
    color: var(--primary);
}

.country-dropdown-toggle svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.country-dropdown:hover .country-dropdown-toggle svg {
    transform: rotate(180deg);
}

.country-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.country-dropdown:hover .country-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.country-dropdown-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.country-dropdown-menu a:hover {
    background: var(--primary-bg-light);
    color: var(--primary);
}

.country-dropdown-menu .article-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-bg-light) 0%, var(--primary-bg) 100%);
    padding: 5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Stats Section */
.stats-section {
    padding: 3rem 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Articles Grid */
.articles-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.section-title span {
    color: var(--primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Article Card */
.article-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    border: 1px solid var(--border-light);
}

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

.article-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--primary-bg);
}

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

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

.article-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--accent-light) 100%);
}

.article-card-placeholder svg {
    width: 64px;
    height: 64px;
    color: var(--primary);
    opacity: 0.5;
}

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

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-card-meta svg {
    width: 14px;
    height: 14px;
}

.article-card-countries {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    font-weight: 500;
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text-primary);
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.read-more:hover svg {
    transform: translateX(4px);
}

.reading-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Featured Article */
.featured-article {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
}

.featured-article .article-card-image {
    height: 100%;
    min-height: 400px;
    border-radius: 12px 0 0 12px;
}

.featured-article .article-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-article h3 {
    font-size: 1.75rem;
}

/* Single Article */
.article-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.article-header .article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-header .article-countries {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-header .article-countries a {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-header .article-countries a:hover {
    background: var(--primary);
    color: white;
}

.article-header h1 {
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.article-header .article-excerpt {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.article-featured-image {
    max-width: 1000px;
    margin: 0 auto 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

/* Article Content */
.article-content {
    padding: 2rem 0 4rem;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-content img {
    border-radius: 8px;
    margin: 2rem auto;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.article-content ul, .article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

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

.article-content code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content pre {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

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

/* Country Page */
.country-header {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-bg-light) 0%, var(--primary-bg) 100%);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.country-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.country-header p {
    color: var(--text-secondary);
}

/* Search */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.search-btn {
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Footer */
.site-footer {
    background: var(--text-primary);
    color: var(--bg-secondary);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--bg-primary);
    margin-bottom: 1rem;
}

.footer-about p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-section h4 {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bg-primary);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--bg-primary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-article .article-card-image {
        border-radius: 12px 12px 0 0;
        min-height: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

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

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .article-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Current Location Section */
.current-location-section {
    padding: 1rem 0;
    background: var(--primary-dark);
    border-bottom: 1px solid var(--primary);
}

.current-location-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.location-map-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-light);
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(82, 183, 136, 0.4);
}

.location-map-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
}

.location-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.location-city {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent-light);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.location-pin {
    font-size: 1rem;
    animation: pulse-pin 2s ease-in-out infinite;
}

@keyframes pulse-pin {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@media (max-width: 480px) {
    .current-location-widget {
        flex-direction: column;
        text-align: center;
    }

    .location-text {
        flex-direction: column;
        gap: 0.25rem;
    }

    .location-city {
        font-size: 1rem;
    }
}
