/* The Personal Pantheon - Main Stylesheet */

:root {
    --primary-color: #4A90E2;
    --secondary-color: #E74C3C;
    --accent-color: #F39C12;
    --success-color: #27AE60;
    --warning-color: #F1C40F;
    --danger-color: #E74C3C;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --text-color: #2C3E50;
    --background-color: #F8F9FA;
}

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

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--accent-color);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #E1E8ED;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-label {
    font-weight: 600;
    color: var(--dark-color);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: var(--success-color);
    color: white;
}

.alert-danger {
    background-color: var(--danger-color);
    color: white;
}

.alert-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.alert-info {
    background-color: var(--primary-color);
    color: white;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

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

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

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cultural Image Library Styles */
.cultural-image-library {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.cultural-image-item {
    margin-bottom: 15px;
}

.cultural-image-card {
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.cultural-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cultural-image-buttons {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    border-radius: 0 0 6px 6px;
}

.cultural-image-card:hover .cultural-image-buttons {
    opacity: 1;
    pointer-events: auto;
}

.cultural-image-thumbnail img {
    max-height: 120px;
    object-fit: cover;
    width: 100%;
    border-radius: 4px;
}

.cultural-image-preview {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cultural-image-preview:hover {
    transform: scale(1.02);
}

.cultural-image-card .btn-outline-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.cultural-image-card .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Upload button styling */
.btn-outline-primary.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Image Timeline Styles */
.image-timeline-container {
    background: #f8f9fa;
    min-height: 120px;
}

.timeline-items {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #dee2e6;
}

.timeline-items::-webkit-scrollbar {
    height: 6px;
}

.timeline-items::-webkit-scrollbar-track {
    background: #dee2e6;
    border-radius: 3px;
}

.timeline-items::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 3px;
}

.timeline-items::-webkit-scrollbar-thumb:hover {
    background: #5a6268;
}

.timeline-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline-thumbnail img {
    border-radius: 4px;
}

.timeline-duration-overlay {
    bottom: 5px;
    left: 5px;
    right: 30px; /* Leave space for the trash button */
}

.timeline-duration-input {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    padding: 0.2rem 0.4rem !important;
    width: auto !important;
    min-width: 50px !important;
    max-width: 60px !important;
    text-align: center !important;
    color: #000 !important;
    font-weight: 500 !important;
}

.timeline-duration-input:focus {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.25) !important;
}

.timeline-remove-btn {
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.timeline-remove-btn:hover {
    opacity: 1;
}

.timeline-thumbnail:hover .timeline-remove-btn {
    opacity: 1;
}

/* Slideshow Preview Styles */
.slideshow-preview {
    height: 400px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.slideshow-preview-container {
    width: 100%;
}

/* Make timeline take full width */
.image-timeline-container {
    width: 100% !important;
}

.slideshow-preview-content {
    width: 100% !important;
    height: 100% !important;
}

.slideshow-preview-content img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 8px;
}

.slideshow-overlay {
    pointer-events: none;
}

.slideshow-overlay h5 {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}


.slideshow-overlay small {
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}
