/* css/report_style.css */

/* Import shared variables */
@import url('global.css');

/* =============================================== */
/* BASE & SHARED STYLES                            */
/* =============================================== */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { 
    font-weight: 600; 
    color: var(--color-primary); 
    line-height: 1.2; 
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }

.container { 
    width: 100%;
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px;
    box-sizing: border-box;
}

.report-header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.report-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
.report-header .logo:hover {
    color: var(--color-secondary);
}

.report-footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: 5rem;
    font-size: 0.9rem;
}
.report-footer a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.3s ease;
}
.report-footer a:hover {
    opacity: 0.8;
}

/* =============================================== */
/* DYNAMIC ANIMATIONS                              */
/* =============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-load {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0; /* Start hidden */
}

/* =============================================== */
/* REPORT LISTING PAGE (`report.html`)             */
/* =============================================== */
.report-page-container {
    padding: 4rem 0;
}
.page-title {
    text-align: center;
    margin-bottom: 1rem;
}
.page-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
    color: var(--color-text-light);
}
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.blog-card {
    background-color: var(--color-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-dark);
}
.blog-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-accent);
}
.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-card-content .blog-type {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}
.blog-card-content .blog-title {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1rem;
}
.blog-card-content .blog-summary {
    color: var(--color-text-light);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}
.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

/* =============================================== */
/* BLOG DETAIL PAGE (`blog_detail.html`)           */
/* =============================================== */
.blog-detail-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 20px; /* Ensures padding on mobile */
    box-sizing: border-box;
}
.blog-detail-header h1 {
    margin-bottom: 0.75rem;
}
.blog-detail-meta {
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    font-weight: 500;
    font-style: italic;
    font-size: 1rem;
}

/* --- Responsive Main Image Styling --- */
.blog-detail-main-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2.5rem auto; /* Use auto for horizontal centering */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.blog-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
}
.blog-detail-content p {
    margin-bottom: 1.5rem;
}
.blog-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}
.blog-detail-content .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 2.5rem 0;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.blog-detail-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Loading Animation Styling --- */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--color-secondary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}
.loading-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text-light);
}

/* Responsive adjustments for PC/Desktop */
@media (min-width: 768px) {
    /* Make the main image "break out" of the container for a more dynamic look */
    .blog-detail-main-image,
    .blog-detail-content .video-container {
        width: calc(100% + 4rem);
        margin-left: -2rem;
        margin-right: -2rem;
        max-width: none;
    }
}