/**
 * Project: Main-Website
 * Module: public/CSS/home.css
 * Author: J. Apps (JohnV2002 / Sodakiller1)
 * Version: 1.0.0
 * Description: Homepage-only styles on top of japps.css: hero, project cards, cookie banner,
 *     cookie settings overlay and the affiliate side boxes.
 * New in v1.0.0: Replaces the old style.css with the shared J. Apps look.
 * Copyright: MIT (c) 2026 J. Apps
 */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.home-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 2.5rem;
    text-align: left;
    padding-top: 3rem;
    padding-bottom: 2.6rem;
}

.home-hero__text {
    flex: 1 1 22rem;
    max-width: 34rem;
}

.home-hero h1 {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
    letter-spacing: -0.02em;
}

.home-hero .j-sub {
    margin-left: 0;
}

.home-lottie {
    flex: 0 0 auto;
    width: min(300px, 70vw);
    height: min(300px, 70vw);
}

#projects {
    scroll-margin-top: 4.5rem;
}

.home-projects-title {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
}

/* ── Project cards (scripts/projects.js) ───────────────────────────────── */
#project-list {
    display: grid;
    gap: 1.1rem;
    margin-top: 1.2rem;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.project-links .j-btn {
    min-height: 2.4rem;
    font-weight: 600;
}

.project-links .j-btn[disabled] {
    font-weight: 500;
}

.project-soon {
    font-size: 0.78em;
    font-weight: 600;
    opacity: 0.85;
}

.project-status {
    text-align: center;
    color: var(--text-muted);
    margin: 2rem 0;
}

/* ── Cookie banner (scripts/cookies.js) ───────────────────────────────── */
#consentBox {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 30rem;
    padding: 1.1rem 1.2rem;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
}

#consentBox.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#consentBox img {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
}

#consentHeader {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
}

#consentContent p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

#consentContent .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.consentButton,
.rejectButton,
.settingsButton {
    min-height: 2.4rem;
    padding: 0.45rem 0.9rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.consentButton {
    background: var(--accent);
    color: var(--accent-text);
    border: 1px solid var(--accent);
}

.rejectButton,
.settingsButton {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.rejectButton:hover,
.settingsButton:hover {
    background: var(--accent-soft);
}

#consentContent .consent-links {
    margin: 0.7rem 0 0;
    font-size: 0.82rem;
}

/* ── Cookie settings overlay (scripts/settings.js) ─────────────────────── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.55);
}

.overlay.active {
    display: flex;
}

.overlay-content {
    width: min(40rem, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.6rem 1.7rem;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.overlay-content h3 {
    font-size: 1.05rem;
    margin-top: 1.2rem;
}

.overlay-content ul {
    padding-left: 1.2rem;
}

.overlay-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

/* ── Affiliate side boxes (body.ads-enabled after consent, wide screens only) ── */
.ad-container,
.ad-container2 {
    display: none;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    width: 240px;
    padding: 1rem;
    text-align: center;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.ad-container {
    left: 1rem;
}

.ad-container2 {
    right: 1rem;
}

.ad-container img {
    display: block;
    margin: 0 auto 0.8rem;
    border-radius: var(--radius-sm);
}

@media (min-width: 1500px) {
    body.ads-enabled .ad-container,
    body.ads-enabled .ad-container2 {
        display: block;
    }
}

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .home-hero {
        text-align: center;
    }

    .home-hero .j-card-actions {
        justify-content: center;
    }

    #consentBox {
        left: 0.6rem;
        right: 0.6rem;
        bottom: 0.6rem;
        max-width: none;
    }

    #consentBox img {
        display: none;
    }
}
