/* ==========================================
   ANXA 2.0 - FREDDURE CSS (COMPACT SOCIAL POST & NEON BRICK WALL)
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&display=swap');

.freddure-page-wrapper {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 16px 14px 36px;
    box-sizing: border-box;
}

.freddure-header-section {
    text-align: center;
    margin-bottom: 16px;
}

.freddure-page-title {
    font-size: 26px;
    font-weight: 900;
    color: #0033A0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.freddure-page-subtitle {
    font-size: 14px;
    color: var(--text-main, #ffffff);
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* CONTENITORE CENTRATO COMPATTO (MAX 420PX DESKTOP) */
.freddure-card-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CARD QUADRATA 1:1 SOCIAL POST */
.freddure-box {
    position: relative;
    z-index: 10;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    padding: 12px 14px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, background 0.35s ease-in-out;
    overflow: hidden;
    user-select: none;
}

.freddure-box:hover {
    transform: translateY(-2px);
}

/* RIFLESSO VETRO VISIBILE ED ELEGANTE (DUO PSEUDO-ELEMENTI ::BEFORE E ::AFTER) */
.freddure-box::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 150%;
    height: 150%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.20) 22%,
        rgba(255, 255, 255, 0.04) 45%,
        transparent 65%
    );
    transform: rotate(-12deg);
    pointer-events: none;
    z-index: 3;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.freddure-box::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 140%;
    height: 140%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.06) 15%,
        transparent 35%
    );
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 3;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

@media (hover: hover) {
    .freddure-box:hover::before {
        transform: rotate(-12deg) translate(5%, 5%);
    }
    .freddure-box:hover::after {
        transform: rotate(-25deg) translate(6%, 6%);
    }
}

/* ------------------------------------------
   VARIANTE VERDE (ISPIRAZIONE WHATSAPP)
   ------------------------------------------ */
