/* Background image */
body {
    background: url('/static/images/tile.png') repeat;
    background-size: auto;
    position: relative;
}

/* Background overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7); /* 70% light overlay */
    backdrop-filter: blur(0px);
    z-index: -1;
    pointer-events: none;
}

.titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e0e7ff;
  padding: 5px 10px;
  border-bottom: 2px solid #cbd5e1;
  font-family: Arial, sans-serif;
}

.titlebar-left {
  display: flex;
  align-items: center;
}

.title-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.title-text {
  font-size: 14px;
  font-weight: bold;
  color: #1f2937;
}

.titlebar-right {
  display: flex;
  gap: 5px;
}

.title-btn {
  background-color: #f1f5f9;
  border: none;
  padding: 2px 8px;
  font-size: 14px;
  cursor: pointer;
  color: #1f2937;
  border-radius: 4px;
}

.title-btn:hover {
  background-color: #cbd5e1;
  color: #ef4444;
}

.container {
  display: flex;
  height: 100vh;
}

.sidebar-button img {
    width: 20px;
    height: 20px;
    margin-right: 10px; /* spacing for expanded mode */
}

/* Hide labels when collapsed */
.sidebar.collapsed .sidebar-label {
    display: none;
}

/* Align icons with hamburger (left-aligned) */
.sidebar.collapsed .sidebar-button {
    justify-content: flex-start;
}

/* Remove icon spacing when collapsed */
.sidebar.collapsed .sidebar-button img {
    margin-right: 0;
}

.content {
  flex-grow: 1;
  padding: 20px;
}

/* Container spacing */
.home-container {
    padding: 0 20px;
}

.home-header-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 28px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);

    /* Match spotlight card */
    max-width: 1200px;
    margin: 0 auto 25px;
    width: 100%;
    box-sizing: border-box;
}

.home-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.home-subtitle {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.home-container {
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.home-card img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

/* Spotlight matches header card width */
.spotlight-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 28px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin: 0 0 25px 0; /* remove auto-centering */
    width: 100%;
    max-width: none;   /* remove width cap */
    box-sizing: border-box;
}

.spotlight-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.spotlight-term {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.spotlight-definition {
    font-size: 15px;
    color: #444;
    line-height: 1.4;
}

.spotlight-wrapper {
    margin-bottom: 25px;
}

@media (max-width: 600px) {

    /* Make sidebar narrower on mobile */
    .sidebar {
        width: 200px;
    }

    /* Collapsed width stays the same */
    .sidebar.collapsed {
        width: 50px;
    }

    /* Reduce padding so items don’t feel oversized */
    .sidebar-button {
        padding: 6px;
        font-size: 13px;
    }

    /* Hamburger stays left-aligned but with tighter spacing */
    .hamburger {
        padding: 8px;
        font-size: 18px;
        justify-content: flex-start;
    }

    /* Icons scale slightly for mobile */
    .sidebar-button img {
        width: 18px;
        height: 18px;
    }
}

/* Title */
.nav-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
    flex-grow: 1;
}

/* Right-side buttons */
.nav-right {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: #f1f5f9;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.nav-btn:hover {
    background: #e2e8f0;
}

/* MOBILE BEHAVIOUR */
@media (max-width: 600px) {

    .navbar {
        padding: 10px 14px;
    }

    .nav-title {
        font-size: 18px;
    }

    .nav-right {
        display: none; /* hide right buttons on mobile */
    }

    .nav-hamburger {
        font-size: 22px;
        padding: 4px 8px;
    }
}

/* Logo */
.nav-logo img {
    height: 100px;
    display: block;
    margin: 0 auto;
}

/* Full-width background bar */
.navbar-outer {
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 10px 0;
    position: relative;
    z-index: 10;
}

/* Centered card-style content */
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hamburger */
.nav-hamburger {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 6px 10px;
}

/* Right-side buttons */
.nav-right {
    display: flex;
    gap: 10px;
}

/* Mobile */
@media (max-width: 600px) {
    .nav-right {
        display: none;
    }

    .nav-logo img {
        height: 36px;
    }
}

/* Dropdown menu positioned under hamburger */
.hamburger-wrapper {
    position: relative; /* anchor point */
}

.dropdown-menu {
    position: absolute;
    top: 100%; /* directly below hamburger */
    left: 0;   /* aligned to hamburger wrapper */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px;
    width: 220px;
    display: none;
    z-index: 50;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
}

.dropdown-item img {
    width: 22px;
    height: 22px;
    margin-right: 10px;
}

.dropdown-item:hover {
    background: rgba(0,0,0,0.05);
}

.two-column-row {
    display: flex;
    gap: 20px;
    margin: 25px 0;
}

.half-card {
    flex: 1;
}

.home-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 28px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.view-button {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.8);
    color: #1f2937;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.view-button:hover {
    background: rgba(255,255,255,0.8);
    transform: translateY(-2px);
}