/* ============================================================
   LogoFactoryWeb — Global CSS (nuovo layout 2025)
   File: /css/lfw-global.css
   ============================================================ */

:root {
    --primary:      #667eea;
    --primary-dark: #5568d3;
    --secondary:    #764ba2;
    --accent:       #f093fb;
    --success:      #1e6caf;
    --text-dark:    #2c3e50;
    --text-light:   #6c757d;
    --bg-light:     #f8f9fa;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: transparent !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1) !important;
    padding: 1rem 0;
    position: fixed !important;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

/* Navbar diventa bianca dopo lo scroll (classe aggiunta via JS) */
.navbar.scrolled {
    background: white !important;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff !important;
    transition: color 0.3s;
}
.navbar.scrolled .navbar-brand { color: var(--primary) !important; }

.navbar-brand i { color: #e372fe !important; }

.nav-link {
    color: #fff !important;
    font-weight: 600 !important;
    transition: color 0.3s;
}
.navbar.scrolled .nav-link { color: var(--success) !important; }
.nav-link:hover { color: var(--primary) !important; }

/* Navbar interna (pagine senza hero video — es. categoria, contatti) */
.navbar-inner {
    background: white !important;
    backdrop-filter: none !important;
    position: sticky !important;
}
.navbar-inner .navbar-brand { color: var(--primary) !important; }
.navbar-inner .nav-link     { color: var(--success) !important; }
.navbar-inner .nav-link:hover { color: var(--primary) !important; }

.navbar-toggler { border-color: var(--success) !important; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%234facfe' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Language dropdown */
.language-dropdown {
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border-radius: 10px;
    border: none;
    font-size: 14px;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}
.language-dropdown .dropdown-item {
    padding: 0.3rem 1.2rem;
    color: var(--success) !important;
    transition: all 0.2s;
}
.language-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important;
}
.language-dropdown::-webkit-scrollbar { width: 6px; }
.language-dropdown::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.language-dropdown::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* Active nav link */
.nav-link.active-page { color: #f0c3fb !important; }
.navbar.scrolled .nav-link.active-page { color: var(--primary) !important; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-custom {
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
    display: inline-flex;
    flex-wrap: wrap;
}
.breadcrumb-custom .breadcrumb-item a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb-custom .breadcrumb-item a:hover { color: white; }
.breadcrumb-custom .breadcrumb-item.active { color: white; }
.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.6); }

/* ============================================================
   SECTION TITOLI (riutilizzabili su tutte le pagine)
   ============================================================ */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}
.section-title-left { text-align: left; }
.section-title-left::after { left: 0; transform: none; }

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ============================================================
   CATEGORY GRID (home + categoria-editor + altre pagine)
   ============================================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
}
.category-card {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.3rem 1rem;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    cursor: pointer;
}
.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.2);
    color: inherit;
}
.category-card.active-cat {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
}
.category-card.active-cat .category-icon,
.category-card.active-cat h4 { color: white; }
.category-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.7rem;
}
.category-card h4 {
    font-size: 0.88rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 600;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-decoration: none;
    display: inline-block;
}
.btn-primary-custom:hover {
    background: #FFD700;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,215,0,0.4);
}
.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(102,126,234,0.35);
}
.btn-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102,126,234,0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}
.footer h5 { color: white; font-weight: 600; }

.footer-languages {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
    margin-bottom: 1.5rem;
}
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    max-width: 1000px;
    margin: 0 auto;
}
.language-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.language-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}
.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover { color: white; }

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}
.social-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}
.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}
.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* ============================================================
   VIDEO POPUP
   ============================================================ */
#video {
    position: fixed;
    width: 70%; height: auto;
    top: 15%; left: 50%; margin-left: -35%;
    background: #000;
    padding: 15px;
    display: none;
    z-index: 999999;
    border-radius: 12px;
}
.video-container {
    position: relative;
    padding-bottom: 52.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.linkborder { text-decoration: none; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .navbar { backdrop-filter: blur(10px) !important; }
    .section-title { font-size: 1.9rem; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.9rem; }
    .language-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 768px) {
    .section-title { font-size: 1.6rem; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.7rem; }
    .language-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .footer-links { gap: 1rem; font-size: 0.9rem; }
    #video { width: 95%; left: 2.5%; margin-left: 0; }
}
@media (max-width: 480px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}
