/* ==========================================================
   COMPONENTS.CSS — HUB ENGINE V8 (FINAL CLEAN)
   Layout, media, cards, gallery, video
   ZERO duplicazioni — Theme-safe
========================================================== */


/* ==========================================================
   BASE CONTENT SAFETY
========================================================== */

main,
.section,
.card,
.text-block,
.mirc-popup {
    overflow-wrap: break-word;
}


/* ==========================================================
   IMAGES — universal containment + hover
========================================================== */

.section img,
.text-block img,
.card img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;

    border-radius: 10px;
    object-fit: contain;

    transition: transform .35s ease, filter .35s ease;
}

.section img:hover,
.text-block img:hover,
.card img:hover {
    transform: scale(1.05);
    filter: brightness(1.05) contrast(1.05);
}


/* ==========================================================
   FEATURE LIST
========================================================== */

.feature-list {
    padding-left: 22px;
    margin: 16px 0;
    line-height: 1.55;
}

.feature-list li {
    padding: 6px 0;
}

.feature-list.small {
    font-size: .95rem;
    opacity: .9;
}


/* ==========================================================
   SECTIONS — framed premium container
========================================================== */

.section {
    position: relative;
    padding: 26px 28px;
    margin-bottom: 28px;

    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.06),
        rgba(255,255,255,0.02)
    );

    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.04),
        0 0 28px rgba(0,0,0,0.35);

    backdrop-filter: blur(14px);
}

.section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.35);
}

.section > h2 {
    margin: -26px -28px 18px;
    padding: 16px 24px;

    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .6px;

    color: var(--accent);

    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.10),
        rgba(255,255,255,0.03)
    );

    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0;

    text-shadow:
        0 0 12px var(--glow),
        0 0 2px #000;
}

.section p,
.section ul {
    margin: 0;
    padding: 12px 14px;

    background: rgba(0,0,0,0.25);
    border-radius: 10px;

    box-shadow: inset 0 0 12px rgba(0,0,0,0.45);
}


/* ==========================================================
   HERO
========================================================== */

.hero {
    text-align: center;
}

.hero h1 {
    margin-top: 10px;
    margin-bottom: 18px;
    font-size: 2.2rem;

    text-shadow: 0 0 18px var(--glow);
}

.hero h2 {
    margin-top: 8px;
    margin-bottom: 12px;
    opacity: .9;
}

.hero p,
.hero .version {
    opacity: .75;
}


/* ==========================================================
   CARDS
========================================================== */

.card {
    padding: 22px;
    border-radius: 12px;

    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 0 10px var(--glow);

    transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 16px var(--accent);
}


/* ==========================================================
   BUTTONS
========================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 12px 18px;
    border-radius: 10px;

    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);

    cursor: pointer;
    text-decoration: none;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease,
        color .25s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 14px var(--accent);
}

.btn .ico {
    font-size: 1.3rem;
}


/* ==========================================================
   DOWNLOAD BUTTON GROUP
========================================================== */

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
}


/* ==========================================================
   GALLERY — single source of truth
========================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.gallery-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    overflow: hidden;

    transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.07);
}


/* ==========================================================
   VIDEO GRID — multiple videos
========================================================== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.video-item {
    position: relative;
    aspect-ratio: 16 / 9;

    background: #000;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;

    box-shadow: 0 0 18px var(--glow);
    transition: transform .35s ease;
}

.video-item:hover {
    transform: scale(1.03);
}

.video-item iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ==========================================================
   VIDEO BOX — single featured video
========================================================== */

.video-box {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

    aspect-ratio: 16 / 9;
    border-radius: 14px;

    overflow: hidden;
    background: #000;

    border: 1px solid var(--border);
    box-shadow: 0 0 22px var(--glow);
}

.video-box iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ==========================================================
   mIRC LOGO — absolute cap
========================================================== */

.section img.mirc-logo {
    max-height: 180px !important;
    width: auto !important;
    max-width: 180px !important;

    margin: 20px auto;
    object-fit: contain;

    transform: none !important;
    filter: none !important;
}


/* ==========================================================
   FLOATING SIGIL SIZE FIX
========================================================== */

#floating-sigil {
    width: 220px;
    height: 220px;
    opacity: .22;
}

@media (max-width: 980px) {
    #floating-sigil {
        width: 150px;
        height: 150px;
        opacity: .18;
    }
}
