/* ==========================================================================
   1. VARIABILI E IMPOSTAZIONI GLOBALI
   ========================================================================== */
:root {
    --bg-main: #818486;
    --card-bg: #8a8d8f;
    --text-title: #0c4a3e;
    --text-body: #374151;
    --gold-accent: #c5a059;
    --pearl-white: #F0EAD6;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
}

iframe {
    border: 0;
}

/* ==========================================================================
   2. COLORI E UTILITY CUSTOM (Coordinati con Brand)
   ========================================================================== */
.bg-custom-main {
    background-color: var(--bg-main) !important;
}

.bg-forest {
    background-color: #0c4a3e;
}

.text-forest {
    color: var(--text-title) !important;
}

.text-gold-luxury {
    color: var(--gold-accent) !important;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.4);
    font-weight: 600;
}

.bg-gold-luxury {
    background-color: #8c6d2d;
}

.border-gold-luxury {
    border-color: #8c6d2d;
}

/* ==========================================================================
   3. COMPONENTI INTERATTIVI (Bottoni e Hover)
   ========================================================================== */
.hover-gold-dark:hover {
    background-color: #a38446;
}

.hover\:border-gold-luxury:hover {
    border-color: #c5a059 !important;
}

.linea-oro-sfumata {
    height: 1px;
    background: linear-gradient(to right, transparent, #c5a059, transparent);
    width: 60%;
    margin: 0 auto;
}

.logo-watermark {
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.15;
}

/* Stato hover per fill SVG (Interazione con classi Tailwind Group) */
.group:hover .group-hover\:fill-gold-luxury {
    fill: #c5a059 !important;
}

.group:hover .group-hover\:fill-green-400 {
    fill: #4ade80 !important;
}

.group:hover .group-hover\:fill-blue-400 {
    fill: #60a5fa !important;
}

/* Luxury Button */
.btn-luxury {
    position: relative;
    background: linear-gradient(135deg, #8c6d2d 0%, #c5a059 100%);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
    transition: all 0.5s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    overflow: hidden;
    display: inline-block;
}

.btn-luxury:hover {
    background-color: #a38446;
    transform: translateY(-0.25rem);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.5);
}

/* ==========================================================================
   4. CARD LUXURY E SEZIONE TEAM
   ========================================================================== */
.card-luxury {
    background-color: var(--pearl-white) !important;
    border: 1px solid rgba(12, 74, 62, 0.1);
    border-radius: 1rem;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* FONDAMENTALE: Nasconde il fascione inferiore quando si trova fuori dalla card */
    overflow: hidden !important;
    z-index: 1;
}

.card-luxury:hover {
    transform: translateY(-8px);
    border-color: var(--gold-accent);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-luxury h3,
.card-luxury h4 {
    color: var(--text-title) !important;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

/* Responsive Typography per Card */
.card-luxury h3 {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .card-luxury h3 {
        font-size: 2.5rem;
    }
}

.card-luxury h4 {
    font-size: 2rem;
}

.card-luxury p:not(.text-gold-luxury) {
    color: var(--text-body) !important;
    font-family: 'Inter', sans-serif;
}

.card-luxury p.text-gold-luxury {
    font-size: 1.2rem !important;
}

/* ==========================================================================
   4.1 WATERMARK LOGO ORO IN SFONDO con EFFETTO 3D (Sostituisce le vecchie regole)
   ========================================================================== */
#team .card-luxury::before {
    content: "";
    position: absolute;
    right: -15px;
    bottom: -15px;
    width: 120px;
    height: 120px;
    background-image: url('logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;

    /* 1. Viraggio Colore Oro Luxury Originale */
    filter: sepia(40%) saturate(900%) hue-rotate(10deg) brightness(85%) contrast(90%)
        /* 2. Trucco Pro: L'ombra proiettata (Drop Shadow) che segue i vettori dell'SVG creando l'effetto 3D */
        drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.45)) drop-shadow(5px 5px 6px rgba(12, 74, 62, 0.3));

    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
    /* Portato a 1 per farlo risaltare sopra lo sfondo perla, ma sotto il testo */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Effetto Dinamico in Hover: il logo si solleva e l'ombra si distanzia, aumentando il 3D */
#team .card-luxury:hover::before {
    opacity: 0.5;
    transform: scale(1.08) translate(-4px, -4px) rotate(-3deg);

    /* L'ombra si allontana e si ammorbidisce (simula il sollevamento reale dalla card) */
    filter: sepia(40%) saturate(950%) hue-rotate(10deg) brightness(90%) contrast(95%) drop-shadow(5px 8px 5px rgba(0, 0, 0, 0.35)) drop-shadow(10px 12px 10px rgba(12, 74, 62, 0.2));
}

/* Fix specifico per il Box Titolare (Desktop) */
@media (min-width: 768px) {
    #box-titolare::before {
        width: 220px !important;
        height: 220px !important;
        right: -30px !important;
        bottom: -30px !important;
    }
}


/* --------------------------------------------------------------------------
   4.2 FASCIONE INTERATTIVO SEMI-TRASPARENTE (NO-BUG PER DESKTOP E MOBILE)
   -------------------------------------------------------------------------- */
/* Rimuoviamo definitivamente il vecchio cerchietto con il "+" */
#team .btn-card-custom,
.card-luxury .btn-card-custom {
    display: none !important;
}

/* Applichiamo un padding protettivo fisso alla card per ospitare la barra */
.card-luxury {
    padding-bottom: 3.8rem !important;
    overflow: hidden !important;
}

/* Generiamo la barra fissa ma trasparente */
#team .card-luxury::after {
    content: "Visualizza Profilo +";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;

    /* VERDE FOREST TRASPARENTE: permette al logo oro sotto di essere perfettamente visibile */
    background-color: rgba(12, 74, 62, 0.12) !important;

    /* Testo verde scuro istituzionale per leggerlo bene sulla trasparenza */
    color: #0c4a3e !important;

    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    z-index: 2;
    /* Sopra lo sfondo */
    border-top: 1px solid rgba(12, 74, 62, 0.08);

    /* Transizione pulita solo sui colori */
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* EFFETTO HOVER (Valido sia per Desktop che per il "Tap" del Mobile) */
#team .card-luxury:hover::after {
    background-color: #0c4a3e !important;
    /* Diventa Verde Forest solido e pieno */
    color: #F0EAD6 !important;
    /* Il testo diventa color Perla luxury */
    border-top-color: #0c4a3e;
}

/* Piccola ottimizzazione per schermi mobile stretti */
@media (max-width: 768px) {
    #team .card-luxury::after {
        height: 40px;
        font-size: 0.75rem;
        letter-spacing: 0.1em;
    }
}

/* ==========================================================================
   5. FOOTER & CONTACT CARDS
   ========================================================================== */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-card.tel:hover {
    border-color: #c5a059;
}

.contact-card.wa:hover {
    border-color: #4ade80;
}

.contact-card.email:hover {
    border-color: #60a5fa;
}

/* ==========================================================================
   6. LOGO WATERMARK ORO SFONDO CARD TEAM
   ========================================================================== */
#team .card-luxury {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Effetto dinamico al passaggio del mouse sulla card */
#team .card-luxury:hover::before {
    opacity: 0.35;
    /* Diventa più vivido quando l'utente passa sopra con il mouse */
    transform: scale(1.05) rotate(-5deg);
}

/* Fix specifico per il Box Titolare (proporzionato al desktop) */
@media (min-width: 768px) {
    #box-titolare::before {
        width: 220px !important;
        height: 220px !important;
        right: -30px !important;
        bottom: -30px !important;
    }
}