/*
Theme Name: SFC Bicocca One-Page
Theme URI: https://sfcbicocca.it
Author: Starting Finance Club Bicocca
Description: Sito one-page di Starting Finance Club Bicocca. Il tema mostra sempre la pagina completa (hero con logo animato, Board e Head, eventi, newsletter, contatti) su qualunque URL, con contenuti fissi identici alla versione HTML.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sfc-bicocca-onepage
*/

/* === VARIABILI E RESET === */
        :root {
            --sf-red: #D12027;
            --sf-green: #009A44;
            --bg-color: #FFFFFF;
            --text-color: #000000;
            --nav-bg: #000000;
            --rust-dark: #4A2311;
            --rust-light: #8A4222;
            --grey-light: #F5F5F7;
            --nav-height: 80px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Montserrat', sans-serif;
        }

        html {
            scroll-behavior: smooth;
            scroll-padding-top: var(--nav-height);
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            overflow-x: hidden;
        }

        a { text-decoration: none; color: inherit; }
        ul { list-style: none; }

        /* === FIXED NAVBAR === */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--nav-height);
            background-color: transparent;
            color: white;
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 4%;
            pointer-events: none; /* Attivata via JS solo allo scroll */
            transition: background-color 0.2s ease;
        }

        .navbar.active {
            pointer-events: auto;
            background-color: var(--nav-bg);
        }

        .nav-left {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .social-icons-nav {
            display: flex;
            gap: 1rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .navbar.active .social-icons-nav {
            opacity: 1;
        }

        .social-icons-nav a {
            font-size: 1.2rem;
            transition: color 0.3s;
        }
        .social-icons-nav a:hover { color: var(--sf-red); }

        /* Slot geometrico di destinazione per il logo */
        .nav-logo-slot {
            width: 50px;
            height: 50px;
            visibility: hidden; /* Serve solo come punto di riferimento nello spazio */
        }

        .brand-text {
            font-weight: 700;
            font-size: 1rem;
            letter-spacing: 0.5px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .navbar.active .brand-text {
            opacity: 1;
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            font-weight: 600;
            font-size: 0.9rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .navbar.active .nav-links {
            opacity: 1;
        }

        .nav-links a:hover { color: var(--sf-green); }

        /* === HERO TRACK (SCROLL CONTAINER) === */
        .hero-container {
            position: relative;
            height: 180vh; /* Spazio per rendere lo scroll più morbido */
            background-color: var(--bg-color);
        }

        /* La parte visiva che rimane incollata allo schermo */
        .hero-sticky {
            position: sticky;
            top: 0;
            height: 100vh;
            width: 100%;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 5;
        }

        /* Immagine di Sfondo Università Bicocca (Subito Visibile) */
        .hero-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Carica l'immagine subito con CSS per evitare flash bianchi */
            /* Metti la foto della Bicocca in assets/hero.jpg.
               Se il file manca, resta visibile il gradiente di riserva. */
            background-image: linear-gradient(rgba(255,255,255,0.30), rgba(255,255,255,0.30)),
                              url('assets/hero.jpg'),
                              linear-gradient(135deg, #EFEAE4 0%, #D9CEC4 45%, #C2B4A6 100%);
            background-size: cover;
            background-position: center;
            z-index: 1;
            transform: scale(1);
            will-change: transform, filter;
        }

        /* IL LOGO "VOLANTE" - FISSO RISPETTO AL VIEWPORT */
        #flying-logo {
            position: fixed;
            top: 0;
            left: 0;
            width: 220px;
            height: 220px;
            object-fit: contain;
            z-index: 1001; /* Sopra la navbar */
            transform-origin: center center;
            will-change: transform, filter;
            pointer-events: none;
        }

        /* Testi sotto al logo iniziale */
        .hero-texts {
            position: relative;
            z-index: 2;
            text-align: center;
            width: 100%;
            padding: 0 20px;
            /* MODIFICATO: margin-top ridotto per armonizzarsi con il logo sollevato */
            margin-top: 220px;
            color: #000000;
            will-change: opacity, transform;
        }

        .hero-texts h1 {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 0.8rem;
        }

        .hero-texts h2 {
            font-size: 1.1rem;
            font-weight: 600;
            max-width: 750px;
            margin: 0 auto;
            color: #333333;
        }

        /* === MAIN CONTENT === */
        main {
            position: relative;
            z-index: 10;
            background-color: var(--bg-color);
            box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
        }

        section {
            padding: 100px 10%;
        }

        .section-title {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 1rem;
            text-transform: uppercase;
        }

        /* === SEZIONE 1: UNISCITI A NOI === */
        #unisciti .subtitle {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 2rem;
        }

        .cta-primary {
            display: inline-block;
            background-color: var(--sf-red);
            color: white;
            padding: 15px 35px;
            border-radius: 50px;
            font-weight: 700;
            font-size: 1.1rem;
            transition: background-color 0.3s, transform 0.2s;
            margin-top: 1.5rem;
            box-shadow: 0 4px 15px rgba(209, 32, 39, 0.3);
        }

        .cta-primary:hover {
            background-color: #a8171f;
            transform: translateY(-3px);
        }

        /* === SEZIONE 2: CHI SIAMO (ORGANIGRAMMA) === */
        .org-label {
            display: inline-block;
            background-color: var(--rust-light);
            color: white;
            padding: 8px 20px;
            border-radius: 5px;
            font-weight: 700;
            letter-spacing: 2px;
            margin-bottom: 2rem;
            margin-top: 3rem;
        }

        .board-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }

        .head-grid-row1 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-bottom: 40px;
        }

        .head-grid-row2 {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            width: 66.66%;
            margin: 0 auto;
        }

        .person-card {
            position: relative;
            background: linear-gradient(180deg, #5C2C15 0%, var(--rust-dark) 60%, #3A1B0D 100%);
            color: white;
            border-radius: 18px;
            text-align: center;
            box-shadow: 0 10px 24px rgba(0,0,0,0.13);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: transform .35s ease, box-shadow .35s ease;
        }

        .person-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 24px 44px rgba(74, 35, 17, 0.28);
        }

        /* Linea accento che cresce al passaggio del mouse */
        .person-card::after {
            content: "";
            position: absolute;
            left: 0; right: 0; bottom: 0;
            height: 3px;
            background: var(--sf-green);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .45s ease;
            z-index: 3;
        }
        .person-card:hover::after { transform: scaleX(1); }

        /* Pannello foto a tutta larghezza */
        .pc-photo {
            position: relative;
            width: 100%;
            aspect-ratio: 4 / 5;
            overflow: hidden;
            background-color: #F2F1EF;
        }

        .pc-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center top;
            display: block;
            filter: saturate(0.95) contrast(1.03);
            transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease;
        }

        .person-card:hover .pc-photo img {
            transform: scale(1.06);
            filter: saturate(1.05) contrast(1.03);
        }

        /* Sfumatura che fonde la foto nel colore della card */
        .pc-photo::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom,
                        rgba(74,35,17,0) 45%,
                        rgba(74,35,17,0.45) 72%,
                        rgba(74,35,17,0.92) 90%,
                        #4A2311 100%);
            pointer-events: none;
        }

        .role {
            position: absolute;
            left: 0; right: 0;
            bottom: 12px;
            z-index: 2;
            padding: 0 10px;
            font-weight: 800;
            font-size: 0.95rem;
            line-height: 1.2;
            letter-spacing: 0.4px;
            text-shadow: 0 2px 12px rgba(0,0,0,0.5);
        }

        .pc-body {
            padding: 14px 14px 20px;
        }

        .person-details {
            font-size: 0.85rem;
            width: 100%;
        }

        .person-details p {
            margin: 7px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .person-details p:first-child { font-weight: 700; }

        .person-details i {
            color: rgba(255,255,255,0.5);
            font-size: 0.75rem;
        }

        @media (prefers-reduced-motion: reduce) {
            .person-card, .person-card:hover,
            .pc-photo img, .person-card:hover .pc-photo img {
                transform: none !important;
                transition: none !important;
            }
        }

        .head-card-wrapper {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .sub-card {
            background-color: var(--grey-light);
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            color: var(--text-color);
            flex-grow: 1;
        }

        .sub-card h4 {
            font-size: 0.85rem;
            font-weight: 800;
            margin-bottom: 15px;
        }

        .pill-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
        }

        .pill {
            background-color: var(--rust-light);
            color: white;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 5px 12px;
            border-radius: 20px;
        }

        /* === SEZIONE 3: EVENTI === */
        .events-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            margin-top: 30px;
        }

        .event-card {
            background-color: white;
            border: 1px solid #EAEAEA;
            border-radius: 10px;
            padding: 30px;
            transition: box-shadow 0.3s;
            display: flex;
            flex-direction: column;
        }

        .event-card:hover {
            box-shadow: 0 15px 35px rgba(0,0,0,0.08);
        }

        .event-title {
            font-size: 1.25rem;
            font-weight: 800;
            margin-bottom: 15px;
        }

        .event-meta {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 20px;
        }

        .event-meta i {
            color: var(--sf-green);
            width: 20px;
        }

        .event-desc {
            font-size: 0.9rem;
            line-height: 1.6;
            margin-bottom: 30px;
            flex-grow: 1;
        }

        .btn-event {
            text-align: center;
            background-color: var(--sf-green);
            color: white;
            padding: 12px;
            border-radius: 5px;
            font-weight: 700;
            transition: background-color 0.3s;
        }

        .btn-event:hover { background-color: #007a36; }

        /* === SEZIONE 4: NEWSLETTER === */
        .newsletter-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 50px;
            align-items: center;
            background-color: var(--grey-light);
            padding: 50px;
            border-radius: 20px;
        }

        .newsletter-text p {
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 30px;
        }

        .social-buttons {
            display: flex;
            gap: 20px;
        }

        .btn-social {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 25px;
            border-radius: 5px;
            font-weight: 600;
            color: white;
            transition: opacity 0.3s, transform 0.2s;
        }

        .btn-social:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        .btn-ig { background-color: #E1306C; }
        .btn-in { background-color: #0077b5; }

        /* === MOCKUP NEWSLETTER (SMARTPHONE) === */
        .newsletter-visual {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nl-mockup {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 25px 0;
        }

        /* Alone luminoso dietro al telefono */
        .nl-mockup::before {
            content: "";
            position: absolute;
            width: 330px;
            height: 330px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(138, 66, 34, 0.20), transparent 70%);
            z-index: 0;
        }

        .nl-phone {
            position: relative;
            z-index: 2;
            width: 262px;
            height: 524px;
            background: #131313;
            border-radius: 40px;
            padding: 11px;
            box-shadow: 0 30px 60px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.2);
            transform: rotate(-3deg) translateY(24px);
            opacity: 0;
            transition: transform 1s cubic-bezier(.2,.7,.2,1), opacity .8s ease;
        }

        .nl-mockup.is-visible .nl-phone {
            transform: rotate(-3deg) translateY(0);
            opacity: 1;
        }

        /* Notch */
        .nl-phone::after {
            content: "";
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 76px;
            height: 6px;
            border-radius: 6px;
            background: #2C2C2C;
            z-index: 5;
        }

        .nl-screen {
            width: 100%;
            height: 100%;
            border-radius: 30px;
            overflow: hidden;
        }

        .nl-cover {
            height: 100%;
            padding: 36px 21px 20px;
            display: flex;
            flex-direction: column;
            color: #FFFFFF;
            background: linear-gradient(160deg, #8A4222 0%, #4A2311 55%, #2A1209 100%);
        }

        .nl-head {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 24px;
        }

        .nl-logo {
            width: 26px;
            height: 26px;
            object-fit: contain;
            filter: invert(1); /* Logo nero -> bianco sul fondo scuro */
        }

        .nl-brand {
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 1.5px;
        }

        .nl-issue {
            margin-left: auto;
            font-size: 0.52rem;
            font-weight: 700;
            letter-spacing: 1px;
            padding: 3px 9px;
            border-radius: 20px;
            color: rgba(255,255,255,0.65);
            border: 1px solid rgba(255,255,255,0.25);
        }

        .nl-eyebrow {
            font-size: 0.55rem;
            font-weight: 800;
            letter-spacing: 2px;
            color: #3FD180;
            margin-bottom: 10px;
        }

        .nl-title {
            font-size: 1.12rem;
            font-weight: 800;
            line-height: 1.3;
        }

        .nl-chart {
            margin-top: auto;
            width: 100%;
        }

        .nl-bar {
            transform: scaleY(0);
            transform-box: fill-box;
            transform-origin: bottom;
            transition: transform .8s cubic-bezier(.2,.7,.2,1);
        }
        .nl-mockup.is-visible .nl-bar { transform: scaleY(1); }
        .nl-mockup.is-visible .nl-bar:nth-of-type(2) { transition-delay: .12s; }
        .nl-mockup.is-visible .nl-bar:nth-of-type(3) { transition-delay: .24s; }

        .nl-area {
            opacity: 0;
            transition: opacity .9s ease 1.1s;
        }
        .nl-mockup.is-visible .nl-area { opacity: 1; }

        .nl-line {
            stroke-dasharray: 320;
            stroke-dashoffset: 320;
            transition: stroke-dashoffset 1.9s ease .35s;
        }
        .nl-mockup.is-visible .nl-line { stroke-dashoffset: 0; }

        .nl-dot {
            opacity: 0;
            transition: opacity .5s ease 1.9s;
        }
        .nl-mockup.is-visible .nl-dot { opacity: 1; }

        .nl-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 20px 0 16px;
        }

        .nl-tag {
            font-size: 0.5rem;
            font-weight: 700;
            letter-spacing: 0.8px;
            padding: 4px 9px;
            border-radius: 20px;
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.18);
            opacity: 0;
            transform: translateY(6px);
            transition: opacity .5s ease, transform .5s ease;
        }
        .nl-mockup.is-visible .nl-tag { opacity: 1; transform: none; }
        .nl-mockup.is-visible .nl-tag:nth-child(1) { transition-delay: 1.35s; }
        .nl-mockup.is-visible .nl-tag:nth-child(2) { transition-delay: 1.45s; }
        .nl-mockup.is-visible .nl-tag:nth-child(3) { transition-delay: 1.55s; }
        .nl-mockup.is-visible .nl-tag:nth-child(4) { transition-delay: 1.65s; }

        .nl-foot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.14);
            font-size: 0.5rem;
            font-weight: 600;
            letter-spacing: 1px;
            color: rgba(255,255,255,0.55);
        }

        /* Chip fluttuanti */
        .nl-chip {
            position: absolute;
            z-index: 4;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 13px;
            border-radius: 12px;
            background: #FFFFFF;
            box-shadow: 0 14px 32px rgba(0,0,0,0.16);
            font-size: 0.56rem;
            font-weight: 800;
            letter-spacing: 0.6px;
            color: var(--text-color);
            white-space: nowrap;
            opacity: 0;
            transform: translateY(12px) scale(0.92);
            transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
        }
        .nl-chip i { font-size: 0.85rem; }
        .nl-chip-1 { top: 58px; left: -22px; }
        .nl-chip-1 i { color: var(--sf-red); }
        .nl-chip-2 { bottom: -4px; right: -20px; }
        .nl-chip-2 i { color: var(--sf-green); }

        .nl-mockup.is-visible .nl-chip { opacity: 1; transform: none; }
        .nl-mockup.is-visible .nl-chip-1 { animation: nlFloat 5.5s ease-in-out 1.4s infinite; }
        .nl-mockup.is-visible .nl-chip-2 { animation: nlFloat 5.5s ease-in-out 2.3s infinite; }

        @keyframes nlFloat {
            0%, 100% { transform: translateY(0); }
            50%      { transform: translateY(-9px); }
        }

        @media (max-width: 400px) {
            .nl-chip-1 { left: -8px; }
            .nl-chip-2 { right: -8px; }
        }

        @media (prefers-reduced-motion: reduce) {
            .nl-phone { transform: rotate(-3deg) !important; opacity: 1 !important; }
            .nl-chip, .nl-tag, .nl-area, .nl-dot {
                opacity: 1 !important;
                transform: none !important;
                animation: none !important;
            }
            .nl-bar { transform: scaleY(1) !important; }
            .nl-line { stroke-dashoffset: 0 !important; }
            .nl-phone, .nl-chip, .nl-tag, .nl-area, .nl-dot, .nl-bar, .nl-line { transition: none !important; }
        }

        /* === SEZIONE 5: FOOTER === */
        footer {
            background-color: var(--nav-bg);
            color: white;
            padding: 60px 10%;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
        }

        .footer-col h5 {
            font-size: 1.2rem;
            font-weight: 800;
            margin-bottom: 20px;
            letter-spacing: 1px;
        }

        .footer-col p { margin-bottom: 10px; font-size: 0.95rem; }
        .footer-col .label { color: #999; }
        .footer-col .value { color: #E0E0E0; }
        .footer-col a:hover { color: var(--sf-green); }

        /* === RESPONSIVE === */
        @media (max-width: 1024px) {
            .board-grid, .events-grid { grid-template-columns: repeat(2, 1fr); }
            .head-grid-row1, .head-grid-row2 { grid-template-columns: repeat(2, 1fr); width: 100%; }
        }

        @media (max-width: 768px) {
            .nav-links, .brand-text { display: none; }
            .hero-texts h1 { font-size: 1.8rem; }
            .hero-texts h2 { font-size: 0.9rem; }
            section { padding: 50px 5%; }
            .board-grid, .events-grid, .head-grid-row1, .head-grid-row2, .newsletter-container, .footer-grid {
                grid-template-columns: 1fr;
                width: 100%;
            }
            .social-buttons { flex-direction: column; }
        }


/* ==========================================================
   ADATTAMENTI WORDPRESS (solo posizionamento, nessuno stile alterato)
   ========================================================== */

/* La admin bar sposta la pagina: riallinea navbar e logo volante */
body.admin-bar .navbar { top: 32px; }
body.admin-bar #flying-logo { margin-top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .navbar { top: 46px; }
    body.admin-bar #flying-logo { margin-top: 46px; }
}
