//file: assets/css/style.css
/* ============================================
   RunInSingapore - Custom Styles
   ============================================ */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --text-dark: #212529;
    --text-light: #6c757d;
}

/* Base Fixes */
html, body {
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
	    background-image:
        linear-gradient(120deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35)),
        url('../images/homepage-hero.jpg');
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Cards - FIX FOR INFINITE STRETCHING */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto !important;
    flex: 0 0 auto !important;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    height: auto !important;
    flex: 0 0 auto !important;
}

/* Route Preview Container (for Strava embeds) */
.route-preview-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.route-preview-container iframe {
    border: none;
    pointer-events: none; /* Disabilita click sull'iframe */
}

.route-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    cursor: pointer;
    background: transparent;
    transition: background 0.3s ease;
}

.route-preview-overlay:hover {
    background: rgba(0, 0, 0, 0.05); /* Leggero overlay al hover */
}

/* Article Content */
.article-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
}

.article-content p {
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}

/* Section Headings */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    color: white !important;
    transition: color 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* Utility Classes */
.text-muted {
    color: var(--text-light) !important;
}

.bg-light-gradient {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}