/* Shared layout for the simpler pages (Parents, Arrrmor, Press, Wallpapers,
   Lobbies, error pages): a page header like the other pages' and content
   in cards. The header comes from templates/new_site/page_hero.html. */

.page-hero {
    position: relative;
    /* content.css makes every header a full screen high. */
    height: auto;
    min-height: 60vh;
    padding: 190px 2rem 9rem;
    background:
        linear-gradient(180deg,
            rgba(15, 20, 35, 0.65) 0%,
            rgba(26, 26, 46, 0.88) 60%,
            rgba(26, 26, 46, 1) 100%),
        var(--hero-cover, none);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 88%, 90% 92%, 80% 88%, 70% 94%, 60% 90%, 50% 96%, 40% 92%, 30% 88%, 20% 92%, 10% 88%,
        0% 84%
    );
}

/* Error pages are just the header. */
.page-hero.tall {
    min-height: 90vh;
}

.page-hero .page-actions {
    justify-content: center;
    margin-top: 2.5rem;
}

.page-hero h1 {
    font-family: 'Caribbean', cursive;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--bright-gold);
    text-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(255, 215, 0, 0.6);
    letter-spacing: clamp(2px, 1vw, 4px);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.page-hero p {
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    max-width: 850px;
    line-height: 1.6;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

.page-body {
    position: relative;
    max-width: 1100px;
    margin: -2rem auto 0;
    padding: 0 2rem 5rem;
}

.page-body.wide {
    max-width: 1400px;
}

.page-card {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 2.5rem 3rem;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(212, 175, 55, 0.1);
    margin-bottom: 2rem;
}

.page-card h2 {
    font-family: 'Caribbean', cursive;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    color: var(--pirate-gold);
    text-shadow:
        3px 3px 6px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(212, 175, 55, 0.5);
    letter-spacing: 1px;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.page-card p,
.page-card li {
    font-size: clamp(1.05rem, 1.3vw, 1.15rem);
    line-height: 1.65;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.page-card p + p,
.page-card p + ul,
.page-card ul + p {
    margin-top: 1rem;
}

.page-card ul {
    padding-left: 1.4rem;
}

.page-card li + li {
    margin-top: 0.5rem;
}

.page-card li::marker {
    color: var(--pirate-gold);
}

.page-card .lead {
    font-size: clamp(1.15rem, 1.6vw, 1.35rem);
}

/* A card with a picture beside its text; .flip puts the picture on the right. */
.page-feature {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: center;
}

.page-feature.flip {
    grid-template-columns: 1fr 220px;
}

.page-feature > div {
    min-width: 0;
}

.page-feature.flip > img {
    order: 2;
}

.page-feature > img {
    width: 100%;
    max-width: 220px;
    height: auto;
    justify-self: center;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
}

.page-feature.framed > img {
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
}

/* Pill buttons in the style of the About page's. */
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    border: 2px solid var(--sea-green);
    background: linear-gradient(135deg, var(--sea-green) 0%, #3cb371 100%);
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-btn.secondary {
    border-color: var(--bronze);
    background: linear-gradient(135deg, var(--bronze) 0%, #daa520 100%);
}

.page-btn:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.page-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-top: 1.5rem;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    overflow: hidden;
}

.page-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Wallpapers */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.page-card.wallpaper-card {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.wallpaper-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 300 / 187;
    object-fit: cover;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.wallpaper-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
}

.wallpaper-sizes a {
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    text-decoration: none;
}

.wallpaper-sizes a:hover {
    border-color: var(--bright-gold);
    background: rgba(212, 175, 55, 0.15);
}

/* Tables (Lobbies) */
.page-table-wrap {
    overflow-x: auto;
}

.page-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.05rem;
}

.page-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    color: var(--pirate-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4);
}

.page-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.page-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.06);
}

.page-note {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ: question list beside the answers, kept in view while scrolling. */
.faq-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.faq-layout > * {
    min-width: 0;
}

.faq-index a,
.faq-item h2,
.faq-answer {
    overflow-wrap: anywhere;
}

.faq-index {
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding: 1.75rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) transparent;
}

.faq-index ul {
    list-style: none;
    padding: 0;
}

.faq-index li + li {
    margin-top: 0;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.faq-index a {
    display: block;
    padding: 0.55rem 0.25rem;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.faq-index a:hover {
    color: var(--bright-gold);
}

.faq-item {
    scroll-margin-top: 140px;
}

.faq-item h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

.faq-answer p + p {
    margin-top: 1rem;
}

.faq-contact > img {
    max-width: 160px;
}

@media (max-width: 1024px) {
    .faq-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .faq-index {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .page-hero {
        min-height: 0;
        padding: 140px 1rem 4rem;
    }

    .page-body {
        margin-top: -1rem;
        padding: 0 1rem 3rem;
    }

    .page-card {
        padding: 1.75rem 1.25rem;
        margin-bottom: 1.25rem;
    }

    .page-feature,
    .page-feature.flip {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-feature > img,
    .page-feature.flip > img {
        order: 0;
        max-width: 150px;
    }

    .page-feature.framed > img {
        max-width: 260px;
    }

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

    .page-table {
        font-size: 0.95rem;
    }

    .page-table th,
    .page-table td {
        padding: 0.6rem 0.4rem;
    }
}
