/**
 * VagoVia Tailwind CSS Theme
 * Sistema di colori e componenti unificato per tutte le pagine
 *
 * @version 1.0
 * @author VagoVia Team
 * @date 2025-01-22
 */

/* ========================================
   CONFIGURAZIONE COLORI VAGOVIA
   ======================================== */

:root {
    /* Colori Primari VagoVia */
    --vagovia-primary: #0d3975;
    --vagovia-secondary: #ed278c;
    --vagovia-neutral: #42474a;
    --vagovia-accent: #ffc107;
    --vagovia-light: #f8f9fa;
    --vagovia-white: #ffffff;

    /* Varianti Primario (Navy Blue) */
    --vagovia-primary-50: #f0f6ff;
    --vagovia-primary-100: #e0ecff;
    --vagovia-primary-200: #c7ddff;
    --vagovia-primary-300: #a5c6ff;
    --vagovia-primary-400: #82a4ff;
    --vagovia-primary-500: #6182ff;
    --vagovia-primary-600: #4c63f2;
    --vagovia-primary-700: #3b4de;
    --vagovia-primary-800: #2f3ab5;
    --vagovia-primary-900: #0d3975;
    --vagovia-primary-950: #0a2856;

    /* Varianti Secondario (Magenta) */
    --vagovia-secondary-50: #fef7ff;
    --vagovia-secondary-100: #fdeeff;
    --vagovia-secondary-200: #fbddff;
    --vagovia-secondary-300: #f7bbff;
    --vagovia-secondary-400: #f189ff;
    --vagovia-secondary-500: #ed278c;
    --vagovia-secondary-600: #d61c7a;
    --vagovia-secondary-700: #b01765;
    --vagovia-secondary-800: #8f1450;
    --vagovia-secondary-900: #75123f;
    --vagovia-secondary-950: #4a0726;

    /* Grigi e Neutri */
    --vagovia-gray-50: #f9fafb;
    --vagovia-gray-100: #f3f4f6;
    --vagovia-gray-200: #e5e7eb;
    --vagovia-gray-300: #d1d5db;
    --vagovia-gray-400: #9ca3af;
    --vagovia-gray-500: #6b7280;
    --vagovia-gray-600: #4b5563;
    --vagovia-gray-700: #374151;
    --vagovia-gray-800: #1f2937;
    --vagovia-gray-900: #111827;

    /* Colori di Stato */
    --vagovia-success: #10b981;
    --vagovia-warning: #f59e0b;
    --vagovia-error: #ef4444;
    --vagovia-info: #3b82f6;

    /* Shadows */
    --vagovia-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --vagovia-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --vagovia-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --vagovia-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --vagovia-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --vagovia-radius-sm: 0.25rem;
    --vagovia-radius: 0.375rem;
    --vagovia-radius-md: 0.5rem;
    --vagovia-radius-lg: 0.75rem;
    --vagovia-radius-xl: 1rem;
    --vagovia-radius-2xl: 1.5rem;

    /* Spacing */
    --vagovia-spacing-xs: 0.5rem;
    --vagovia-spacing-sm: 0.75rem;
    --vagovia-spacing: 1rem;
    --vagovia-spacing-md: 1.5rem;
    --vagovia-spacing-lg: 2rem;
    --vagovia-spacing-xl: 3rem;
    --vagovia-spacing-2xl: 4rem;
}

/* ========================================
   UTILITY CLASSES PERSONALIZZATE
   ======================================== */

/* Colori di Testo */
.text-vagovia-primary { color: var(--vagovia-primary) !important; }
.text-vagovia-secondary { color: var(--vagovia-secondary) !important; }
.text-vagovia-neutral { color: var(--vagovia-neutral) !important; }
.text-vagovia-accent { color: var(--vagovia-accent) !important; }

/* Colori di Background */
.bg-vagovia-primary { background-color: var(--vagovia-primary) !important; }
.bg-vagovia-secondary { background-color: var(--vagovia-secondary) !important; }
.bg-vagovia-neutral { background-color: var(--vagovia-neutral) !important; }
.bg-vagovia-accent { background-color: var(--vagovia-accent) !important; }
.bg-vagovia-light { background-color: var(--vagovia-light) !important; }

