/* =============================================================
   attrezzatura.css
   Stili per la pagina Attrezzatura Fotografica - ReflexList
   ============================================================= */

/* ==================== VARIABILI CSS ==================== */
:root {
    --primary:       #374151;
    --primary-light: #4b5563;
    --secondary:     #6b7280;
    --accent:        #9ca3af;
    --dark:          #1f2937;
    --light:         #f9fafb;
    --white:         #ffffff;
    --text:          #1f2937;
    --text-light:    #6b7280;
    --border:        #e5e7eb;
    --primary-rgb:   55, 65, 81;
    --secondary-rgb: 107, 114, 128;

    --shadow-sm:   0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg:   0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius:     8px;
    --border-radius-lg:  12px;
}

/* ==================== BODY ==================== */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(55,65,81,0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(55,65,81,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ==================== GRIGLIA ==================== */
.aa1-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.aa1-third {
    flex: 1 1 300px;
}

/* ==================== CARD CATEGORIA ==================== */
.aa1-third.aa1-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out forwards;
}

.aa1-third.aa1-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.aa1-third.aa1-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.aa1-third.aa1-container:hover::before {
    transform: scaleX(1);
}

.aa1-third.aa1-container:nth-child(1) { animation-delay: 0.1s; }
.aa1-third.aa1-container:nth-child(2) { animation-delay: 0.2s; }
.aa1-third.aa1-container:nth-child(3) { animation-delay: 0.3s; }

/* ==================== CONTENITORE IMMAGINE ==================== */
.image-overlay-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
}

/* Sfumatura scura in basso per leggibilità del titolo */
.image-overlay-container::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 40%;
    background: linear-gradient(to top,
        rgba(var(--primary-rgb), 0.5) 0%,
        rgba(var(--primary-rgb), 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.image-overlay-container::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 40%;
    backdrop-filter: blur(4px);
    z-index: 0;
    pointer-events: none;
}

.image-overlay-container a {
    display: block;
    width: 100%; height: 100%;
}

.image-overlay-container img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    transition: var(--transition-normal);
}

.image-overlay-container a:hover img {
    transform: scale(1.02);
}

/* Titolo sovrapposto all'immagine */
.image-overlay-container h3 {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    color: var(--white);
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    z-index: 2;
    pointer-events: none;
    box-sizing: border-box;
}

/* ==================== STATISTICHE ==================== */
.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin: 1.5rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.stat-box:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== ANIMAZIONE ENTRY ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
