/*
 * File: styles.css
 * Description: Custom CSS styles for the Relivement Revolution website.
 * 
 * Defines the visual styling for the entire website, including color variables,
 * typography, layout, components, animations, and responsive design rules.
 * Implements a consistent brand identity across all pages.
 * 
 * Last modified: 2025-03-30
 */

/* General Styles */
:root {
    --primary-color: #3a6ea5;
    --secondary-color: #6c757d;
    --accent-color: #f39c12;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: #2a5080;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #2a5080;
    border-color: #2a5080;
}

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

/* Header Styles */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.navbar-light .navbar-nav .nav-link {
    color: #555;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(58, 110, 165, 0.8), rgba(58, 110, 165, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

/* Highlight the "live" in "Relivement" */
.highlight-live {
    color: var(--accent-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* Subtle pulse animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hero .lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Main Content - Fixed for whitespace issues */
.main-content {
    padding: 0 !important;
    margin-top: 0 !important;
}

/* Remove spacing between header containers and content */
.container:has(h1) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Eliminate spacing between lead paragraph and next content */
.lead {
    margin-bottom: 0 !important;
}

.sidebar {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
}

.sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Featured Stories Section */
.featured-stories {
    background-color: #f8f9fa;
    padding: 4rem 0;
    text-align: center;
}

.featured-stories h2 {
    margin-bottom: 0.5rem;
}

.featured-stories p {
    margin-bottom: 3rem;
    color: #6c757d;
}

.page-header {
    padding: 0.5rem 0; /* Reduced from 1rem */
    margin-bottom: 0.5rem; /* Reduced from 1rem */
}

.story-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
}

.story-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.story-content {
    padding: 1.5rem;
}

/* Forms */
.form-control {
    padding: 0.75rem 1rem;
}

.newsletter-form .input-group {
    margin-bottom: 0;
}

/* Events */
.event-item {
    margin-bottom: 1.5rem;
}

.event-date {
    color: var(--primary-color);
    font-weight: 700;
}

/* Articles */
.article-preview {
    margin-bottom: 1rem;
}

.article-preview h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.article-preview .date {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Table-Based Journey Styles - Cleaned Up */
.journey-table {
    border: 1px solid #eee;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0;
}

.journey-table tbody tr {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.journey-table tr.completed {
    border-left: 3px solid var(--success-color);
}

.journey-table tr.in-progress {
    border-left: 3px solid var(--primary-color);
}

.journey-table tr.available {
    border-left: 3px solid #17a2b8;
}

/* Highlight the next available step */
.journey-table tr.next-step {
    background-color: rgba(23, 162, 184, 0.08);
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.2);
    position: relative;
}

.journey-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.journey-table tr.next-step:hover {
    background-color: rgba(23, 162, 184, 0.1);
}

.journey-table td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Clean icon style without background */
.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.progress-text {
    font-size: 0.8rem;
    color: #6c757d;
    min-width: 36px;
    text-align: right;
}

/* Footer */
footer {
    background-color: var(--dark-color);
}

footer h4 {
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h4:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

footer ul li {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.2rem;
    }
    
    .main-content {
         padding-top: 0 !important;
    padding-bottom: 1rem;
    }
    
    .featured-stories {
        padding: 3rem 0;
    }
}

@media (max-width: 576px) {
    .status-cell, .name-cell, .progress-cell, .action-cell {
        display: table-cell !important;
    }
    
    .progress-cell {
        width: 120px !important;
    }
    
    .name-cell strong {
        font-size: 0.85rem;
    }
}

/* Global fix for header whitespace issues */
.container h1 + .lead {
    margin-bottom: 0.5rem !important;
}

.container:has(h1) {
    margin-bottom: 0 !important;
}

.main-content {
    padding-top: 0.5rem !important;
}

/* Fix for any container with mt-3 class */
.container.mt-3 {
    margin-bottom: 0 !important;
}

/* Fix for adjacent containers */
.container + .container {
    margin-top: 0 !important;
}

/* Fix specific container spacing issues */
.container.main-content {
    margin-top: 0 !important;
}

/* Remove space between page header and main content */
.page-header + .container.main-content,
.container:has(h1) + .container.main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Add spacing between bottom buttons and page bottom /
.card-body .d-flex.justify-content-between {
margin-bottom: 1.5rem; / Adds space below the button row */
}
/* Alternative approach that targets all button groups at the bottom of containers */
.card-body > .d-flex.justify-content-between,
.container > .d-flex.justify-content-between,
.main-content > .d-flex.justify-content-between {
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
}
/* Add padding to the bottom of the card/container when it contains buttons */
.card(.d-flex.justify-content-between),
.container(.d-flex.justify-content-between) {
padding-bottom: 1rem;
}

/* More specific CSS targeting for button spacing at page bottom */

/* Target the card body that contains buttons */
.card-body {
    padding-bottom: 2rem !important;
}

/* Target buttons container specifically */
.d-flex.justify-content-between {
    margin-bottom: 1.5rem;
}

/* Target the main card containing the form */
.card.mb-4 {
    margin-bottom: 2rem !important;
}

/* Add spacing to the bottom of the form itself */
#future-design-form {
    margin-bottom: 1.5rem;
}

/* Add space to the bottom of the main container */
.container.main-content {
    padding-bottom: 2rem !important;
}

/* Ensure bottom margin on any last element in a form */
form > *:last-child {
    margin-bottom: 1.5rem !important;
}