/* ===== VARIABLES ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-dark: #2c3e50;
    --primary-darker: #34495e;
    --shadow-light: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 15px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.2);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* ===== BASE STYLES ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.min-vh-100 {
    min-height: 100vh;
}

/* ===== HERO SECTIONS ===== */
/* ===== HERO SECTIONS ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%), 
                var(--hero-image, url('/static/images/default-hero.jpg')) center/cover;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

.project-hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%), 
                var(--project-hero-image) center/cover;
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

/* Ensure text is readable on hero sections */
.hero-section h1,
.hero-section p,
.hero-section .breadcrumb-item a,
.project-hero-section h1,
.project-hero-section p,
.project-hero-section .breadcrumb-item a {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .breadcrumb-item.active,
.project-hero-section .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== CARDS ===== */
.project-card,
.blog-card,
.album-card,
.trip-card,
.photo-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.project-card:hover,
.blog-card:hover,
.album-card:hover,
.trip-card:hover,
.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.card {
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-heavy);
}

/* ===== NAVIGATION ===== */
.navbar-dark {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%) !important;
}

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

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-medium);
    border-radius: 10px;
}

.dropdown-item {
    border-radius: 5px;
    margin: 2px 5px;
    width: auto;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-gradient);
    color: white;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: var(--primary-gradient);
}

.btn-outline-primary {
    border-radius: 8px;
    transition: var(--transition);
}

/* ===== BADGES ===== */
.badge {
    border-radius: 8px;
    font-weight: 500;
}

.category-badge {
    font-size: 0.8em;
}

/* Event type colors for calendar */
.event-birthday { color: #dc3545; }
.event-anniversary { color: #6f42c1; }
.event-holiday { color: #fd7e14; }
.event-gathering { color: #20c997; }
.event-trip { color: #0dcaf0; }
.event-milestone { color: #ffc107; }
.event-other { color: #6c757d; }

.bg-birthday { background-color: #dc3545; }
.bg-anniversary { background-color: #6f42c1; }
.bg-holiday { background-color: #fd7e14; }
.bg-gathering { background-color: #20c997; }
.bg-trip { background-color: #0dcaf0; }
.bg-milestone { background-color: #ffc107; }
.bg-other { background-color: #6c757d; }

/* ===== PROGRESS BARS ===== */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: var(--primary-gradient);
}

/* ===== AVATARS ===== */
.member-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    margin-top: auto;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ===== CALENDAR STYLES ===== */
.events-list {
    max-height: 80px;
    overflow-y: auto;
}

.event-item {
    font-size: 0.75rem;
}

.table td {
    border: 1px solid #dee2e6;
}

/* ===== BLOG CONTENT ===== */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

/* ===== UTILITY CLASSES ===== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 60px 0;
    }
    
    .project-hero-section {
        min-height: 50vh;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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

/* ===== FORM STYLES ===== */
.form-control {
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: var(--transition);
}

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

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-dismissible .btn-close {
    padding: 1rem;
}