/* Header background image */
.header-background {
    width: 100%;
    height: 150px;
    margin-top: -20px;
    background-size: cover;
    background-position: center;
    position: relative;
}


/* Main header wrapper */
.header-wrapper {
    width: 800px; /* centered 60% width */
    margin: -100px auto 25px auto; /* pull upward */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    z-index: 2;
    background-color: #ffffff;
    padding: 20px 40px;
    border: 1px solid #ADADAD;
    box-shadow: 5px 5px #cccccc;
}


/* Title */
.header-title {
    margin: 0 auto;
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 600;
    width: 60%;
    text-align: center;
    font-family: 'IBM Plex Serif Italic', serif;
}


/* Meta info container (two rows) */
.header-meta {
    display: flex;
    justify-content: space-between; /* left vs right column */
    width: 50%; /* meta block width */
    margin: 0 auto;
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
    border-top: 1px solid lightgrey;
    border-bottom: 1px solid lightgrey;
    font-family: "IBM Plex Sans", sans-serif;
    color: #9E9E9E;
}


/* Left column: Author + Date */
.meta-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    padding: 15px;
    margin-left: 20px;
}


/* Right column: License + Cite This */
.meta-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    padding: 15px;
    margin-right: 20px;
}


/* Links */
.license a,
.cite-link a {
    color: #9E9E9E;
    text-decoration: none;
    font-weight: 400;
}

.license a:hover,
.cite-link a:hover {
    text-decoration: underline;
}


/* Content below header (3 columns) */
/* Main 3-column layout */
.content-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 20px;
}


/* Single sidebar */
.content-left,
.content-right {
    flex: 0 0 15%; /* fixed sidebar width */
}


/* Optional wrappers for stacked items */
.content-left-wrapper,
.content-right-wrapper {
    display: flex;
    flex-direction: column; /* stack children vertically */
    flex: 0 0 15%;          /* same width as a single sidebar */
    gap: 10px;               /* spacing between stacked items */
}


/* Items inside wrappers stack naturally */
.content-left-wrapper .content-left,
.content-right-wrapper .content-right {
    /* Remove flex:1 to avoid stretching; items take natural height */
}


/* Top / Center / Bottom alignment for sidebars (single or wrapped) */
.content-left-wrapper,
.content-right-wrapper,
.content-left,
.content-right {
    display: flex;           /* make sure container is flex */
    flex-direction: column;  /* stack children vertically */
}


/* Alignment classes */
.content-left-wrapper.top,
.content-right-wrapper.top,
.content-left.top,
.content-right.top {
    justify-content: flex-start; /* align items to top */
}


.content-left-wrapper.center,
.content-right-wrapper.center,
.content-left.center,
.content-right.center {
    justify-content: center;     /* align items to vertical center */
}


.content-left-wrapper.bottom,
.content-right-wrapper.bottom,
.content-left.bottom,
.content-right.bottom {
    justify-content: flex-end;   /* align items to bottom */
}

.explore-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 120px;
    padding: 0 20px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

/* Background image layer */
.explore-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/media/images/manila.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    z-index: 0;
    transition: transform 0.5s ease;
}

/* Dark overlay to keep text readable */
.explore-btn .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    border-radius: 12px;
    z-index: 1;
}

/* Text above everything */
.explore-btn > * {
    position: relative;
    z-index: 2;
    color: #fff;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    font-size: 2rem;
}

/* Zoom background only on hover */
.explore-btn:hover::before {
    transform: scale(1.2);  /* zoom background */
}


/* Main content */
.content-main {
    flex: 0 0 800px;
    padding: 0 40px;
}


.citation-header {
    font-size: 1rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    color: #9E9E9E;
    padding-bottom: 10px;
}


.citation-content {
    position: relative;        /* allows absolute positioning inside */
    padding: 15px 40px 15px 15px;
    background-color: #f8f9fa;
    border: 1px solid grey;
    margin-bottom: 20px;
}

.citation-content i {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}


.citation-content i:hover {
    opacity: 1;
}


.content-main .h1 {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: "IBM Plex Sans", sans-serif;
    color: #333333;
    margin-bottom: 15px;
}

.content-main .h2 {
    display: inline; /* so background only covers text */
    font-family: "IBM Plex Serif Medium", serif;
    font-weight: 500;
    font-size: 1.3rem;
    color: #2f3a56;
    background: linear-gradient(120deg, #fff3b0 0%, #fff3b0 100%) bottom;
    background-repeat: no-repeat;
    background-size: 100% 0.35em; /* thickness of highlight */
    text-indent: 1.5em;
}

.content-main .h3 {
    font-size: 1.1rem; /* slightly smaller than h2 */
    font-weight: 600;
    font-family: "IBM Plex Sans", sans-serif;
    color: grey;
    margin-bottom: 10px;
    text-transform: none; /* keep normal case */
}

.content-main .h4 {
    font-size: 1rem;
    font-family: "IBM Plex Sans", sans-serif; /* sans-serif */
    font-weight: 700;
    color: grey;
    text-transform: uppercase; /* uppercase as requested */
    letter-spacing: 0.5px; /* optional, improves readability for uppercase */
    margin-bottom: 8px;
}

p {
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    color: #222;
    text-align: justify;
}

.content-left p,
.content-right p {
    background-color: #ffffd8;
    padding: 8px 16px;
    font-size: 0.9rem;
    text-align: left;
}

/* Switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 16px;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.2s;
  border-radius: 22px;
}

/* Circle */
.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

/* Checked state */
.switch input:checked + .slider {
  background-color: #28a745; /* green */
}

.switch input:checked + .slider:before {
  transform: translateX(16px);
}
