/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

:root {
    --header-height: 80px;
}

/* Header and Navigation */
.site-header {
    background: transparent;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.95) 0%, rgba(57, 73, 171, 0.95) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

main {
    padding-top: 0;
    flex: 1;
}

body.home main {
    padding-top: 0;
}

nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    column-gap: 0.75rem;
}

.brand-logo {
    height: 44px;
    max-width: 64px;
    width: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

.brand-logo--first {
    height: 54px;
    max-width: 140px;
    display: none; /* Hide ahlab logo */
}

/* Hide ahlab logo everywhere */
img[src*="ahlLogo.png"] {
    display: none !important;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.logo-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    background: url("images/attendees.JPG") center 30%/cover no-repeat;
    color: #fff;
    padding: calc(6rem + var(--header-height)) 2rem 5rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.75) 0%, rgba(57, 73, 171, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero .location {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Page Header */
.page-header {
    background: url("images/attendees.JPG") center/cover no-repeat;
    color: #fff;
    padding: calc(4rem + var(--header-height)) 2rem 3rem;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.75) 0%, rgba(57, 73, 171, 0.55) 100%);
}

.page-header h1,
.page-header .subtitle {
    position: relative;
    z-index: 1;
}

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

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

/* Banner Section */
.banner {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}
/* Overview Image */
.overview-image {
    margin: 2rem 0;
}

.overview-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.banner img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Content Section */
.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.content h2 {
    color: #1a237e;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3949ab;
}

.content h2:first-child {
    margin-top: 0;
}

.content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.content ol,
.content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

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

/* Figure Placeholder */
.figure {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.figure-placeholder {
    color: #666;
}

/* Template Links */
.template-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
    margin-left: 0;
}

.template-links a {
    background: #3949ab;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.template-links a:hover {
    background: #1a237e;
}

/* Important Dates */
.important-dates {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.important-dates h3 {
    color: #1a237e;
    margin-bottom: 1rem;
}

.important-dates ul {
    list-style: none;
    margin-left: 0;
}

.important-dates li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.important-dates li:last-child {
    border-bottom: none;
}

/* References */
.references {
    font-size: 0.9rem;
    color: #666;
}

.references li {
    margin-bottom: 1rem;
}

/* Schedule Table */
.schedule table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.schedule th,
.schedule td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.schedule th {
    background: #3949ab;
    color: #fff;
}

.schedule tr:hover {
    background: #f5f5f5;
}

.schedule tr.break {
    background: #e8eaf6;
    font-style: italic;
}

.note {
    font-style: italic;
    color: #666;
    text-align: center;
    margin-top: 2rem;
}

/* Organisers Grid */
.organisers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.organiser-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.organiser-card .affiliation,
.organiser-card .bio {
    text-align: left;
}

.organiser-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.organiser-card img,
.organiser-card .organiser-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid #3949ab;
}

.organiser-card h3 {
    color: #1a237e;
    margin-bottom: 0.35rem;
}

.organiser-card .affiliation {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.organiser-card .bio {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0;
}

/* Footer */
footer {
    background: #1a237e;
    color: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

footer a {
    color: #90caf9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .brand {
        justify-content: center;
    }

    .nav-right {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        padding: 0.35rem 0.6rem;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.05rem;
    }

    .logo-sub {
        font-size: 0.8rem;
    }

    .brand-logo {
        height: 32px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .content {
        padding: 1rem;
        margin: 1rem;
    }

    .template-links {
        flex-direction: column;
    }

    .schedule th,
    .schedule td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .organisers-grid {
        grid-template-columns: 1fr;
    }
}
