/* ==============================================================================
   Autorobot.it - Clean Modern White Theme con Supporto Dual Faction
   File: assets/css/style.css
   ============================================================================== */

/* Font Transformers Solid (riservato esclusivamente a loghi e stemmi) */
@font-face {
    font-family: 'TransformersSolid';
    src: url('../fonts/Transformers_Solid.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Font Strongarm */
@font-face {
    font-family: 'Strongarm';
    src: url('../fonts/Strongarm Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-main: #ffffff;
    --bg-surface: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-accent: #d1d5db;
    
    /* Fazione Autobot (Default) */
    --autobot-red: #d62828;
    --autobot-red-hover: #ba1e1e;
    --autobot-red-glow: rgba(214, 40, 40, 0.2);
    
    --text-primary: #374151;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    /* Tipografia: font moderno, sobrio ed elegante per titoli e contenuti */
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-strongarm: 'Strongarm', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 6px;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 24px rgba(214, 40, 40, 0.12);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fazione Decepticon / Distructor (Viola) */
body[data-faction="distructor"] {
    --autobot-red: #7928ca;
    --autobot-red-hover: #601ca8;
    --autobot-red-glow: rgba(121, 40, 202, 0.25);
    --shadow-hover: 0 10px 24px rgba(121, 40, 202, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Header & Barra di Navigazione in Stile Bianco Moderno */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
    padding: 0.5rem 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--autobot-red);
}

.nav-link.active {
    color: var(--autobot-red);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    top: -0.85rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--autobot-red);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Selettore Fazione Dual-Emblem (Autobot / Decepticon) */
.faction-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 3px 5px;
    border-radius: 24px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.faction-btn {
    border: 1px solid transparent;
    background: transparent;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 0.45;
}

.faction-btn:hover {
    opacity: 0.9;
    transform: scale(1.1);
}

.faction-btn.active {
    opacity: 1;
    transform: scale(1.05);
}

.faction-btn[data-set-faction="autobot"].active {
    background: #fee2e2;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.faction-btn[data-set-faction="distructor"].active {
    background: #f3e8ff;
    border-color: #9333ea;
    box-shadow: 0 0 10px rgba(121, 40, 202, 0.3);
}

.faction-btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.search-box {
    position: relative;
}

.search-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.4rem 1rem 0.4rem 2rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 160px;
    transition: var(--transition);
}

.search-input:focus {
    width: 210px;
    background: #ffffff;
    border-color: var(--autobot-red);
    outline: none;
    box-shadow: 0 0 0 3px var(--autobot-red-glow);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Breadcrumbs Chiari */
.breadcrumbs-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
}

.breadcrumbs-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-muted);
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-back-gallery {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
}

.btn-back-gallery:hover {
    border-color: var(--autobot-red);
    color: var(--autobot-red);
    box-shadow: 0 2px 8px var(--autobot-red-glow);
    transform: translateX(-2px);
}

/* Barra Filtro Fazioni nella Galleria */
.faction-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 0.55rem 1rem;
    border-radius: 8px;
}

.faction-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-filter-search {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.quick-filter-input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    width: 195px;
    outline: none;
    transition: var(--transition);
}

.quick-filter-input:focus {
    border-color: var(--autobot-red);
    box-shadow: 0 0 0 2px var(--autobot-red-glow);
    width: 235px;
}

.faction-filter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.faction-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.faction-filter-btn:hover {
    border-color: var(--autobot-red);
    color: var(--autobot-red);
}

.faction-filter-btn.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #ffffff;
}

.faction-filter-btn.btn-filter-autobot.active {
    background: #d62828;
    border-color: #d62828;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(214, 40, 40, 0.3);
}

.faction-filter-btn.btn-filter-decepticon.active {
    background: #7928ca;
    border-color: #7928ca;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(121, 40, 202, 0.3);
}

.faction-filter-btn.btn-filter-unknown.active {
    background: linear-gradient(135deg, #b91c1c 0%, #b91c1c 48%, #6d28d9 52%, #6d28d9 100%);
    border-color: #4b5563;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(109, 40, 217, 0.3);
}

.filter-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Pulsante Toggle Effetti Sonori */
.sound-toggle-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.75;
}

.sound-toggle-btn:hover {
    opacity: 1;
    border-color: var(--autobot-red);
    transform: scale(1.08);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--autobot-red);
}

.breadcrumb-sep {
    color: #9ca3af;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Layout Principale */
.main-content {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Titoli delle Sezioni (Sobri, Eleganti, Puliti) */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--autobot-red);
    border-radius: 2px;
}

/* Griglia Cartelle / Serie (Proporzionata e Compatta stile Collector 120x160) */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 120px);
    gap: 1.25rem 1rem;
    margin-bottom: 3rem;
    justify-content: start;
}

