/* Guide-specific styles */

/* (Removed local .nav-logo override to keep brand logo consistent site-wide) */

/* Breadcrumb navigation */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #2d5a27;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
}

/* Page hero sections */
.page-hero, .guide-hero {
    /* Unified green hero styling (reduced vertical size per request) */
    background: radial-gradient(1200px 600px at 20% -10%, rgba(244, 233, 155, 0.25), transparent 60%),
                radial-gradient(900px 500px at 90% 0%, rgba(45, 90, 39, 0.18), transparent 60%),
                linear-gradient(135deg, var(--kg-hero-start) 0%, var(--kg-hero-end) 100%);
    color: #fff;
    padding: 100px 0 50px; /* was 150px 0 80px */
    text-align: center;
    margin-top: 60px; /* slightly reduced to match other pages */
    position: relative;
    overflow: hidden;
}

/* Decorative shimmer line for guide/page hero to mirror home hero */
.page-hero::after, .guide-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: min(80%, 900px);
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--kg-gold), transparent);
    opacity: 0.7;
}

.page-hero h1, .guide-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-subtitle, .guide-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* Guide info section */
.guide-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.info-item {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Guides listing page */
.guides-listing {
    padding: 80px 0;
}

/* Category index/table of contents */
.guides-listing .category-index {
    margin-bottom: 4rem;
    text-align: center;
}

.guides-listing .category-index h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #2d5a27;
}

.guides-listing .category-intro {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.guides-listing .category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.guides-listing .category-card {
    background-color: white;
    border: 2px solid #e8f5e8;
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.guides-listing .category-card:hover {
    transform: translateY(-5px);
    border-color: #2d5a27;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.guides-listing .category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: #f8fffe;
    border-radius: 50%;
    border: 2px solid #e8f5e8;
}

.guides-listing .category-card:hover .category-icon {
    background-color: #2d5a27;
    border-color: #2d5a27;
    color: white;
}

.guides-listing .category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2d5a27;
    font-weight: 600;
}

.guides-listing .category-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.guides-listing .guide-count {
    font-size: 0.8rem;
    color: #2d5a27;
    background-color: #e8f5e8;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

.guides-listing .category-card:hover .guide-count {
    background-color: rgba(255, 255, 255, 0.9);
}

.category-section {
    margin-bottom: 4rem;
}

.category-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2d5a27;
    border-bottom: 3px solid #e8f5e8;
    padding-bottom: 0.5rem;
}

/* Guide cards enhancements */
.guide-card.coming-soon {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    opacity: 0.8;
}

.guide-card.coming-soon .guide-icon {
    opacity: 0.6;
}

.guide-difficulty {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

.guide-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    justify-content: center;
}

.highlight {
    background-color: #e8f5e8;
    color: #2d5a27;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.guide-card.featured .highlight {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Guide content layout */
.guide-content {
    padding: 80px 0;
}

.guide-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Table of contents sidebar */
.guide-toc {
    position: sticky;
    top: 100px;
    background-color: #f8fffe;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.guide-toc h3 {
    margin-bottom: 1rem;
    color: #2d5a27;
    font-size: 1.2rem;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.5rem 0.8rem;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.toc-link:hover, .toc-link.active {
    background-color: #2d5a27;
    color: white;
    transform: translateX(5px);
}

/* Guide main content */
.guide-main {
    max-width: none;
}

.guide-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8f5e8;
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h2 {
    font-size: 2rem;
    color: #2d5a27;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid #2d5a27;
}

.section-intro {
    background-color: #f8fffe;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #2d5a27;
}

.section-intro strong {
    color: #2d5a27;
}

/* Module content layout */
.module-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.objectives, .activities {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.objectives h3, .activities h3 {
    color: #2d5a27;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.objectives {
    border-top: 4px solid #667eea;
}

.activities {
    border-top: 4px solid #764ba2;
}

/* Implementation tips */
.implementation-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tip-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #2d5a27;
}

.tip-card h4 {
    color: #2d5a27;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* References section */
.guide-references {
    background-color: #f8fffe;
    padding: 2rem;
    border-radius: 15px;
    margin-top: 3rem;
}

.guide-references h2 {
    border-left: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reference {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.ref-number {
    background-color: #2d5a27;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.reference a {
    color: #2d5a27;
    text-decoration: none;
    line-height: 1.4;
}

.reference a:hover {
    text-decoration: underline;
}

/* Citations in content */
.citation {
    color: #2d5a27;
    text-decoration: none;
    font-weight: 600;
    margin-left: 2px;
}

.citation:hover {
    text-decoration: underline;
}

/* Newsletter signup */
.newsletter-signup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 4rem;
}

.newsletter-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.signup-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto 1rem;
}

.email-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
}

.signup-button {
    padding: 0.8rem 1.5rem;
    background-color: #2d5a27;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.signup-button:hover {
    background-color: #1e3e1a;
}

.privacy-note {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* Guide resource styling for coming soon cards */
.guide-resource {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.guide-resource h4 {
    font-size: 1rem;
    color: #2d5a27;
    margin-bottom: 0.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.resource-author {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem !important;
}

.guide-resource .resource-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 1rem !important;
}

.guide-card.coming-soon .guide-link {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
    background-color: transparent;
    border-color: #2d5a27;
    color: #2d5a27;
}

.guide-card.coming-soon .guide-link:hover {
    background-color: #2d5a27;
    color: white;
}

/* ---------------------------------------------
   Resource section spacing (all guides)
   Increase vertical gap between section headings (h2)
   and their card grids. Adapted to work whether the
   wrapping container is <main> or an inner .wrap div.
---------------------------------------------- */
/* Space below headings before card grid */
main section > h2 + .grid,
.wrap section > h2 + .grid,
main section > h2 + .res-grid,
.wrap section > h2 + .res-grid {
    margin-top: 1.75rem; /* increased from 1.25rem for clearer separation */
}
/* For structures where h2 is wrapped in a .section-heading wrapper (e.g., math testing page) */
.section-heading + .res-grid, .section-heading + .grid {
    margin-top: 1.5rem;
}
/* Space after each resource grid before next section */
main section > .grid,
.wrap section > .grid,
main section > .res-grid,
.wrap section > .res-grid {
    margin-bottom: 2.5rem; /* slightly larger to balance increased top gap */
}

/* Responsive design for guides */
@media screen and (max-width: 1024px) {
    .guide-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .guide-toc {
        position: relative;
        top: auto;
        order: -1;
    }
    
    .toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .toc-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

@media screen and (max-width: 768px) {
    .page-hero, .guide-hero {
        padding: 120px 0 60px;
    }
    
    .page-hero h1, .guide-hero h1 {
        font-size: 2.2rem;
    }
    
    .guide-info {
        gap: 1rem;
    }
    
    .info-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .module-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .implementation-tips {
        grid-template-columns: 1fr;
    }
    
    .signup-form {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .guide-section h2 {
        font-size: 1.6rem;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .guide-hero, .page-hero {
        padding: 100px 0 50px;
    }
    
    .page-hero h1, .guide-hero h1 {
        font-size: 1.8rem;
    }
    
    .guide-toc, .section-intro, .objectives, .activities {
        padding: 1rem;
    }
    
    .newsletter-signup {
        padding: 2rem 1rem;
    }
}
