/*
 * style.css
 * Consolidated styles from community.html and speed_climbing_history.html.
 * Note: Styles from other files (index, sub-5-stars, undisputed, risingstars)
 * are primarily defined using Tailwind CSS utility classes and are not included here.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
}

/* --- Common Styles (Back Link) --- */
.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    padding: 12px 24px; /* Adjusted to 12px 24px for community.html consistency */
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Styles unique to community.html */
    border: 2px solid #ff0000;
}

.back-link:hover {
    background: #ff3333;
    transform: translateX(-5px);
    /* Styles unique to community.html */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

/* Style unique to speed_climbing_history.html for the chevron */
.back-link.history-chevron::before {
    content: '←';
    font-size: 1.2em;
}

/* --- Hero Section Styles (Used by both) --- */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    padding: 80px 20px 60px;
    text-align: center;
    border-bottom: 3px solid #ff0000;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 48%, #333 48%, #333 52%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, #333 48%, #333 52%, transparent 52%);
    background-size: 60px 60px;
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.speed-hold-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.speed-hold {
    width: 100%;
    height: 100%;
    background-image: url('logo_small.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(255, 0, 0, 0.4));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- Digital/Community Theme Variant (With Logo) --- */

/* 1. Base Container: Changes outer ring to Cyan/Blue */
.speed-hold-icon.digital-theme {
    border-color: rgba(0, 210, 255, 0.5); 
}

/* 2. The Hold Itself: Logo + Blue Pulse */
.speed-hold-icon.digital-theme .speed-hold {
    /* ENSURE the logo is visible */
    background-image: url('logo_small.png');
    background-size: contain; /* Ensures the whole logo fits */
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000; /* Optional: White background helps logo pop against the blue glow */
    
    /* APPLY the Blue Pulse Animation */
    animation: bluePulse 2s infinite;
}

/* 3. The Blue Pulse Animation Keyframes */
@keyframes bluePulse {
    0% {
        /* Start with a tight, semi-transparent cyan shadow */
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.7);
    }
    70% {
        /* Expand the shadow outward and fade it to transparent */
        box-shadow: 0 0 0 15px rgba(0, 210, 255, 0);
    }
    100% {
        /* Reset */
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
    }
}

h1 {
    font-size: 3em;
    margin-bottom: 15px;
    color: #ff0000;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.3em;
    color: #ccc;
    margin-bottom: 10px;
}

.byline {
    font-size: 1em;
    color: #999;
    font-style: italic;
    margin-top: 20px;
}

.byline strong {
    color: #ff0000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2.5em;
    color: #ff0000;
    text-transform: uppercase;
}

/* --- Styles Unique to community.html --- */

.section-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.section-icon svg {
    width: 100%;
    height: 100%;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.climber-card {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #333;
    transition: all 0.3s ease;
    position: relative;
}

.climber-card:hover {
    border-color: #ff0000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.climber-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    opacity: 0.6;
}

.climber-icon svg {
    width: 100%;
    height: 100%;
}

.climber-name {
    font-size: 1.6em;
    color: #ff0000;
    margin-bottom: 8px;
}

.climber-country {
    font-size: 1em;
    color: #999;
    margin-bottom: 15px;
}

.climber-stat {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #333;
    font-size: 0.95em;
}

.climber-stat:first-child {
    border-top: none;
    padding-top: 0;
}

.stat-label {
    color: #999;
}

.stat-value {
    color: #ff0000;
    font-weight: bold;
}

.climber-bio {
    margin-top: 15px;
    color: #ccc;
    font-size: 0.95em;
    line-height: 1.6;
}

.voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.voice-card {
    background: #1a1a1a;
    padding: 0;
    border-radius: 10px;
    border: 2px solid #333;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 400px;
}

.voice-card:hover {
    border-color: #ff0000;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.instagram-embed-container {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-embed-container blockquote {
    margin: 0 !important;
    min-width: 326px;
}

.competition-section {
    background: linear-gradient(135deg, #2a0a0a 0%, #1a1a1a 100%);
    padding: 40px;
    border-radius: 10px;
    border: 2px solid #ff0000;
    margin: 40px 0;
}

.competition-section h3 {
    color: #ff0000;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #333;
    transition: all 0.3s ease;
    position: relative;
    padding-top: 80px;
}

.stat-card:hover {
    border-color: #ff0000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.stat-icon {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

.stat-number {
    font-size: 2.5em;
    color: #ff0000;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    color: #ccc;
    font-size: 1.1em;
}

.edit-instructions {
    background: rgba(255, 0, 0, 0.05);
    border: 1px dashed #ff0000;
    padding: 25px;
    border-radius: 10px;
    margin: 40px 0;
    color: #ff9999;
    font-size: 0.95em;
}

.edit-instructions h4 {
    color: #ff0000;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.edit-instructions code {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #ff6666;
}

.edit-instructions p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* --- Styles Unique to speed_climbing_history.html --- */
.intro-section {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 40px;
    border-left: 5px solid #ff0000;
}

.intro-section p {
    font-size: 1.2em;
    line-height: 1.8;
    color: #ddd;
}

.timeline-section {
    margin: 60px 0;
}

.timeline-item {
    background: #1a1a1a;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    border-left: 5px solid #ff0000;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 30px;
    width: 25px;
    height: 25px;
    background: #ff0000;
    border-radius: 50%;
    border: 3px solid #000;
}

.timeline-year {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.timeline-item h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #fff;
}

.timeline-item p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #ccc;
}

.callout {
    background: linear-gradient(135deg, #2a0a0a 0%, #1a1a1a 100%);
    padding: 25px;
    margin: 30px 0;
    border-radius: 10px;
    border: 2px solid #ff0000;
    position: relative;
}

.callout::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.callout.key-question::before {
    content: '?';
    clip-path: none;
    background: #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    line-height: 40px;
    text-align: center;
}

.callout.problem::before {
    content: '✕';
    clip-path: none;
    background: #ff0000;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    line-height: 40px;
    text-align: center;
}

.callout.impact::before {
    content: '⚡';
    clip-path: none;
    background: #ff0000;
    border-radius: 50%;
    font-size: 24px;
    line-height: 40px;
    text-align: center;
}

.callout.record::before {
    content: '▲';
    clip-path: none;
    background: #ff0000;
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    line-height: 40px;
    text-align: center;
    border-radius: 5px;
}

.callout.solution::before {
    content: '✓';
    clip-path: none;
    background: #00cc00;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    line-height: 40px;
    text-align: center;
}

.callout.boost::before {
    content: '↗';
    clip-path: none;
    background: #ff0000;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    line-height: 40px;
    text-align: center;
}

.callout-title {
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.callout p {
    color: #ddd;
    line-height: 1.8;
}

.stat-card .stat-icon { /* Specificity for the history page's stats grid */
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.quote-section {
    background: linear-gradient(135deg, #1a0a0a 0%, #0a0a0a 100%);
    padding: 40px;
    margin: 50px 0;
    border-radius: 10px;
    border-left: 5px solid #ff0000;
    font-style: italic;
    font-size: 1.3em;
    color: #ddd;
}

.quote-section::before {
    content: '"';
    font-size: 4em;
    color: #ff0000;
    line-height: 0;
    display: block;
    margin-bottom: 20px;
}

.quote-author {
    text-align: right;
    margin-top: 20px;
    font-style: normal;
    color: #ff0000;
    font-weight: bold;
}

.citation {
    color: #ff0000;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.8em;
    vertical-align: super;
    margin-left: 2px;
}

.citation:hover {
    text-decoration: underline;
}

.controversy-box {
    background: #1a1a00;
    border: 2px solid #cc9900;
    padding: 30px;
    margin: 40px 0;
    border-radius: 10px;
}

.controversy-box h3 {
    color: #ffcc00;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.controversy-box p {
    color: #ddd;
    line-height: 1.8;
    margin-bottom: 15px;
}

.conclusion-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    padding: 50px;
    margin-top: 60px;
    border-radius: 10px;
    border: 3px solid #ff0000;
}

.conclusion-section h2 {
    color: #ff0000;
    margin-bottom: 25px;
    font-size: 2.5em;
}

.conclusion-section p {
    font-size: 1.2em;
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 20px;
}

.links-section {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
}

.link-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #0a0a0a;
    border-radius: 8px;
    border-left: 3px solid #ff0000;
    scroll-margin-top: 100px;
}

.link-item:target {
    background: #2a0a0a;
    border-left-color: #ff3333;
}

.link-number {
    background: #ff0000;
    color: #fff;
    font-weight: bold;
    min-width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-content {
    flex: 1;
}

.link-content a {
    color: #ff6666;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.link-content a:hover {
    color: #ff0000;
    text-decoration: underline;
}

.link-source {
    color: #999;
    font-size: 0.9em;
    margin-top: 5px;
}

/* --- Media Queries (Common) --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .section-header h2 {
        font-size: 1.8em;
    }

    .featured-grid, 
    .voices-grid, 
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        padding: 20px;
    }

    .intro-section,
    .conclusion-section {
        padding: 25px;
    }
}