.folder-card {
    width: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.folder-card:hover {
    transform: translateY(-4px);
    border-color: var(--autobot-red);
    box-shadow: var(--shadow-hover);
}

.folder-thumb-wrap {
    width: 120px;
    height: 160px;
    background: #0d1117;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.folder-card:hover .folder-thumb {
    transform: scale(1.05);
}

.folder-badge-logo {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    max-height: 22px;
    max-width: 88%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.85));
    z-index: 2;
    pointer-events: none;
}

/* Pin Fazione in alto a destra sulla miniatura 120x160 */
.folder-faction-pin {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.folder-faction-pin img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
}

.folder-faction-pin.faction-pin-autobot {
    border-color: rgba(214, 40, 40, 0.65);
}

.folder-faction-pin.faction-pin-decepticon {
    border-color: rgba(121, 40, 202, 0.7);
}

.folder-faction-pin.admin-editable {
    pointer-events: auto;
    cursor: pointer;
}

.folder-faction-pin.admin-editable:hover {
    transform: scale(1.22);
    background: rgba(15, 23, 42, 0.95);
    border-color: #ffffff;
}

.folder-info {
    padding: 0.45rem 0.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
}

.folder-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.badge-count {
    background: #f3f4f6;
    color: #374151;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.66rem;
    font-weight: 600;
}

/* Griglia Foto del Giocattolo (120x160) */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 120px);
    gap: 1rem;
    margin-top: 1.5rem;
}

.photo-card {
    width: 120px;
    height: 160px;
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
}

.photo-card:hover {
    border-color: var(--autobot-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(214, 40, 40, 0.92);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    padding: 3px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

body[data-faction="distructor"] .cover-ribbon {
    background: rgba(121, 40, 202, 0.92);
}

/* Lightbox Touch & Fullscreen */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img-wrap {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    user-select: none;
}

.lightbox-img-wrap.zoomed {
    cursor: zoom-out;
}

.lightbox-img-wrap.zoomed .lightbox-img {
    transform: scale(2.4);
    max-width: none;
    max-height: none;
    transition: transform 0.05s ease-out;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

.lightbox-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90vw;
    max-width: 850px;
    margin-top: 1rem;
    gap: 1rem;
    z-index: 10;
}

.lightbox-tool-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.4rem 0.95rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-tool-btn:hover {
    background: var(--autobot-red);
    border-color: var(--autobot-red);
    box-shadow: 0 0 10px var(--autobot-red-glow);
}

.lightbox-zoom-hint {
    color: #94a3b8;
    font-size: 0.8rem;
}

.lightbox-controls {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
    pointer-events: none;
}

.lightbox-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: var(--autobot-red);
    border-color: var(--autobot-red);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-counter {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #d1d5db;
    font-weight: 600;
}

/* Facciata "Under Construction" su Sfondo Bianco Moderno */
.construction-hero {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    user-select: none;
    background: #ffffff;
}

.construction-logo-emblem {
    max-width: 260px;
    width: 100%;
    height: auto;
    margin: 2.5rem 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Pagina Provvisoria In Costruzione (Minimalista: solo Logo, Scritta e Footer Copyright) */
.construction-body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-heading);
}

.construction-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    user-select: none;
    flex: 1;
}

.construction-main-logo {
    max-width: 250px;
    width: 65vw;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.08));
}

.construction-main-logo:hover {
    transform: scale(1.03);
}

.construction-main-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 2rem;
    margin-bottom: 0;
}

.construction-footer {
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

.construction-footer-copy {
    font-size: 0.78rem;
    color: var(--text-secondary);
    max-width: 850px;
    margin: 0 auto;
    line-height: 1.5;
}

.construction-logo-emblem:hover {
    transform: scale(1.03);
}

.construction-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.construction-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 1.5rem;
}

.construction-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Footer & CopyrightDepot & Versione */
.site-footer {
    background: #1e2024;
    color: #cbd5e1;
    padding: 2rem 1.5rem;
    font-size: 0.85rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.footer-top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.copyrightdepot-link {
    display: inline-block;
    transition: transform 0.2s;
}

.copyrightdepot-link:hover {
    transform: translateY(-2px);
}

.copyrightdepot-img {
    height: 38px;
    width: auto;
    display: block;
}

.versione-sito {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
}

.versione-sito a {
    color: #cbd5e1;
    text-decoration: underline;
    transition: color 0.2s;
}

.versione-sito a:hover {
    color: #ffffff;
}

.construction-footer-version {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.6rem;
}

.construction-footer-version a {
    color: #cbd5e1;
    text-decoration: underline;
    transition: color 0.2s;
}

.construction-footer-version a:hover {
    color: #ffffff;
}

.retro-heritage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.retro-heritage-badge:hover {
    border-color: var(--autobot-red);
    color: var(--autobot-red);
}

/* Responsiveness */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 0.5rem;
    }
    .search-box {
        width: 100%;
    }
    .search-input {
        width: 100%;
    }
    .search-input:focus {
        width: 100%;
    }
}
/* END autorobot_clean_modern_theme */
