/* Stili CSS per Tringo - Sito Web Moderno */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.2);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

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

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

/* GDPR Banner */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 15px 0;
    z-index: 1050;
    transform: translateY(100%);
    transition: var(--transition);
}

.gdpr-banner.show {
    transform: translateY(0);
}

.gdpr-banner p {
    margin: 0;
    font-size: 14px;
}

/* Header e Hero Section */
.hero-section {
    background: var(--gradient-primary);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.navbar {
    background: rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: white !important;
}

/* Override per pagine con navbar su sfondo bianco */
.navbar-dark .navbar-brand {
    color: white !important;
}

.bg-primary .navbar-brand {
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 150px 0 100px;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.hero-content .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-content .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: var(--shadow-medium);
    animation: fadeInUp 1s ease 0.4s both;
    transition: var(--transition);
}

.hero-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Sezioni */
section {
    padding: 80px 0;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Card Styles */
.link-card, .product-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

.link-card:hover, .product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.link-icon {
    text-align: center;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-footer {
    background: var(--light-color);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Price Section Styles */
.price-section {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.original-price {
    font-size: 1.1rem;
    color: var(--secondary-color);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

/* Product Cards */
.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.price-section {
    margin: 1rem 0;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.original-price {
    font-size: 1rem;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-left: 10px;
}

/* Utility Cards */
.utility-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.utility-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.utility-card i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.utility-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.utility-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: var(--dark-color) !important;
    color: white;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Footer spacing improvements */
footer .col-md-6:first-child {
    padding-right: 2rem;
}

footer .col-md-6:last-child {
    padding-left: 2rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* Form Styles */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn {
    border-radius: var(--border-radius);
    padding: 12px 25px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Product Card Footer Buttons */
.card-footer .d-flex {
    gap: 8px !important;
    display: flex !important;
}

.card-footer .btn {
    white-space: nowrap;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.card-footer .btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
}

/* Layout responsive per card footer */
.card-footer .d-flex {
    gap: 0.5rem;
}

.card-footer .badge {
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-footer .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .card-footer .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .card-footer .btn:last-child {
        margin-bottom: 0;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Mobile footer spacing */
    footer .col-md-6:first-child,
    footer .col-md-6:last-child {
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 2rem;
    }
    
    footer .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .utility-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .card-footer .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card-footer .d-flex > div {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-content {
        padding: 100px 0 50px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .gdpr-banner .col-md-3 {
        text-align: center;
        margin-top: 10px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1030;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Admin Styles */
.admin-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 0;
}

.admin-sidebar {
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

.admin-nav {
    list-style: none;
    padding: 0;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-color);
    color: white;
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-light);
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stats-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Table Styles */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
}

.table td {
    border: none;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-heavy);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: var(--shadow-medium);
}

.border-radius-custom {
    border-radius: var(--border-radius);
}

.transition-custom {
    transition: var(--transition);
}

/* SweetAlert2 personalizzazioni */
.swal-wide {
    width: 600px !important;
}

.swal2-popup {
    border-radius: 15px !important;
}

.swal2-title {
    font-size: 1.5rem !important;
    color: #333 !important;
}

.swal2-html-container {
    margin: 0 !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .swal-news-popup,
    .swal-amazon-popup {
        width: 90% !important;
        margin: 0 auto !important;
    }
}

/* Stili per il pulsante YouTube in SweetAlert */
.btn-youtube {
    background-color: #FF0000 !important;
    border-color: #FF0000 !important;
    color: white !important;
}

.btn-youtube:hover {
    background-color: #CC0000 !important;
    border-color: #CC0000 !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Product Card Footer Buttons */
.card-footer .d-flex {
    gap: 8px !important;
    display: flex !important;
}

.card-footer .btn {
    white-space: nowrap;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.card-footer .btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-footer .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .card-footer .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .card-footer .btn:last-child {
        margin-bottom: 0;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Mobile footer spacing */
    footer .col-md-6:first-child,
    footer .col-md-6:last-child {
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 2rem;
    }
    
    footer .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .utility-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-content {
        padding: 100px 0 50px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .gdpr-banner .col-md-3 {
        text-align: center;
        margin-top: 10px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1030;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Admin Styles */
.admin-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 0;
}

.admin-sidebar {
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

.admin-nav {
    list-style: none;
    padding: 0;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-color);
    color: white;
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-light);
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stats-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Table Styles */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
}

.table td {
    border: none;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-heavy);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: var(--shadow-medium);
}

.border-radius-custom {
    border-radius: var(--border-radius);
}

.transition-custom {
    transition: var(--transition);
}

/* SweetAlert2 personalizzazioni */
.swal-wide {
    width: 600px !important;
}

.swal2-popup {
    border-radius: 15px !important;
}

.swal2-title {
    font-size: 1.5rem !important;
    color: #333 !important;
}

.swal2-html-container {
    margin: 0 !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .swal-news-popup,
    .swal-amazon-popup {
        width: 90% !important;
        margin: 0 auto !important;
    }
}

/* Stile per colonna Mostra in Home */
.home-col {
    width: 120px;
    text-align: center;
}

/* Miglioramenti per i pulsanti delle sezioni */
.section-view-all {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.section-view-all .btn {
    padding: 12px 30px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.section-view-all .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

/* Badge per indicare contenuto incorporato */
.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Stili per le card YouTube */
.youtube-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.youtube-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

/* Overlay per intercettare click sugli iframe YouTube */
.youtube-iframe-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.iframe-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.iframe-click-overlay:hover {
    background: rgba(255, 0, 0, 0.1);
}

.iframe-click-overlay:hover::before {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Stili per i badge YouTube */
.content-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 15;
}

.badge-video { 
    background: #ff4444; 
    color: white; 
}

.badge-short { 
    background: #ff6b35; 
    color: white; 
}

.badge-playlist { 
    background: #4285f4; 
    color: white; 
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 15;
}

.youtube-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    pointer-events: auto;
}

.placeholder-thumbnail {
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Badge per indicare la riproduzione locale */
.badge.bg-success {
    background-color: #28a745 !important;
}

/* Responsive iframe - mantieni aspect ratio */
@media (max-width: 768px) {
    .youtube-iframe-container {
        height: 0;
        padding-bottom: 56.25%; /* Mantieni 16:9 anche su mobile */
    }
}

@media (max-width: 576px) {
    .youtube-iframe-container {
        height: 0;
        padding-bottom: 56.25%; /* Mantieni 16:9 anche su mobile piccolo */
    }
}

/ * Soluzione drastica per iPhone - Pulsanti categorie */
@media (max-width: 768px) {
    /* Container principale più stretto */
    .py-4.bg-light {
        padding-left: 5px !important;
        padding-right: 5px !important;
        overflow-x: hidden !important;
    }
    
    .py-4.bg-light .container {
        max-width: 100% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    .py-4.bg-light .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .py-4.bg-light .col-md-6 {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    
    /* Pulsanti categorie - approccio conservativo */
    .btn-group {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .btn-group .btn {
        display: inline-block !important;
        width: auto !important;
        max-width: 45% !important;
        margin: 2px 1% !important;
        font-size: 0.7rem !important;
        padding: 4px 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        vertical-align: top !important;
    }
    
    .py-4.bg-light .col-md-6:last-child {
        margin-top: 10px;
        text-align: center !important;
    }
}

/* iPhone specifico - ancora più restrittivo */
@media (max-width: 390px) {
    .btn-group .btn {
        max-width: 30% !important;
        font-size: 0.65rem !important;
        padding: 3px 4px !important;
        margin: 1px 0.5% !important;
    }
    
    /* Forza il container a non eccedere */
    body {
        overflow-x: hidden !important;
    }
    
    .container-fluid, .container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* iPhone molto piccoli */
@media (max-width: 360px) {
    .btn-group .btn {
        max-width: 28% !important;
        font-size: 0.6rem !important;
        padding: 2px 3px !important;
    }
}

/* Menu a tendina categorie - responsive */
#categoryFilter {
    border: 2px solid #0d6efd;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#categoryFilter:focus {
    border-color: #0a58ca;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

@media (max-width: 768px) {
    .py-4.bg-light .row {
        text-align: center;
    }
    
    .py-4.bg-light .col-md-6:last-child {
        margin-top: 15px;
    }
    
    #categoryFilter {
        max-width: 100% !important;
        width: 100%;
    }
    
    .py-4.bg-light .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .py-4.bg-light .form-label {
        margin-bottom: 0 !important;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .py-4.bg-light .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .py-4.bg-light .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Header responsive */
    .navbar-brand {
        font-size: 1.4rem !important;
    }
    
    .display-5 {
        font-size: 2rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
}

/* Stili per le icone delle sezioni */
.section-icon-link {
    transition: transform 0.2s ease;
}

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

.hover-lift:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Layout responsive per le icone */
.section-icons-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
}

@media (max-width: 767px) {
    /* Gestione per pagine con 4 icone (default) - INALTERATA */
    .section-icons-container {
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 8px !important;
        overflow-x: hidden !important;
        padding: 0 15px !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .section-icon-item {
        flex: 0 0 auto !important;
        min-width: 85px !important;
        max-width: 90px !important;
        text-align: center !important;
    }
    
    /* HOME PAGE - Regole ultra-specifiche per forzare il rimpicciolimento */
    .hero .section-icons-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 0 10px !important;
        max-width: 100% !important;
        overflow: hidden !important;
        margin: 0 auto !important;
    }
    
    .hero .section-icon-item {
        flex: 0 0 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        width: 60px !important;
        margin-bottom: 4px !important;
    }
    
    .hero .section-icon-item .card {
        min-width: 60px !important;
        max-width: 60px !important;
        width: 60px !important;
    }
    
    .hero .section-icon-item .d-flex {
        padding: 6px 2px !important;
        font-size: 0.7rem !important;
        justify-content: center !important;
        align-items: center !important;
        flex-direction: column !important;
        line-height: 1.1 !important;
        min-width: 60px !important;
        max-width: 60px !important;
        width: 60px !important;
    }
    
    .hero .section-icon-item i {
        font-size: 1.2rem !important;
        margin-bottom: 1px !important;
    }
    
    /* Altre pagine - INALTERATO */
    .section-icon-item .d-flex {
        padding: 12px 8px !important;
        font-size: 0.8rem !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .section-icon-item i {
        font-size: 1.5rem !important;
        margin-bottom: 6px !important;
    }
}

/* Regola aggiuntiva per forzare le dimensioni su schermi molto piccoli */
@media (max-width: 400px) {
    .hero .section-icon-item {
        flex: 0 0 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
        width: 55px !important;
    }
    
    .hero .section-icon-item .card,
    .hero .section-icon-item .d-flex {
        min-width: 55px !important;
        max-width: 55px !important;
        width: 55px !important;
    }
    
    .hero .section-icons-container {
        gap: 3px !important;
        padding: 0 8px !important;
    }
    
    .hero .section-icon-item .d-flex {
        font-size: 0.65rem !important;
        padding: 4px 1px !important;
    }
    
    .hero .section-icon-item i {
        font-size: 1.1rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .section-icons-container {
        gap: 15px !important;
    }
    
    .section-icon-item {
        flex: 0 0 auto !important;
        min-width: 110px !important;
    }
}

@media (min-width: 992px) {
    .section-icon-item {
        flex: 0 0 auto !important;
        min-width: 130px !important;
    }
}