/* ============================================
   SUBPAGE STYLES - For detailed project pages
   ============================================ */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 4rem 20px 3rem;
    margin-bottom: 3rem;
}

.page-header .container {
    max-width: var(--container-width);
}

.back-link {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    display: inline-block;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: white;
    transform: translateX(-5px);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

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

/* Main Content Area */
.page-content {
    padding: 2rem 20px 4rem;
}

.content-article {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.content-section {
    margin-bottom: 3rem;
}

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

.content-section h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.content-section h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

.content-section p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
}

.content-section ul,
.content-section ol {
    margin: 1rem 0 1.5rem 2rem;
    line-height: 1.8;
}

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

/* Highlight Boxes */
.highlight-box {
    background: var(--background-alt);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
}

.highlight-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.highlight-box ul {
    margin-bottom: 0;
}

/* Media Containers */
.media-container {
    margin: 2rem 0;
}

.video-placeholder,
.media-container iframe,
.media-container video {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.media-caption {
    font-style: italic;
    color: var(--text-light);
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

/* Image-Text Grid Layout */
.image-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin: 2rem 0;
}

.grid-image {
    position: sticky;
    top: 100px;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary-color);
}

.feature-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Advantages List */
.advantages-list {
    margin: 2rem 0;
}

.advantage-item {
    display: flex;
    gap: 1.5rem;
    align-items: start;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.advantage-icon {
    font-size: 2.5rem;
    min-width: 50px;
    text-align: center;
}

.advantage-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
}

.advantage-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Related Content Sidebar */
.related-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background-alt);
    border-radius: var(--border-radius);
}

.related-content h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: block;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--hover-color);
}

.related-card h4 {
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
}

.related-card p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* Quote/Callout Boxes */
.callout {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.callout strong {
    color: #FFD700;
}

/* Image Gallery in Articles */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.article-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Data/Stats Display */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Timeline for research history */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-year {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Responsive Subpage Layout */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .image-text-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .grid-image {
        position: static;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-item {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline {
        padding-left: 2rem;
    }
    
    .timeline-item::before {
        left: -2.5rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 20px 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
