/* ============================================================
   ★ HOMEPAGE RESTYLE 2.0 — Quayat
   Da incollare alla FINE del blocco CSS esistente nella homepage
   (subito prima della sua chiusura). Solo CSS: non tocca HTML,
   PHP né la logica di login.
   Rollback: elimina questo blocco e torna tutto com'era.
   ============================================================ */

/* ---------- 1) SFONDO PAGINA: aurora animata ---------- */
body {
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(640px circle at 12% 18%, rgba(0, 168, 132, 0.14), transparent 60%),
        radial-gradient(520px circle at 88% 82%, rgba(0, 143, 112, 0.12), transparent 60%),
        radial-gradient(420px circle at 72% 12%, rgba(38, 132, 255, 0.08), transparent 60%);
    animation: qyAurora 18s ease-in-out infinite alternate;
}
@keyframes qyAurora {
    0%   { transform: translate(0, 0) scale(1);           opacity: .85; }
    50%  { transform: translate(34px, -22px) scale(1.06); opacity: 1; }
    100% { transform: translate(-26px, 16px) scale(1);    opacity: .8; }
}
@keyframes qyFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
.homepage-container {
    position: relative;
    z-index: 1;
    background: transparent;   /* lascia vedere l'aurora dietro */
}

/* ---------- 2) HERO (colonna sinistra, desktop) ---------- */
/* I glow radiali stanno DENTRO lo sfondo della sezione:
   dietro a body c'è l'aurora, ma le colonne sono opache →
   senza questi gradienti l'effetto non si vedrebbe mai. */
.hero-section {
    background-position: right;
}
.hero-content {
    animation: qyFadeUp .7s ease both;
}
.hero-title {
    background: linear-gradient(92deg, #e9edef 10%, #00d3a0 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: #fff;
  color: #e9edef;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero-features li {
    background: rgba(42, 57, 66, .45);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 10px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
    animation: qyFadeUp .5s ease both;
}
.hero-features li:nth-child(1) { animation-delay: .10s; }
.hero-features li:nth-child(2) { animation-delay: .15s; }
.hero-features li:nth-child(3) { animation-delay: .20s; }
.hero-features li:nth-child(4) { animation-delay: .25s; }
.hero-features li:nth-child(5) { animation-delay: .30s; }
.hero-features li:nth-child(6) { animation-delay: .35s; }
.hero-features li:nth-child(7) { animation-delay: .40s; }
.hero-features li:nth-child(8) { animation-delay: .45s; }
.hero-features li:hover {
    background: rgba(0, 168, 132, .12);
    border-color: rgba(0, 168, 132, .35);
    transform: translateX(6px);
}
.hero-features li i {
    color: #00d3a0 !important;   /* vince anche sugli style="" inline */
    text-shadow: 0 0 12px rgba(0, 211, 160, .45);
}
.hero-badges .badge {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .25s ease, border-color .25s ease;
}
.hero-badges .badge:hover {
    background: rgba(0, 168, 132, .15);
    border-color: rgba(0, 168, 132, .40);
}

/* ---------- 3) LOGIN: vetro + luce ---------- */
.login-section {
    background-image:
        radial-gradient(520px circle at 80% 12%, rgba(0, 211, 160, .15), transparent 65%),
        radial-gradient(460px circle at 12% 90%, rgba(38, 132, 255, .10), transparent 65%),
        linear-gradient(180deg, rgba(10,12,15,.45) 0%, rgba(10,12,15,.78) 100%),
        url("/assets/bckg1_chat.webp");
    background-size: cover;
    background-position: center;
}
.login-card {
    position: relative;
    background: rgba(31, 44, 51, .82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(0, 168, 132, .07);
    overflow: hidden;
    animation: qyCardIn .6s ease both;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 28px; right: 28px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #00d3a0, transparent);
    opacity: .8;
}
@keyframes qyCardIn {
    from { opacity: 0; transform: translateY(26px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.mobile-logo img,
.hero-logo img {
    filter: drop-shadow(0 8px 26px rgba(0, 168, 132, .35));
}
@keyframes qyFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.mobile-welcome {
    background: rgba(0, 168, 132, .12);
    border: 1px solid rgba(0, 168, 132, .28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---------- 4) FORM: input glow + bottone gradiente ---------- */
.input-wrapper input,
.form-group input {
    background: rgba(10, 12, 15, .55);
    border: 1px solid rgba(255, 255, 255, .10);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.input-wrapper input:focus,
.form-group input:focus {
    border-color: #00a884;
    background: rgba(10, 12, 15, .72);
    box-shadow: 0 0 0 4px rgba(0, 168, 132, .15);
}
.btn-primary {
    background: linear-gradient(135deg, #00d3a0 0%, #00a884 45%, #008f70 100%);
    background-size: 160% 160%;
    box-shadow: 0 6px 20px rgba(0, 168, 132, .35);
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, background-position .6s ease;
}
.btn-primary:hover {
    background-position: 95% 95%;
    box-shadow: 0 10px 30px rgba(0, 168, 132, .5);
    transform: translateY(-2px);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 45%; height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-20deg);
    animation: qyShine 3.4s ease-in-out infinite;
}
@keyframes qyShine {
    0%, 55% { left: -80%; }
    100%    { left: 140%; }
}

/* ---------- 5) Card contatto + badge sicurezza ---------- */
.contact-info-card {
    background: rgba(42, 57, 66, .55);
    border: 1px solid rgba(0, 168, 132, .25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.contact-avatar-circle {
    border: 3px solid rgba(0, 168, 132, .55);
    box-shadow: 0 0 0 6px rgba(0, 168, 132, .12);
}
.contact-name { color: #00d3a0; }
.security-badge {
    background: rgba(0, 168, 132, .12);
    border: 1px solid rgba(0, 168, 132, .30);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---------- 6) Mobile: card più coprente + hero visibile come su desktop ---------- */
@media screen and (max-width: 768px) {
    .login-card {
        background: rgba(31, 44, 51, .90);
    }
    /* il logo (img 150px in contenitore 120px) sborda: diamo spazio alla welcome */
    .mobile-logo {
        margin-bottom: 34px;
    }

    /* Il CSS originale nasconde l'hero su mobile (display:none):
       qui lo riMOSTRIAMO sotto la card di login, così il form resta
       subito visibile e scendendo c'è la stessa ricchezza del desktop. */
    .hero-section {
        display: flex;
        order: 2;
        justify-content: center;
        padding: 44px 22px 30px;
    }
    .login-section {
        order: 1;
        min-height: auto;   /* la card non deve occupare forzatamente tutto lo schermo */
        padding: 34px 20px 26px;
    }
    .footer-year { order: 3; }

    /* il logo grande lo nascondiamo: nella card c'è già il mobile-logo */
    .hero-logo { display: none; }

    .hero-content {
        max-width: 460px;
        text-align: center;
    }
    .hero-title { font-size: 1.9rem; }
    .hero-features {
        text-align: left;   /* icona+testo allineati dentro le pill */
        width: 100%;
    }
    .hero-features li { font-size: .95rem; padding: 9px 14px; }
    .hero-badges { justify-content: center; }
}

@media screen and (max-width: 480px) {
    .hero-section { padding: 36px 16px 26px; }
    .hero-title   { font-size: 1.6rem; }
}

/* ---------- 7) Accessibilità: niente animazioni se ridotte ---------- */
@media (prefers-reduced-motion: reduce) {
    body::before,
    .login-card,
    .hero-content,
    .hero-features li,
    .mobile-logo img,
    .hero-logo img,
    .btn-primary::after {
        animation: none !important;
    }
}
