﻿/* ================================
   THEME BASE
==================================*/
:root {
    --bg: #0a0a0a;
    --bg-soft: #111;
    --text: #e7e7e7;
    --muted: #b9b9b9;
    /* Accento sensuale */
    --accent: #b2557a;
    --accent-deep: #6e2a44;
    --radius: 10px; /* curve leggere, non troppo tonde */
    --ring: 0 0 0 2px rgba(178,85,122,.35);
    --shadow: 0 10px 30px rgba(0,0,0,.45);
    /* Font stack */
    --ui-font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --display-font: "Macondo", cursive;
    
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-family: var(--ui-font);
}

.container {
    width: min(1100px,92%);
    margin: 0 auto;
}

main {
    min-height: 60vh;
}

:focus {
    outline: none;
    box-shadow: var(--ring);
}

::selection {
    background: color-mix(in srgb, var(--accent) 85%, white 15%);
    color: #fff;
}

/* ================================
   HEADER / NAV
==================================*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10,10,10,.82);
    backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid #181818;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand {
    font-family: var(--display-font);
    letter-spacing: .3px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.6rem;
}

.nav nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
}

    .nav a:hover {
        color: var(--text);
    }

.nav .btn {
    margin-left: 8px;
}

.nav-toggle {
    display: none;
}

.nav-burger {
    display: none;
    cursor: pointer;
    font-size: 1.6rem;
}

@media (max-width: 780px) {
    .nav nav {
        position: fixed;
        inset: 60px 0 auto 0;
        background: var(--bg);
        border-top: 1px solid #181818;
        display: none;
        flex-direction: column;
        padding: 14px;
    }

    .nav-burger {
        display: block;
    }

    .nav-toggle:checked ~ nav {
        display: flex;
    }
}

/* ================================
   FOOTER
==================================*/
.site-footer {
    border-top: 1px solid #181818;
    padding: 30px 0;
    color: #9a9a9a;
}

/* ================================
   BUTTONS
==================================*/
.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: #151515;
    color: var(--text);
    text-decoration: none;
    border: 1px solid #2a2a2a;
    transition: transform .18s ease, border-color .18s ease, filter .18s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--display-font);
}

    .btn:hover {
        transform: translateY(-1px);
        border-color: #3a3a3a;
    }

    .btn::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.08) 50%, transparent 100%);
        opacity: 0;
        transition: opacity .25s ease;
    }

    .btn:hover::after {
        opacity: 1;
    }

.btn-red {
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    border-color: transparent;
    color: #fff;
}

    .btn-red:hover {
        filter: brightness(1.06);
    }

/* ================================
   HERO (con supporto <img.hero-bg>)
==================================*/
.hero {
    position: relative;
    min-height: 86vh;
    display: grid;
    place-items: center;
    text-align: center;
    background-size: cover; /* compatibile con versione background-image inline */
    background-position: center 35%;
}

    .hero .hero-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 30%;
        filter: brightness(.75);
    }

    .hero .overlay {
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at center, rgba(0,0,0,.18), rgba(0,0,0,.78));
    }

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin: 0 0 10px;
    font-family: var(--display-font);
    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 400;
}

.hero p {
    color: #d1d1d1;
    margin: 0 0 22px;
    font-size: 1.125rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width:640px) {
    .hero {
        min-height: 92vh;
        background-position: center top;
    }

        .hero .hero-bg {
            object-position: center 20%;
        }

    .hero-content {
        padding: 0 14px;
    }

    .hero h1 {
        line-height: 1.1;
    }
}

/* ================================
   SECTION / HEADINGS
==================================*/
.section {
    padding: 56px 0;
}

    .section h2 {
        margin: 0 0 18px;
        font-family: var(--display-font);
        font-size: clamp(2rem,3.5vw,2.4rem);
        font-weight: 400;
        color: #b2557a;
    }

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

    .reveal.in {
        opacity: 1;
        transform: none;
    }

/* ================================
   GALLERY + LIGHTBOX
==================================*/
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
    gap: 14px;
}

