/* Custom Styles für Reiseplanung App - Colorful Edition */

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #11998e;
    --danger-color: #eb3349;
    --warning-color: #f7971e;
    --info-color: #4facfe;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-ocean: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-forest: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #f8f9ff 0%, #ffffff 100%);
}

main {
    flex: 1;
}

/* Smooth transitions - removed universal selector to prevent click blocking */

/* Card hover effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(102, 126, 234, 0.2);
}

/* Destination cards */
.destination-card {
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.destination-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 1.5rem 4rem rgba(102, 126, 234, 0.3);
}

/* Make sure card content is above any overlay */
.destination-card .card-body,
.destination-card .card-footer {
    position: relative;
    z-index: 2;
}

/* Activity cards animation */
.activity-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    background: white;
}

/* Removed the purple border artifact */

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem rgba(102, 126, 234, 0.15);
}

/* Slider styling */
.form-range {
    height: 12px;
    background: linear-gradient(to right, #e0e7ff 0%, var(--primary-color) 100%);
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    background: var(--gradient-primary);
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    margin-top: -8px; /* Vertically center the thumb */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.form-range::-moz-range-thumb {
    width: 28px;
    height: 28px;
    cursor: pointer;
    background: var(--gradient-primary);
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.form-range::-moz-range-track {
    background: transparent;
    border: none;
}

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

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

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

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

/* Badge styling */
.badge {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    border-radius: 2rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.badge.bg-success {
    background: var(--gradient-forest) !important;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.badge.bg-info {
    background: var(--gradient-ocean) !important;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

/* Alert improvements */
.alert {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.alert-info {
    background: linear-gradient(135deg, #e0f7ff 0%, #f0f9ff 100%);
    color: #0c5776;
}

.alert-success {
    background: linear-gradient(135deg, #d4f8f2 0%, #e8fcf8 100%);
    color: #0d5748;
}

.alert-warning {
    background: linear-gradient(135deg, #fff4e6 0%, #fffaf0 100%);
    color: #974d0c;
}

/* Button enhancements */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: var(--gradient-primary) !important;
    color: white !important;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.btn-success {
    background: var(--gradient-forest) !important;
    color: white !important;
}

.btn-info {
    background: var(--gradient-ocean) !important;
    color: white !important;
}

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

.btn-outline-primary:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    border-color: transparent !important;
}

/* Navigation */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: none !important;
}

.navbar-brand:hover {
    transform: none !important;
    color: white !important;
}

/* Table improvements */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Page headers */
.display-4, .display-5 {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    color: #6c757d;
    font-weight: 500;
}

/* Card titles */
.card-title {
    color: var(--primary-color);
    font-weight: 700;
}

/* Shadow utilities */
.shadow-sm {
    box-shadow: 0 0.25rem 1rem rgba(102, 126, 234, 0.15) !important;
}

.shadow {
    box-shadow: 0 0.5rem 2rem rgba(102, 126, 234, 0.2) !important;
}

/* Form controls */
.form-control, .form-select {
    border: 2px solid #e0e7ff;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border-top: 2px solid #e0e7ff;
}

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

.slide-in {
    animation: slideInUp 0.6s ease-out;
}

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

/* Image overlays */
.card-img-top {
    transition: transform 0.5s ease;
    object-position: center;
}

.destination-card:hover .card-img-top {
    transform: scale(1.03);
}

/* Button group improvements */
.btn-group .btn {
    border-radius: 0.5rem;
    margin: 0 2px;
}

/* Table styling */
.table thead {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.fw-bold {
    padding-left: 0.5rem;
    padding-right: 0.5rem;

}
/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   DESTINATION PAGE STYLES
   ======================================== */

/* Activity card animations */
.activity-card {
    animation: fadeIn 0.5s ease-in;
}

/* Checkbox mode styling */
.activity-card-checkbox {
    transition: all 0.2s ease;
}

.activity-card-checkbox:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.form-check-input {
    width: 1.5em;
    height: 1.5em;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    margin-left: 0.5rem;
}

.sub-items {
    padding-left: 0.5rem;
}

.sub-item-card {
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.sub-item-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.sub-item-checkbox:disabled {
    cursor: not-allowed;
}

.sub-item-checkbox:disabled + label {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Points display */
.points-display {
    font-size: 1.5rem;
    font-weight: bold;
}

.points-used {
    color: #0d6efd;
}

.points-total {
    color: #6c757d;
}

.progress-bar {
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar.bg-warning {
    background-color: #ffc107 !important;
}

.progress-bar.bg-danger {
    background-color: #dc3545 !important;
}

.over-budget {
    color: #dc3545 !important;
}

/* Parents' Gift Section Styling */
.parents-gift-card {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
    transition: all 0.3s ease;
}

.parents-gift-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3) !important;
}

/* Disable hover effects on gift section header cards */
.row.mb-5 > .col > .card.shadow-sm.border-0:hover {
    transform: none !important;
    box-shadow: none !important;
}

.friends-gift-card {
    transition: all 0.3s ease;
}

.friends-gift-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(245, 87, 108, 0.3) !important;
}

.parents-gift-radio,
.friends-gift-radio {
    width: 1.8em;
    height: 1.8em;
    cursor: pointer;
}

.parents-gift-radio:checked + label,
.friends-gift-radio:checked + label {
    font-weight: 600;
}

.parents-gift-card .form-check,
.friends-gift-card .form-check {
    min-height: unset;
}

/* Activity Grid Card Styling */
.activity-grid-card {
    border: 1px solid #e0e0e0;
}

/* Disable hover effects on activity cards in slider mode */
.activity-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.activity-grid-card:hover {
    transform: none !important;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

/* Disable hover effects on category header cards */
.category-header-card {
    transition: none !important;
}

.category-header-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Disable hover effects on destination header and control sections */
.row.mb-4 > .col > .card:hover {
    transform: none !important;
    box-shadow: 0 0.5rem 2rem rgba(102, 126, 234, 0.2) !important;
}

/* Category image container for slider mode */
.slider-image-container {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.slider-image-container img {
    transition: all 0.3s ease;
}

/* Shrink category image when any sub-item is expanded */
.activity-grid-card:has(.sub-item-row.expanded) .slider-image-container img {
    height: 80px !important;
}

/* Sub-item image zoom in slider mode */
.sub-item-image-zoom {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 4px;
}

.sub-item-image-zoom:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Sub-item row hover effect */
.sub-item-row {
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sub-item-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Sub-item wrapper - default horizontal layout */
.sub-item-wrapper {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

/* Sub-item image container */
.sub-item-image-container {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Sub-item content container */
.sub-item-content {
    flex-grow: 1;
    transition: all 0.3s ease;
}

/* Expanded sub-item styling - vertical layout with centered image */
.sub-item-row.expanded {
    background-color: rgba(13, 110, 253, 0.05);
    padding: 1rem;
    margin: 0.5rem -0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sub-item-row.expanded .sub-item-wrapper {
    flex-direction: column;
    align-items: center;
}

.sub-item-row.expanded .sub-item-image-container {
    text-align: center;
    margin-bottom: 0.75rem;
}

.sub-item-row.expanded .sub-item-content {
    width: 100%;
}

.sub-item-row.expanded .sub-item-content > .d-flex {
    justify-content: center !important;
}

.sub-item-row.expanded .sub-item-image-zoom {
    width: 220px !important;
    height: 120px !important;
    transition: all 0.3s ease;
}

.sub-item-row .sub-item-image-zoom {
    transition: all 0.3s ease;
}

/* Image modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.image-modal-close:hover {
    color: #ccc;
}

/* Sub-items list with scrollbar */
.sub-items-list {
    max-height: 250px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

/* Increase max-height when any sub-item is expanded */
.activity-grid-card:has(.sub-item-row.expanded) .sub-items-list {
    max-height: 450px;
}

.sub-items-list::-webkit-scrollbar {
    width: 4px;
}

.sub-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sub-items-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.sub-items-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}
