/* 
 * style.css - Viaggiare con Gusto
 * Palette Colori Blu - Mobile First
 */

:root {
    /* Palette Colori Blu */
    --primary-color: #2c5aa0;
    --primary-dark: #1e4177;
    --primary-light: #4a7bc8;
    --secondary-color: #5b9bd5;
    --accent-color: #a3c6e8;
    --light-bg: #f0f7ff;
    --dark-bg: #1a2332;
    
    /* Colori di Sistema */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Tipografia */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-color);
}

/* Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

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

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand i {
    color: var(--primary-color);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.svg') repeat;
    opacity: 0.1;
}

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

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Search Box */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.search-box .form-select,
.search-box .form-control {
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.search-box .form-select:focus,
.search-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.15);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 5;
}

.itinerary-card {
    position: relative;
}

.itinerary-card-img {
    position: relative;
    overflow: hidden;
}

.itinerary-card-img img {
    transition: transform 0.3s ease;
}

.itinerary-card:hover .itinerary-card-img img {
    transform: scale(1.1);
}

.itinerary-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.itinerary-meta i {
    color: var(--primary-color);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-color);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Section */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Stats */
.stats-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.stats-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-card p {
    color: #666;
    margin: 0;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.15);
}

.form-control::placeholder {
    color: #999;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--accent-color) !important;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 35, 50, 0.95);
    color: white;
    padding: 1.5rem 0;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
}

/* Tables */
.table {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: var(--light-bg);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-dark);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.spinner-border {
    color: var(--primary-color);
}

/* Calendar */
.calendar {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.calendar-day {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.calendar-day.available {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.calendar-day.sold-out {
    background-color: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Price Tag */
.price-tag {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-tag small {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

/* Alert */
.alert {
    border-radius: var(--radius-md);
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 767px) {
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .search-box {
        padding: 1.5rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
}

/* Utility Classes */
.text-muted {
    color: #666 !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Print Styles */
@media print {
    .navbar,
    footer,
    .cookie-banner,
    .back-to-top {
        display: none;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification i {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-notification span {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #000;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success i {
    color: #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-error i {
    color: #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-warning i {
    color: #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info i {
    color: #17a2b8;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
    
    .toast-notification {
        transform: translateY(-100px);
    }
}
