/* style.css - University Laboratory Website Styling */

:root {
    --primary-color: #1d2088;    /* Kansai University Color (C100 M100) */
    --secondary-color: #333333;  /* Charcoal - Text */
    --background-color: #f8f9fa; /* Light Gray/White */
    --accent-color: #e74c3c;     /* Soft Red - Alerts/Buttons */
    --white: #ffffff;
    --border-color: #dee2e6;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

a:hover {
    opacity: 0.7;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

nav ul li a:hover {
    opacity: 0.8;
}

/* Main Content Wrapper */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 70vh;
}

/* Sections & Typography */
h1, h2, h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

section {
    margin-bottom: 3rem;
}

p {
    margin-bottom: 1rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.hero-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 2rem;
}

/* Grid Layouts (for Research, Members) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none; /* For when card is an <a> tag */
    display: block;        /* Ensure it behaves like a block */
    color: inherit;        /* Prevent link color from overriding text */
    text-align: center;    /* Center content for cards with photos */
}

.card h3 {
    color: var(--primary-color);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 1rem;
    background-color: #eee;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
    cursor: pointer;
}

/* Lists (for News, Publications) */
.list {
    padding-left: 1.5rem;
}

ul.list {
    list-style: disc;
}

ol.list {
    list-style: decimal;
}

.list li {
    margin-bottom: 0.75rem;
    padding: 0;
}

.date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: block;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Menu */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul li {
        margin: 0.5rem 0.75rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
}
