/* Bertrand Guenin Master CSS - Final Combined Version */

:root {
    --uw-gold: #FFD54F;
    --white: #ffffff;
    --hero-shade: #f0f0f0; 
    --text-main: #333;
    --link-blue: #0056b3;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.95rem;
    background-color: #d1d1d1;
    display: flex;
    justify-content: center;
    padding: 0px 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 0px;
}

header {
    height: 200px;
    display: flex;
    align-items: center;
    padding: 0 60px;
    position: relative;
    background-color: var(--hero-shade);
    background-image: radial-gradient(#d1d1d1 1px, transparent 1px);
    background-size: 20px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-content { z-index: 2; }
h1 { margin: 0; font-size: 2.2rem; color: var(--text-main); font-weight: 600; }
.title { color: #666; margin: 6px 0 0; font-size: 1.1rem; }

.logo {
    position: absolute;
    top: 40px; right: 40px; height: 75px; z-index: 3;
}

nav {
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 12px 0;
    background: white;
}

nav a { 
    text-decoration: none; 
    color: #777; 
    font-size: 0.85rem; 
    font-weight: 500; 
    transition: 0.2s;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
}
nav a:hover { color: #000; border-bottom: 2px solid #eee; }
nav a.active { color: #000; font-weight: 700; border-bottom: 2px solid var(--uw-gold); }

.content-block { padding: 40px 80px 0 80px; }


/* --- TEACHING SPECIFIC STYLES --- */
.info-box {
    line-height: 1.7;
    color: #444;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--uw-gold);
    margin-bottom: 30px;
}
.info-box a { color: var(--link-blue); text-decoration: none; font-weight: 500; }
.info-box a:hover { text-decoration: underline; }

.course-list { list-style: none; padding: 0; margin: 0; }
.course-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}
.course-list li:last-child { border-bottom: none; }

/* --- STUDENT SPECIFIC STYLES --- */
.student-list { list-style: none; padding: 0; margin: 0; }
.student-list li { 
    padding: 10px 0; 
    border-bottom: 1px solid #f0f0f0; 
    color: #555; 
    display: flex; 
    justify-content: space-between;
    align-items: center;
}
.student-list li a { color: var(--link-blue); text-decoration: none; font-weight: 600; }
.student-meta { color: #888; font-size: 0.9rem; font-style: italic; text-align: right; }

/* --- PAPERS SPECIFIC STYLES --- */
.note { font-size: 0.9rem; color: #777; font-style: italic; margin-bottom: 30px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.paper-entry { margin-bottom: 12px; padding: 12px 18px; line-height: 1.6; background-color: #fffdf2; border-left: 4px solid var(--uw-gold); border-radius: 0 4px 4px 0; }
.paper-authors { color: #555; display: block; font-size: 0.95rem; }
.paper-title { font-weight: 600; color: #222; display: block; font-size: 0.95rem; margin: 2px 0; }
.paper-venue { color: #666; font-size: 0.9rem; display: block; }
.paper-venue a { color: var(--link-blue); text-decoration: none; word-break: break-all; }

/* --- BOOKS PAGE STYLES --- */
.book-entry { display: flex; gap: 40px; margin-bottom: 20px; align-items: flex-start; }
.book-cover { flex: 0 0 220px; }
.book-cover img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.status-badge { background: #fff8e1; color: #856404; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; border: 1px solid #ffeeba; white-space: nowrap; }

/* --- ADMIN STYLES --- */
.admin-item { margin-bottom: 20px; display: flex; gap: 20px; }
.admin-date { font-weight: 600; color: #666; min-width: 180px; font-size: 0.9rem; }

/* --- COMMON ELEMENTS --- */
h2 { 
    font-size: 1.2rem;
    margin: 30px 0 15px 0; 
    color: #222;
    border-bottom: 2px solid var(--uw-gold); 
    display: inline-block;
    font-weight: 500;
}
.description { line-height: 1.7; color: #444; background: #f9f9f9; padding: 20px; border-radius: 6px; font-size: 0.95rem; }

footer {
    padding: 40px 80px;
    text-align: center;
    background: white;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #f9f9f9;
}

@media (max-width: 850px) {
    .content-block { padding: 30px 20px; }
    header { height: auto; padding: 80px 20px 40px; text-align: center; }
    .logo { top: 20px; right: 50%; transform: translateX(50%); height: 55px; position: absolute; }
    .book-entry { flex-direction: column-reverse; align-items: center; text-align: center; }
    .admin-item { flex-direction: column; gap: 5px; }
    .student-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
    .student-meta { text-align: left; }
}
/* Remove extra margin from the last item in the content area */
.content-block > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 20px; /* Optional: adds just a small, clean gap */
}
hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0; /* This controls the gap between books */
}
/* Removes extra space after the list on the students page */
.student-list {
    margin-bottom: 0;
}
/* 1. Remove the bottom padding from the main content area */
.content-block { 
    padding-bottom: 0px !important; 
}

/* 2. Remove the margin from the very last paragraph inside the content */
.content-block p:last-child {
    margin-bottom: 0px !important;
}

/* 3. Reduce top padding of the footer itself if needed */
footer {
    padding-top: 20px !important; /* Adjust this number to get the perfect gap */
}
.book-entry {
    display: flex;
    align-items: stretch;
}

.book-cover {
    display: flex;
    align-items: flex-start;
}
