/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6600;
    --primary-dark: #cc5200;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --beginner-color: #28a745;
    --intermediate-color: #ffc107;
    --advanced-color: #dc3545;
    --border-radius: 8px;
}

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

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

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Filters */
.filters {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-box {
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: var(--white);
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

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

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

/* Guides Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0 4rem;
}

/* Guide Card */
.guide-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    overflow: hidden;
}

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

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

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

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

.card-content {
    padding: 1.5rem;
}

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

.difficulty {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-beginner {
    background-color: var(--beginner-color);
    color: var(--white);
}

.difficulty-intermediate {
    background-color: var(--intermediate-color);
    color: var(--text-color);
}

.difficulty-advanced {
    background-color: var(--advanced-color);
    color: var(--white);
}

.estimated-time {
    color: var(--text-light);
    font-size: 0.9rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    line-height: 1.3;
}

.card-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-color);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-date {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Guide Page */
.guide-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 3rem 0;
}

.guide-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.guide-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.guide-description {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.guide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.guide-tags .tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.guide-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

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

.image-credit {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
}

.image-credit a {
    color: var(--primary-color);
    text-decoration: none;
}

.image-credit a:hover {
    text-decoration: underline;
}

.guide-content {
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.guide-content h2 {
    color: var(--secondary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.guide-content h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.guide-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

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

.guide-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.guide-content code {
    background-color: var(--bg-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.guide-content pre {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.guide-content pre code {
    background-color: transparent;
    padding: 0;
    color: var(--white);
}

.guide-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: rgba(255, 102, 0, 0.05);
    border-radius: 4px;
    font-style: normal;
}

.guide-content blockquote p {
    margin-bottom: 0.5rem;
}

.guide-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Colorful callout boxes for tips, warnings, insights */
.guide-content blockquote:has(strong:first-child) {
    background-color: rgba(40, 167, 69, 0.08);
    border-left-color: #28a745;
}

/* Links styling */
.guide-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.guide-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Make Further Reading section stand out */
.guide-content h2:last-of-type {
    color: var(--primary-color);
}

/* Add visual variety to sections */
.guide-content h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.guide-content h3::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.guide-footer {
    padding: 2rem 0 4rem;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-text {
    margin-bottom: 1rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-credit {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-credit a {
    color: var(--primary-color);
    text-decoration: none;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

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

    .hero-description {
        font-size: 1rem;
    }

    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

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

    .guide-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filters {
        padding: 1.5rem 0 2rem;
        margin-bottom: 1rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .guide-image {
        height: 300px;
    }

    .card-image {
        height: 180px;
    }

    .guide-content {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .filters {
        padding: 1rem 0 1.5rem;
        margin-bottom: 0.5rem;
    }

    .guide-content {
        padding: 1.5rem 0.75rem;
    }

    .guide-content h2 {
        font-size: 1.5rem;
    }

    .guide-content h3 {
        font-size: 1.25rem;
    }

    .guide-image {
        height: 250px;
    }

    .card-image {
        height: 160px;
    }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Series Info Box (Top of Content) */
.series-info-box {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
    border: 2px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.1);
}

.series-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.series-badge {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.series-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary-color);
    flex: 1;
}

.series-progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 102, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.series-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.3);
}

/* Series Navigation (Bottom of Content) */
.series-navigation {
    margin-top: 4rem;
    padding: 2rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
}

.series-nav-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.series-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.series-nav-link {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    min-height: 100px;
}

.series-nav-link:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.series-nav-link.prev {
    justify-content: flex-start;
}

.series-nav-link.next {
    justify-content: flex-end;
}

.nav-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.series-nav-link:hover .nav-arrow {
    transform: scale(1.2);
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .series-info-box {
        padding: 1.25rem 1rem;
    }

    .series-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .series-badge {
        font-size: 0.85rem;
    }

    .series-name {
        font-size: 1rem;
    }

    .series-navigation {
        padding: 1.5rem 1rem;
        margin-top: 3rem;
    }

    .series-nav-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .series-nav-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .series-nav-link {
        padding: 1.25rem 1rem;
        min-height: 80px;
    }

    .nav-arrow {
        font-size: 1.5rem;
    }

    .nav-title {
        font-size: 0.95rem;
    }
}