.freddure-box.layout-green {
    background: linear-gradient(145deg, #075E54 0%, #128C7E 100%) !important;
    border: 2px solid rgba(37, 211, 102, 0.5) !important;
    box-shadow: 0 10px 30px rgba(7, 94, 84, 0.35);
    color: #FFFFFF !important;
}

.freddure-box.layout-green .card-shape-1 {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: rgba(37, 211, 102, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.freddure-box.layout-green .brand-badge-pill {
    background: rgba(37, 211, 102, 0.2);
    border: 1px solid #25D366;
    color: #25D366;
    transform: rotate(-1.5deg);
}

.freddure-box.layout-green .badge-dot {
    background: #25D366;
}

.freddure-box.layout-green .card-category-tag {
    color: #25D366;
}

.freddure-box.layout-green .quote-svg {
    fill: #25D366;
    opacity: 0.8;
}

.freddure-box.layout-green .freddure-text {
    color: #FFFFFF !important;
}

.freddure-box.layout-green .footer-brand-tag {
    color: #25D366;
}

.freddure-box.layout-green .footer-subtext {
    color: rgba(255, 255, 255, 0.85);
}


/* ------------------------------------------
   VARIANTE BLU (ISPIRAZIONE FACEBOOK)
   ------------------------------------------ */
.freddure-box.layout-blue {
    background: linear-gradient(145deg, #0A52C6 0%, #1877F2 100%) !important;
    border: 2px solid rgba(100, 181, 246, 0.5) !important;
    box-shadow: 0 10px 30px rgba(10, 82, 198, 0.35);
    color: #FFFFFF !important;
}

.freddure-box.layout-blue .card-shape-1 {
    position: absolute;
    bottom: -50px;
    right: -40px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.freddure-box.layout-blue .brand-badge-pill {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #FFFFFF;
    transform: rotate(1deg);
}

.freddure-box.layout-blue .badge-dot {
    background: #64B5F6;
}

.freddure-box.layout-blue .card-category-tag {
    color: #E3F2FD;
}

.freddure-box.layout-blue .quote-svg {
    fill: #64B5F6;
    opacity: 0.8;
}

.freddure-box.layout-blue .freddure-text {
    color: #FFFFFF !important;
}

.freddure-box.layout-blue .footer-brand-tag {
    color: #FFFFFF;
}

.freddure-box.layout-blue .footer-subtext {
    color: rgba(255, 255, 255, 0.85);
}


/* ------------------------------------------
   VARIANTE GRADIENT (ISPIRAZIONE INSTAGRAM)
   ------------------------------------------ */
.freddure-box.layout-gradient {
    background: linear-gradient(135deg, #405DE6 0%, #833AB4 30%, #C13584 65%, #F77737 100%) !important;
    border: 2px solid rgba(255, 213, 79, 0.5) !important;
    box-shadow: 0 10px 30px rgba(193, 53, 132, 0.35);
    color: #FFFFFF !important;
}

.freddure-box.layout-gradient .card-shape-1 {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 35px;
    transform: rotate(30deg);
    pointer-events: none;
}

.freddure-box.layout-gradient .brand-badge-pill {
    background: rgba(255, 213, 79, 0.25);
    border: 1px solid #FFD54F;
    color: #FFD54F;
    transform: rotate(-1deg);
}

.freddure-box.layout-gradient .badge-dot {
    background: #FFD54F;
}

.freddure-box.layout-gradient .card-category-tag {
    color: #FFD54F;
}

.freddure-box.layout-gradient .quote-svg {
    fill: #FFD54F;
    opacity: 0.8;
}

.freddure-box.layout-gradient .freddure-text {
    color: #FFFFFF !important;
}

.freddure-box.layout-gradient .footer-brand-tag {
    color: #FFD54F;
}

.freddure-box.layout-gradient .footer-subtext {
    color: rgba(255, 255, 255, 0.9);
}


/* ------------------------------------------
   VARIANTE NEON (MURO DI MATTONI SCURI NOTTURNO)
   ------------------------------------------ */
.freddure-box.layout-neon {
    background-color: #0B0507 !important;
    background-image: 
        radial-gradient(circle at 50% 45%, rgba(255, 61, 0, 0.32) 0%, rgba(20, 9, 13, 0.88) 60%, #070305 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30' viewBox='0 0 60 30'%3E%3Crect width='60' height='30' fill='%230B0507'/%3E%3Cpath d='M0 14h60M0 29h60M30 0v14M0 15v14M60 15v14' stroke='%231C0D12' stroke-width='1.5'/%3E%3Crect x='1.5' y='1.5' width='27' height='11' fill='%23160A0D' rx='1'/%3E%3Crect x='31.5' y='1.5' width='27' height='11' fill='%2314080B' rx='1'/%3E%3Crect x='1.5' y='16.5' width='57' height='11' fill='%23170B0E' rx='1'/%3E%3C/svg%3E") !important;
    background-blend-mode: color-dodge, normal !important;
    border: 2px solid rgba(255, 61, 0, 0.5) !important;
    box-shadow: 0 10px 35px rgba(255, 61, 0, 0.3), inset 0 0 30px rgba(255, 61, 0, 0.2);
    color: #FFE066 !important;
}

.freddure-box.layout-neon .card-shape-1 {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 160px;
    height: 160px;
    background: rgba(255, 61, 0, 0.12);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

.freddure-box.layout-neon .brand-badge-pill {
    background: rgba(255, 61, 0, 0.25);
    border: 1px solid #FF3D00;
    color: #FFE066;
    transform: rotate(-1.5deg);
    box-shadow: 0 0 10px rgba(255, 61, 0, 0.4);
}

.freddure-box.layout-neon .badge-dot {
    background: #FFD000;
    box-shadow: 0 0 6px #FFD000;
}

.freddure-box.layout-neon .card-category-tag {
    color: #FF8800;
    text-shadow: 0 0 8px rgba(255, 136, 0, 0.6);
}

.freddure-box.layout-neon .quote-svg {
    fill: #FF8800;
    filter: drop-shadow(0 0 6px rgba(255, 136, 0, 0.6));
    opacity: 0.9;
}

.freddure-box.layout-neon .freddure-text {
    color: #FFE066 !important;
    text-shadow: 
        0 0 3px #FFE066,
        0 0 10px #FF8800,
        0 0 20px #FF3D00,
        0 0 35px rgba(255, 61, 0, 0.7) !important;
}

.freddure-box.layout-neon .footer-brand-tag {
    color: #FFE066;
    text-shadow: 0 0 8px rgba(255, 224, 102, 0.6);
}

.freddure-box.layout-neon .footer-subtext {
    color: rgba(255, 136, 0, 0.9);
}

.freddure-box.layout-neon::before,
.freddure-box.layout-neon::after {
    opacity: 0.4;
}


/* STRUTTURA COMPOSITIVA INTERNA */
.card-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.brand-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.badge-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: inline-block;
}

.card-category-tag {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.7px;
}

.proverb-ornament {
    text-align: left;
    width: 100%;
    margin-top: 1px;
    z-index: 2;
}

/* CONTENITORE TESTO BATTUTA PROTAGONISTA */
.freddure-text-container {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    z-index: 2;
    box-sizing: border-box;
    transform: rotate(-0.5deg);
}

.freddure-text {
    font-family: 'Caveat', 'Marker Felt', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 700;
    margin: 0;
    line-height: 1.20;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.18) !important;
    word-break: break-word;
    transition: font-size 0.2s ease;
    width: 100%;
}

/* SCALABILITÀ FONT PER COPRIRE IL 70-80% DELL'AREA */
.freddure-text.length-short {
    font-size: clamp(32px, 8vw, 44px) !important;
}

.freddure-text.length-medium {
    font-size: clamp(24px, 6.2vw, 34px) !important;
}

.freddure-text.length-long {
    font-size: clamp(19px, 4.8vw, 26px) !important;
}

/* FOOTER BRAND SIGNATURE */
.card-footer-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
    padding-top: 1px;
}

.footer-brand-tag {
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 1.1px;
}

.footer-subtext {
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

/* BARRA COMANDI COMPATTA CON 3 TASTI ESTERNI ALLA CARD */
.freddure-action-bar {
    width: 100%;
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* Pulsante Prossima Freddura -> Blu ANXA */
.btn-refresh {
    background: #0033A0 !important;
    border: 1px solid #0033A0 !important;
    color: #FFFFFF !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(0, 51, 160, 0.2) !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 38px;
    flex: 1;
    min-width: 110px;
}

.btn-refresh:hover {
    background: #002277 !important;
    transform: translateY(-1px);
}

.btn-refresh:active {
    transform: scale(0.98);
}

/* Pulsante Cambia Colore -> Scuro Neutro Chic */
.btn-color {
    background: #102A43 !important;
    border: 1px solid #102A43 !important;
    color: #FFFFFF !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(16, 42, 67, 0.25) !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 38px;
    flex: 1;
    min-width: 105px;
}

.btn-color:hover {
    background: #0B1D2F !important;
    transform: translateY(-1px);
}

.btn-color:active {
    transform: scale(0.98);
}

/* Pulsante Condividi -> Giallo ANXA */
.btn-share {
    background: #FFD54F !important;
    border: 1px solid #FFD54F !important;
    color: #0033A0 !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(255, 213, 79, 0.3) !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 38px;
    flex: 1;
    min-width: 105px;
}

.btn-share:hover {
    background: #ffca28 !important;
    transform: translateY(-1px);
}

.btn-share:active {
    transform: scale(0.98);
}

.btn-icon {
    flex-shrink: 0;
}

/* RESPONSIVE SMARTPHONE & TABLET */
@media (max-width: 600px) {
    .freddure-page-wrapper {
        padding: 14px 10px 28px;
    }

    .freddure-card-container {
        max-width: 100%;
    }
    
    .freddure-box {
        padding: 12px 10px 8px;
        border-radius: 14px;
    }

    .brand-badge-pill {
        padding: 2px 6px;
        font-size: 8px;
    }

    .card-category-tag {
        font-size: 8px;
    }

    .footer-brand-tag {
        font-size: 9.5px;
    }

    .footer-subtext {
        font-size: 7px;
    }
    
    .freddure-action-bar {
        gap: 6px;
        margin-top: 12px;
    }
    
    .btn-refresh, .btn-color, .btn-share {
        padding: 7px 8px !important;
        font-size: 11px !important;
        min-height: 36px;
    }
}
