/* Colorado Firefighter Magazine - Main Styles */

/* Base Styles
   Body = Libre Franklin (set via Tailwind font-sans too); display serif (Cinzel)
   is applied through the .font-display utility. Do NOT force a universal
   font-family here — it would override the masthead serif. */
html {
    overflow-x: hidden;
}

body {
    font-family: 'Libre Franklin', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #16202E;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Hero Background — brand navy with a subtle fire glow (no cropped low-res photo).
   This removes the mobile blur/crop problem entirely.
   ALT (build-both, decide live): to layer a faint darkened firefighter photo as
   texture, uncomment the url(...) line below — it sits under the gradients. */
.hero-section {
    background:
        radial-gradient(1100px 520px at 78% 12%, rgba(242, 106, 33, 0.20), transparent 60%),
        radial-gradient(900px 600px at 8% 95%, rgba(191, 10, 48, 0.22), transparent 55%),
        linear-gradient(160deg, #0B2545 0%, #0E2748 55%, #081A33 100%);
    position: relative;
    overflow: hidden;
}

/* Large screens: production-style hero — the new (factually accurate) Marshall
   Fire photo as a full background, with a left-weighted NAVY scrim so the
   left-aligned headline stays legible. Deliberately navy-only (no translucent
   red/ember over the photo — that washes to pink, which Steven dislikes).
   Mobile keeps the gradient-only treatment above. */
@media (min-width: 1024px) {
    .hero-section {
        background:
            linear-gradient(90deg, rgba(8, 20, 40, 0.94) 0%, rgba(11, 37, 69, 0.80) 40%, rgba(11, 37, 69, 0.46) 72%, rgba(8, 26, 51, 0.34) 100%),
            url('/images/marshall-fire-hero.webp') center/cover no-repeat;
    }
}

/* Keep hero copy crisp over the dark background */
.hero-section h1,
.hero-section p {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* The red "FIREFIGHTER" word (Colorado-flag red #BF0A30) is the lowest-contrast
   element in the hero — ~2.4:1 on navy, and worse over the bright flame areas of
   the desktop photo. A tight dark halo plus a soft glow lifts it off both
   backgrounds so the saturated red stays legible without changing the color
   Steven asked for. Custom CSS because the prebuilt Tailwind subset purges
   arbitrary drop-shadow utilities (they silently no-op). */
.hero-section h1 .hero-firefighter {
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.85),
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 2px 18px rgba(0, 0, 0, 0.6);
}

/* Current Issue — the issue cover sits beside the copy on desktop only.
   Below lg the cover is hidden (it lives in the hero on mobile/tablet) and the
   copy spans full width. Done in custom CSS because the prebuilt Tailwind subset
   (tailwind.min.css) purges lg:grid-cols-2 / max-w-sm, which silently no-op. */
.issue-cover-img {
    max-width: 22rem;
}

@media (min-width: 1024px) {
    .issue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Current-issue cover — gold frame, slight tilt, shown sharp at natural aspect */
.cover-frame {
    position: relative;
    width: 100%;
    max-width: 350px;
    padding: 10px;
    border-radius: 0.6rem;
    background: linear-gradient(160deg, #FFD24F 0%, #FFC72C 45%, #E0A800 100%);
    box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: rotate(-1.6deg);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.cover-frame:hover {
    transform: rotate(0deg) translateY(-6px);
}

.cover-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.4rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.cover-badge {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #BF0A30;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(11, 37, 69, 0.18);
}

/* Gradient text — fire (red → ember) */
.gradient-text {
    background: linear-gradient(135deg, #BF0A30 0%, #F26A21 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gold rule divider — echoes the cover's dashed rules */
.rule-gold {
    height: 3px;
    width: 64px;
    border: 0;
    background: linear-gradient(90deg, #FFC72C, #F26A21);
    border-radius: 999px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0B2545;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #BF0A30;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 37, 69, 0.72);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Mobile menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
    max-height: 600px;
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Button pulse effect — fire-red */
.btn-pulse {
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(191, 10, 48, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(191, 10, 48, 0); }
}
