/* Basic Clean Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* --- Hero Section (Kumamoto AI Lab Special) --- */
.lab-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    overflow: hidden;
    padding: 20px;
}

/* Washi Texture Overlay */
.lab-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Root path for images in future update, but relative works if css is in css/ ? No, user wants Site Folder Self Contained. */
    /* If style.css is in /ailab/css/, then ../images/bg_texture_washi.png is relative. */
    /* User said "Absolute Rule: Internal links use root relative paths e.g. /ailab/images/" */
    background-image: url('/ailab/images/bg_texture_washi.png');
    background-repeat: repeat;
    opacity: 0.1;
    pointer-events: none;
}

.lab-hero-content {
    z-index: 2;
    padding: 20px;
    max-width: 800px;
    animation: fadeIn 1.5s ease-out forwards;
}

.lab-hero h1 {
    font-size: 3.5rem;
    font-family: 'Zen Old Mincho', serif;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.lab-hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    letter-spacing: 0.15em;
    opacity: 0.9;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Disclaimer --- */
.disclaimer-section {
    background: #f0f0f0;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 1px solid #ddd;
}

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

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
}

/* --- Filter Nav --- */
.filter-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* --- Grid & Cards --- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    border-radius: 8px;
    /* Sharper items for Lab */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
}

/* Video Play Icon */
.type-video .card-thumb::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #888;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.type-video .badge {
    background: #fee;
    color: #d00;
}

.type-article .badge {
    background: #eef;
    color: #00d;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #222;
}

.card-summary {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.tag {
    font-size: 0.75rem;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 100px;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #888;
    background: #fff;
}

footer a {
    color: #333;
    transition: color 0.2s;
}

footer a:hover {
    color: #000;
}

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

    .lab-hero h1 {
        font-size: 2rem;
    }
}