/* Sfondi Solidi VagoVia */
.bg-gradient-vagovia-primary {
    background: var(--vagovia-primary) !important;
}

.bg-gradient-vagovia-secondary {
    background: var(--vagovia-secondary) !important;
}

.bg-gradient-vagovia-mixed {
    background: var(--vagovia-primary) !important;
}

/* Bordi */
.border-vagovia-primary { border-color: var(--vagovia-primary) !important; }
.border-vagovia-secondary { border-color: var(--vagovia-secondary) !important; }

/* ========================================
   COMPONENTI COMUNI
   ======================================== */

/* Pulsanti VagoVia */
.btn-vagovia-primary {
    background-color: var(--vagovia-primary);
    border-color: var(--vagovia-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--vagovia-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-vagovia-primary:hover {
    background-color: var(--vagovia-primary-800);
    border-color: var(--vagovia-primary-800);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--vagovia-shadow-md);
}

.btn-vagovia-secondary {
    background-color: var(--vagovia-secondary);
    border-color: var(--vagovia-secondary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--vagovia-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-vagovia-secondary:hover {
    background-color: var(--vagovia-secondary-700);
    border-color: var(--vagovia-secondary-700);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--vagovia-shadow-md);
}

.btn-vagovia-outline {
    background-color: transparent;
    border: 2px solid var(--vagovia-primary);
    color: var(--vagovia-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--vagovia-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-vagovia-outline:hover {
    background-color: var(--vagovia-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--vagovia-shadow-md);
}

/* Cards VagoVia */
.card-vagovia {
    background: white;
    border-radius: var(--vagovia-radius-lg);
    box-shadow: var(--vagovia-shadow);
    border: 1px solid var(--vagovia-gray-200);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-vagovia:hover {
    box-shadow: var(--vagovia-shadow-lg);
    transform: translateY(-2px);
}

.card-vagovia-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--vagovia-gray-200);
    background: var(--vagovia-gray-50);
}

.card-vagovia-body {
    padding: 1.5rem;
}

.card-vagovia-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--vagovia-gray-200);
    background: var(--vagovia-gray-50);
}

/* Form Elements */
.form-control-vagovia {
    border: 2px solid var(--vagovia-gray-300);
    border-radius: var(--vagovia-radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control-vagovia:focus {
    border-color: var(--vagovia-primary);
    box-shadow: 0 0 0 3px rgba(13, 57, 117, 0.1);
    outline: none;
}

.form-label-vagovia {
    color: var(--vagovia-neutral);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Alert/Notifications */
.alert-vagovia-success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 1rem;
    border-radius: var(--vagovia-radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert-vagovia-error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--vagovia-radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert-vagovia-warning {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 1rem;
    border-radius: var(--vagovia-radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert-vagovia-info {
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1rem;
    border-radius: var(--vagovia-radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* ========================================
   COMPONENTI SPECIFICI LAVORA-CON-NOI
   ======================================== */

/* Hero Section */
.hero-vagovia {
    background: var(--vagovia-primary);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-vagovia::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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* List Styling per Lavora Con Noi */
.list-vagovia {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.list-vagovia li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    color: var(--vagovia-neutral);
}

.list-vagovia li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--vagovia-secondary);
    font-weight: bold;
    font-size: 1.1em;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--vagovia-secondary-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Image Styling */
.image-vagovia {
    border-radius: var(--vagovia-radius-lg);
    box-shadow: var(--vagovia-shadow-lg);
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-vagovia:hover {
    transform: scale(1.02);
    box-shadow: var(--vagovia-shadow-xl);
}

/* Recruiting Image Specific */
.image-recruiting-vagovia {
    position: relative;
    width: 100%;
    height: 300px;
    background: var(--vagovia-primary);
    background-image: url("../../media/img/lavora-con-noi/WE-ARE-HIRING-1200x800.png");
    background-size: cover;
    background-position: center;
    border-radius: var(--vagovia-radius-lg);
    box-shadow: var(--vagovia-shadow-lg);
    overflow: hidden;
}

.image-recruiting-vagovia::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 57, 117, 0.2);
}

/* Section Styling */
.section-vagovia {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--vagovia-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--vagovia-neutral);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumb-vagovia {
    background: var(--vagovia-light);
    padding: 1rem 0;
    border-bottom: 1px solid var(--vagovia-gray-200);
}

.breadcrumb-vagovia ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-vagovia li {
    display: flex;
    align-items: center;
}

.breadcrumb-vagovia li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--vagovia-gray-400);
}

.breadcrumb-vagovia a {
    color: var(--vagovia-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-vagovia a:hover {
    color: var(--vagovia-secondary);
}

.breadcrumb-vagovia .current {
    color: var(--vagovia-neutral);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* Prevenire overflow orizzontale */
    body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }

    .hero-vagovia {
        padding: 2rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
        line-height: 1.2;
        word-wrap: break-word;
    }

    .btn-vagovia-primary,
    .btn-vagovia-secondary,
    .btn-vagovia-outline {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .card-vagovia-body {
        padding: 1rem;
    }

    .image-recruiting-vagovia {
        height: 200px;
    }

    /* Correggere layout grid su mobile */
    .grid {
        display: block !important;
    }

    .grid > * {
        margin-bottom: 1rem;
    }

    /* Assicurarsi che i form non escano dal contenitore */
    .form-control-vagovia {
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-vagovia {
        padding: 1.5rem 0;
    }

    .card-vagovia-header,
    .card-vagovia-body,
    .card-vagovia-footer {
        padding: 1rem;
    }

    /* Text sizing su schermi molto piccoli */
    .text-4xl {
        font-size: 1.5rem !important;
    }

    .text-3xl {
        font-size: 1.25rem !important;
    }

    .text-2xl {
        font-size: 1.125rem !important;
    }

    /* Padding ridotto */
    .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* ========================================
   ANIMAZIONI
   ======================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Delay classes for staggered animations */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ========================================
   COMPATIBILITÀ BOOTSTRAP OVERRIDE
   ======================================== */

/* Override Bootstrap colors with VagoVia theme */
.btn-primary {
    background-color: var(--vagovia-primary) !important;
    border-color: var(--vagovia-primary) !important;
}

.btn-primary:hover {
    background-color: var(--vagovia-primary-800) !important;
    border-color: var(--vagovia-primary-800) !important;
}

.text-primary {
    color: var(--vagovia-primary) !important;
}

.bg-primary {
    background-color: var(--vagovia-primary) !important;
}

.border-primary {
    border-color: var(--vagovia-primary) !important;
}

/* ========================================
   UTILITIES AGGIUNTIVE
   ======================================== */

.shadow-vagovia { box-shadow: var(--vagovia-shadow); }
.shadow-vagovia-md { box-shadow: var(--vagovia-shadow-md); }
.shadow-vagovia-lg { box-shadow: var(--vagovia-shadow-lg); }
.shadow-vagovia-xl { box-shadow: var(--vagovia-shadow-xl); }

.rounded-vagovia { border-radius: var(--vagovia-radius); }
.rounded-vagovia-md { border-radius: var(--vagovia-radius-md); }
.rounded-vagovia-lg { border-radius: var(--vagovia-radius-lg); }
.rounded-vagovia-xl { border-radius: var(--vagovia-radius-xl); }

.transition-vagovia {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--vagovia-shadow-lg);
}

/* ========================================
   BADGES SYSTEM
   ======================================== */

.badge-vagovia-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--vagovia-primary);
    color: var(--vagovia-primary);
    transition: all 0.2s ease;
}

.badge-vagovia-outline:hover {
    background-color: var(--vagovia-primary);
    color: var(--vagovia-white);
}

.badge-vagovia-solid {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--vagovia-primary);
    color: var(--vagovia-white);
    transition: all 0.2s ease;
}

.badge-vagovia-solid:hover {
    background-color: var(--vagovia-primary-600);
}

.badge-vagovia-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--vagovia-secondary);
    color: var(--vagovia-white);
    transition: all 0.2s ease;
}

.badge-vagovia-secondary:hover {
    background-color: var(--vagovia-secondary-600);
}

/* ========================================
   CHECKBOX CUSTOMIZATION
   ======================================== */

.checkbox-vagovia {
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.checkbox-vagovia:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--vagovia-primary-200);
}

.checkbox-vagovia:hover {
    border-color: var(--vagovia-primary-300);
}

.checkbox-vagovia:checked {
    background-color: var(--vagovia-primary);
    border-color: var(--vagovia-primary);
}