.gallery-item {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #1e1e1e;
}

    .gallery-item img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
        object-fit: cover;
        filter: saturate(96%);
        transition: transform .3s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.04);
    }

@media (max-width:520px) {
    .gallery-item img {
        aspect-ratio: 1/1;
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    .lightbox:target {
        display: flex;
    }

    .lightbox img {
        max-width: 100vw;
        max-height: 84vh;
        border-radius: 12px;
        border: 1px solid #2a2a2a;
        box-shadow: 0 20px 60px rgba(0,0,0,.6);
    }

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 34px;
    color: #fff;
    text-decoration: none;
}

/* ================================
   SHOP CARDS
==================================*/
.shop-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 18px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-soft);
    border: 1px solid #1b1b1b;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px rgba(0,0,0,.35);
    }

.card-media {
    height: 180px;
    background: radial-gradient(120px 60px at 20% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent), linear-gradient(180deg,#151515,#0f0f0f);
}

    .card-media.media-video {
        background: radial-gradient(120px 60px at 20% 20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent), linear-gradient(180deg,#101010,#0c0c0c);
    }

.card .tag {
    position: absolute;
    margin: 10px;
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 6px 10px;
    font-size: .75rem;
    border-radius: 999px;
}

.card-body {
    padding: 16px;
}

.card h3 {
    margin: 4px 0 6px;
    font-family: var(--display-font);
    font-weight: 400;
}

.card p {
    color: #bfbfbf;
    margin: 0 0 12px;
}

/* ================================
   VIDEO CARDS (placeholder)
==================================*/
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 16px;
}

.video-card {
    background: var(--bg-soft);
    border: 1px solid #1b1b1b;
    border-radius: 16px;
    padding: 14px;
}

    .video-card .thumb {
        height: 140px;
        border-radius: 12px;
        background: linear-gradient(180deg,#161616,#0e0e0e), radial-gradient(90px 40px at 40% 30%, color-mix(in srgb, var(--accent) 30%, transparent), transparent);
    }

    .video-card h3 {
        margin: 12px 0 6px;
        font-family: var(--display-font);
        font-weight: 400;
    }

    .video-card p {
        margin: 0 0 12px;
        color: #bfbfbf;
    }

/* ================================
   LIST / FORMS
==================================*/
.list {
    padding-left: 18px;
}

    .list li {
        margin: 8px 0;
    }

.input,
input[type="text"], input[type="password"], input[type="email"], textarea {
    border-radius: var(--radius);
    background: #0f0f0f;
    color: #eee;
    border: 1px solid #262626;
    padding: 10px 12px;
}

    .input:focus, input:focus, textarea:focus {
        border-color: var(--accent);
        box-shadow: var(--ring);
    }

/* ================================
   ADMIN LAYOUT
==================================*/
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding: 18px;
    border-right: 1px solid #181818;
    background: linear-gradient(180deg,#0d0d0d,#0a0a0a);
}

.admin-content {
    padding: 24px;
    min-width: 0;
    
}

.admin-auth {
    min-height: 100vh;
}
/* usata per le pagine di login */

.admin-brand .brand {
    font-family: var(--display-font);
    font-size: 1.4rem;
    color: #fff;
    text-decoration: none;
}

.admin-brand small {
    display: block;
    color: #9a9a9a;
    margin-top: 4px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0;
}

    .admin-nav a {
        display: block;
        padding: 10px 12px;
        border: 1px solid #1f1f1f;
        border-radius: 12px;
        text-decoration: none;
        color: #ddd;
        background: #b2557a;
        transition: .15s;
    }

        .admin-nav a:hover {
            border-color: #2a2a2a;
            transform: translateX(2px);
        }

.admin-logout {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

    .admin-logout:hover {
        filter: brightness(1.05);
    }

.admin-spacer {
    flex: 1;
    height: 100%;
}

@media (max-width:1024px) {
    .admin-layout {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width:760px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #181818;
    }
}


/* Lightbox moderno (sopra header) */
.lb {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000; /* > header */
}

    .lb.hidden {
        display: none;
    }

.lb-img {
    max-width: min(92vw, 1400px);
    max-height: 84vh;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: rgba(20,20,20,.8);
    color: #fff;
    border: 1px solid #333;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: filter .15s ease;
}

.lb-close {
    top: 20px;
    right: 20px;
}

.lb-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.lb-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

    .lb-close:hover, .lb-prev:hover, .lb-next:hover {
        filter: brightness(1.15);
    }

/* Bottoni griglia come <button> */
.gallery-item {
    appearance: none;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #1e1e1e;
}


/* Self-hosted Macondo font */
@font-face {
    font-family: "Macondo";
    src: url("../fonts/macondo/Macondo-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


body {
    font-family: var(--ui-font);
}

h1, h2, h3, .brand, .btn {
    font-family: var(--display-font);
}


/* ==== Tema viola SOLO per Home ==== */
.home-purple {
    --accent: #7c3aed; /* viola */
    --accent-deep: #4c1d95; /* viola profondo */
    --home-viola: #c4b5fd; /* testo viola tenue */
}

    /* Testi Home in viola elegante */
    .home-purple h1,
    .home-purple h2,
    .home-purple .hero p,
    .home-purple .section p,
    .home-purple .k-note {
        color: var(--home-viola);
    }

    /* Bottoni viola (CTA e normali) */
    .home-purple .btn {
        border-color: transparent;
        background: linear-gradient(180deg, var(--accent), var(--accent-deep));
        color: #fff;
    }

        .home-purple .btn:hover {
            filter: brightness(1.07);
        }

    /* Pill “yes” in palette viola */
    .home-purple .pill--yes {
        border-color: color-mix(in srgb, var(--accent) 55%, #2a2a2a);
        background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 35%, #151515), #0f0f0f);
        color: #eae7ff;
    }

    /* Hero overlay leggermente più morbida per far risaltare il viola */
    .home-purple .hero .overlay {
        background: radial-gradient(ellipse at center, rgba(0,0,0,.15), rgba(0,0,0,.72));
    }

    /* Link in hover verso il viola */
    .home-purple a:hover {
        color: var(--home-viola);
    }


/* griglia più ariosa */
.don-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* card più grandi */
.don-card {
    width: 100%;
    max-width: 320px; /* prima 200–240: ora più grande */
    padding: 0;
    background: #111;
    border-radius: var(--radius);
    border: 1px solid #1b1b1b;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
}

/* immagine più alta */
.don-card-img {
    height: 190px;
}

    .don-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 40%;
        display: block;
    }

/* testo e bottoni un filo più grandi */
.don-card-body {
    padding: 16px 16px 18px;
}

    .don-card-body h3 {
        margin: 0 0 8px;
        font-family: var(--display-font);
        font-weight: 400;
        font-size: 1.15rem;
        color: var(--accent);
    }

    .don-card-body p {
        color: #c9c9c9;
        margin: 0 0 12px;
        font-size: 1rem;
        line-height: 1.55;
    }

.don-card .btn {
    padding: 12px 14px;
    font-size: 1rem;
}

    .don-card .btn + .btn {
        margin-top: 10px;
    }

/* — Mobile largo (≤ 540px): ancora più grande e una per riga — */
@media (max-width: 540px) {
    .don-grid {
        grid-template-columns: 1fr; /* una per riga */
        gap: 22px;
    }

    .don-card {
        max-width: 360px; /* allarga la card */
    }

    .don-card-img {
        height: 210px;
    }

    .don-card-body h3 {
        font-size: 1.2rem;
    }

    .don-card-body p {
        font-size: 1.02rem;
    }

    .don-card .btn {
        padding: 13px 16px;
        font-size: 1.02rem;
    }
}

/* — Ultra narrow (≤ 360px): evita overflow mantenendo grandezza decente — */
@media (max-width: 360px) {
    .don-card {
        max-width: 100%;
    }

    .don-card-img {
        height: 190px;
    }
}
