/* 
 * Custom styles for Science Festival
 * International College Theme - Green & Blue Color Palette
 * Easy to understand and modify
 */

/* Main body styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f7f4; /* Light green tint background */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero section at top of homepage - uses green to blue gradient */
.hero-section {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 50%, #17a2b8 100%);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Statistics boxes in hero section */
.stat-item {
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Project cards - these show each project */
.project-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    border-left: 4px solid #28a745; /* Green accent on left */
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
    border-left-color: #17a2b8; /* Changes to blue on hover */
}

/* Vote display styling */
.vote-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: #dc3545; /* Red for heart icon */
}

.vote-display-large {
    text-align: center;
}

/* Vote button with green theme */
.vote-btn {
    transition: all 0.3s ease;
    border-color: #28a745 !important;
    color: #28a745 !important;
}

.vote-btn:hover {
    transform: scale(1.05);
    background-color: #28a745 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Project content styling - for full project view */
.project-content h1,
.project-content h2,
.project-content h3,
.project-content h4,
.project-content h5,
.project-content h6 {
    color: #1e7e34; /* Dark green for headers */
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.project-content h1 {
    border-bottom: 3px solid #28a745; /* Green border */
    padding-bottom: 0.5rem;
}

.project-content h2 {
    border-bottom: 2px solid #17a2b8; /* Blue border */
    padding-bottom: 0.3rem;
}

.project-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #333; /* Ensure good contrast */
}

.project-content strong {
    color: #222; /* Darker for emphasis */
    font-weight: 600;
}

.project-content em {
    font-style: italic;
    color: #444;
}

/* Ensure card body text is readable */
.card-body {
    background-color: #ffffff !important;
    color: #333 !important;
}

/* Card headers ensure white text */
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Navbar/Header branding */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* General card styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: #ffffff !important;
    color: #333 !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 0 !important;
}

/* Card headers with green-blue gradient */
.card-header {
    background: linear-gradient(135deg, #28a745 0%, #17a2b8 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

/* Primary buttons with green theme */
.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* General button styling */
.btn {
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Badge/tag styling */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
}

/* Alert messages */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Footer spacing */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
}

/* Custom navbar with green-blue theme */
.navbar-dark.bg-primary {
    background: linear-gradient(90deg, #28a745 0%, #17a2b8 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    /* Hero section - smaller on mobile */
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    /* Stack filter and sort on mobile */
    .row.mb-4 form {
        flex-direction: column;
    }
    
    .row.mb-4 form label {
        margin-bottom: 0.5rem;
    }
    
    /* Full width buttons on mobile */
    .btn-lg {
        padding: 0.8rem 1rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Additional polish and animations */
.card {
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

/* Success button styling */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #17a589 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Info button styling */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Shadow effect on cards */
.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Smooth page transitions */
body {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Link styling */
a {
    transition: all 0.2s ease;
}

/* Badge improvements */
.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

/* Animation for vote button */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.vote-btn:active {
    animation: pulse 0.3s ease;
}

/* Custom scrollbar with green theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f0f7f4;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #28a745 0%, #17a2b8 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e7e34 0%, #138496 100%);
}

/* Project Carousel Styling */
.carousel-project-card {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
    padding: 3rem 2rem;
}

.carousel-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9) 0%, rgba(23, 162, 184, 0.9) 100%);
    z-index: 1;
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.carousel-badge-container {
    margin-bottom: 1.5rem;
}

.carousel-badge-container .badge {
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
}

.carousel-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-author {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.carousel-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.carousel-btn-container {
    margin-top: 1.5rem;
}

.carousel-item a {
    display: block;
    text-decoration: none;
}

.carousel-item a:hover .carousel-project-card {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(40, 167, 69, 0.8);
    border-radius: 50%;
    padding: 1.5rem;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators button.active {
    background-color: white;
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
    .carousel-project-card {
        min-height: 300px;
        padding: 2rem 1rem;
    }
    
    .carousel-title {
        font-size: 1.8rem;
    }
    
    .carousel-author {
        font-size: 1rem;
    }
    
    .carousel-description {
        font-size: 0.95rem;
    }
}

/* Comments section styling */
.comments-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ===== Login Page Specific Styles ===== */

/* Enhanced login page container - ensure good spacing from fixed navbar */
.login-page .container {
    margin-top: 1.5rem;
}

/* Login card improvements */
.card.shadow {
    max-width: 500px;
    margin: 2rem auto;
}

/* Login form labels - larger, bolder, more visible */
.card-body .form-label {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    display: block;
}

/* Ensure all card text elements are dark for readability */
.card,
.card p,
.card small,
.card .text-muted,
.card .form-text,
.card dd,
.card dt,
.card .comment-text,
.card .comment-time {
    color: #333 !important;
}

/* Keep only intentionally colored elements */
.card .alert-link,
.card a:not(.btn) {
    color: #28a745 !important;
}

.card .alert-link:hover,
.card a:not(.btn):hover {
    color: #1e7e34 !important;
}

/* Ensure alert info text is readable */
.card .alert-info {
    color: #004085 !important;
}

.card .alert-info .text-muted {
    color: #004085 !important;
}

/* Ensure badges remain visible */
.card .badge {
    color: #fff !important;
}

/* Login form inputs - improved visibility */
.card-body .form-control {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid #ced4da;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-body .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

.card-body .form-control::placeholder {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Card header text improvements */
.card-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}

.card-header p.small {
    font-size: 1rem;
    opacity: 0.95;
}

/* Submit button improvements */
.card-body .btn-lg {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
}

/* Alert box styling - demo accounts */
.card-body .alert-info {
    background-color: #e7f3ff;
    border: 2px solid #17a2b8;
    color: #004085;
    font-size: 0.95rem;
}

.card-body .alert-info .alert-heading {
    color: #004085;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-body .alert-info small {
    font-size: 0.9rem;
    line-height: 1.8;
}

.card-body .alert-info strong {
    font-weight: 700;
    color: #003366;
}

/* Register link visibility */
.card-body .text-center p {
    font-size: 1rem;
    color: #495057;
}

.card-body .text-center a {
    color: #28a745;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.card-body .text-center a:hover {
    color: #1e7e34;
    text-decoration: underline;
}

/* Horizontal rule styling */
.card-body hr {
    border-top: 2px solid #dee2e6;
    opacity: 1;
}

.comment-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-left: 3px solid #28a745;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: #e9f7ef;
    border-left-color: #17a2b8;
}

.comment-author {
    font-weight: 600;
    color: #1e7e34;
    margin-bottom: 0.5rem;
}

.comment-text {
    color: #495057;
    line-height: 1.6;
}

.comment-time {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Pre-written comment buttons */
.quick-comment-btn {
    margin: 0.25rem;
    background: #e9f7ef;
    border: 1px solid #28a745;
    color: #1e7e34;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quick-comment-btn:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}