@font-face {
  font-family: 'TF2 Secondary';
  src: url(../fonts/tf2secondary.ttf);
}

body {
    font-family: 'TF2 Secondary';
    margin: 0;
    padding: 0;
    background: linear-gradient(8deg, #bd3b3b 50%, #395c78 50%);
    color: #3C3F41;

    /* sticky footer: body is at least one screen tall and the footer takes
       whatever space is left over, so short pages don't leave it floating */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body > footer {
    margin-top: auto;
}

/* accessibility font toggle (see js/accessibilityfont.js) */
html.a11y-font body {
    font-family: 'Montserrat', sans-serif !important;
}

/* Webkit (Chrome, Safari, Opera) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #242424;
}

::-webkit-scrollbar-thumb:hover {
  background: #242424;
}

/* Links */
a:link,
a:visited,
a:hover,
a:active {
  color: blue;
}

header {
    background-color: #201c20;
    color: #F5C0A9;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 5px solid #f3b313;
}

header h1 {
    margin: 0;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: #F5C0A9;
    text-decoration: none;
}

section {
    padding: 2rem;
    max-width: 800px;
    /* body is a flex column now, so auto margins no longer stretch the box:
       give it an explicit width (same as the old block behaviour) */
    width: calc(100% - 4rem);
    /* flex items don't collapse margins, so use half-margins to keep the
       same 1rem gap between sections */
    margin: 0.5rem auto;
    background-color: #F5C0A9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #603B33;
}

section h2 {
    margin-top: 0;
}

body > header + section {
    margin-top: 1rem;
}

body > section:last-of-type {
    margin-bottom: 1rem;
}

.profile-container {
    display: flex;
    align-items: center;
}

.profile-picture {
    margin-right: 1.5rem;
}

.profile-picture img {
    border-radius: 5%;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* === CAROUSEL SLIDE (image only) === */
.slide {
    min-width: 100%;
    flex-shrink: 0;
}

.slide a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Generic icon styling */
.icon-email:before,
.icon-twitter:before,
.icon-gamebanana:before,
.icon-homsar:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.icon {
    width: 32px;
    height: 32px;
    margin-right: 5px;
    vertical-align: middle;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #201c20;
    color: #F5C0A9;
    border-top: 5px solid #f3b313;
    width: 100%;
}

/* Accessibility button */
#accessibility-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #242424;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#accessibility-button img {
    width: 40px;
    height: 40px;
}


/* === CAROUSEL LAYOUT === */

/* Outer wrapper — no overflow hidden here */
.carousel-outer {
    position: relative;
    max-width: 800px;
    margin: auto;
}

/* Viewport: clips only the sliding images, buttons sit inside this */
.carousel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

/* Sliding track */
.carousel {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

/* Nav buttons — perfectly centered over the image, never touching text */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(20, 16, 20, 0.72);
    color: #f3b313;
    border: 2px solid #f3b313;
    cursor: pointer;
    padding: 8px 13px;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 5px;
    z-index: 10;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Info panel below the image — text lives here, never clipped */
.carousel-info {
    padding: 14px 6px 6px;
    text-align: center;
}

.carousel-info h3 {
    margin: 10px 0 7px;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #201c20;
    text-wrap: balance;       /* fancy balanced line-breaks */
    overflow-wrap: break-word;
}

.carousel-info p {
    margin: 0 0 10px;
    font-size: 1.4rem;
    line-height: 1.45;
    color: #3C3F41;
    text-wrap: pretty;        /* avoids orphaned last words */
    overflow-wrap: break-word;
}

/* "View Mod →" link */
.carousel-link-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 18px;
    background-color: #201c20;
    color: #F5C0A9 !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.1rem;
}

/* 16:9 image wrapper */
.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000000;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 5px;
}


/* === MOD PAGES (mod.html) === */
#mod-page {
    font-size: 1.2rem;
}

#mod-page .mod-title {
    font-size: 2.2rem;
    margin-bottom: 4px;
    text-wrap: balance;
    overflow-wrap: break-word;
}

#mod-page h3 {
    margin: 22px 0 6px;
    font-size: 1.6rem;
}

#mod-page .mod-desc {
    font-size: 1.4rem;
    line-height: 1.45;
    text-wrap: pretty;
}

#mod-page p {
    line-height: 1.5;
}

#mod-page .mod-tagline {
    font-size: 1.2rem;
    font-style: italic;
    margin: 0 0 12px;
    text-wrap: pretty;
}

.mod-meta {
    margin: 0 0 12px;
}

.mod-game,
.mod-tag {
    display: inline-block;
    margin: 0 6px 4px 0;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.95rem;
    background-color: #201c20;
    color: #F5C0A9;
}

.mod-tag {
    background-color: transparent;
    color: #201c20;
    border: 1px solid #603B33;
}

.mod-buttons .carousel-link-btn {
    margin: 4px 8px 4px 0;
}

.mod-shots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.mod-shots figure {
    margin: 0;
}

.mod-shots img {
    width: 100%;
    border-radius: 5px;
    background: #000;
    display: block;
}

.mod-shots figcaption {
    font-size: 0.95rem;
    margin-top: 4px;
}

.mod-versions {
    padding-left: 1.2rem;
}

.mod-versions li {
    margin-bottom: 10px;
}

.mod-pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid #603B33;
    font-size: 1.05rem;
}

.mod-pager a:last-child {
    text-align: right;
}

.carousel-info .carousel-link-btn + .carousel-link-btn {
    margin-left: 8px;
}
