/* ====================================
   2025 New Jersey Reporting Fellowship
   Shared Stylesheet
   ==================================== */

/* CSS Variables */
:root {
    --ccm-black: #000000;
    --ccm-red: #CA3553;
    --ccm-red-hover: #b02e48;
    --off-white: #fafafa;
    --warm-white: #f8f8f6;
    --gray-border: #ddd;
    --gray-text: #333;
    --gray-light: #666;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--gray-text);
    background-color: var(--warm-white);
}

/* ====================================
   Header / Masthead
   ==================================== */
.masthead {
    background: var(--ccm-black);
    color: white;
    padding: 1rem 0 0.5rem;
    border-bottom: 4px solid var(--ccm-red);
}

.masthead-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-logo {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.site-logo a {
    color: white;
    text-decoration: none;
}

.site-logo a:hover {
    color: var(--ccm-red);
}

/* ====================================
   Hero Banner
   ==================================== */
.hero-banner {
    background: white;
    border-bottom: 1px solid var(--gray-border);
}

.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--ccm-black);
    letter-spacing: -0.02em;
}

.hero-content .kicker {
    font-size: 1.125rem;
    color: var(--ccm-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.hero-content .dek {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-content .byline {
    font-size: 0.875rem;
    color: var(--gray-light);
    padding-top: 1rem;
    border-top: 1px solid var(--gray-border);
}

.hero-content .byline a {
    color: var(--ccm-red);
    text-decoration: none;
    font-weight: 600;
}

.hero-image-container {
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.image-credit {
    font-size: 0.75rem;
    color: var(--gray-light);
    margin-top: 0.5rem;
    font-style: italic;
}

@media (max-width: 968px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* ====================================
   Program Info Section
   ==================================== */
.program-info {
    background: var(--off-white);
    border-top: 3px solid var(--ccm-red);
    border-bottom: 1px solid var(--gray-border);
    padding: 2rem 0;
}

.program-info-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
    align-items: start;
}

.program-info-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
}

.program-info-content p:first-child {
    margin-bottom: 1rem;
}

.program-info-sidebar {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.sidebar-cta {
    display: inline-block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--ccm-red);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s;
    text-align: center;
}

.sidebar-cta:hover {
    background: var(--ccm-black);
}

@media (max-width: 968px) {
    .program-info-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ====================================
   Navigation Section
   ==================================== */
.nav-section {
    background: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gray-border);
    text-align: center;
}

.nav-section a {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--ccm-red);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s;
    margin: 0 0.5rem;
}

.nav-section a:hover {
    background: var(--ccm-black);
}

/* ====================================
   Filters Section (Stories Page)
   ==================================== */
.filters-section {
    background: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gray-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filters-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.search-input,
.filter-dropdown {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--gray-border);
    background: white;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--gray-text);
}

.search-input:focus,
.filter-dropdown:focus {
    outline: none;
    border-color: var(--ccm-red);
}

@media (max-width: 968px) {
    .filters-inner {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filters-section {
        padding: 1rem 0;
    }

    .filter-group label {
        font-size: 0.625rem;
        margin-bottom: 0.25rem;
    }

    .search-input,
    .filter-dropdown {
        padding: 0.5rem 0.625rem;
        font-size: 0.875rem;
    }
}

/* ====================================
   Stories Grid (Stories Page)
   ==================================== */
.stories-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem 2rem;
}

@media (max-width: 640px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }
}

/* Story Card - Editorial Style */
.story-card {
    background: white;
    border: 1px solid var(--gray-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    height: 100%;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.story-card.hidden {
    display: none;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
    color: var(--gray-light);
}

.card-outlet {
    color: var(--ccm-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.75rem;
}

.card-byline {
    margin-top: 0.125rem;
}

.card-date {
    margin-top: 0.125rem;
    font-size: 0.75rem;
}

.card-headline {
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--ccm-black);
}

.card-headline a {
    color: inherit;
    text-decoration: none;
}

.card-headline a:hover {
    color: var(--ccm-red);
}

.card-excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-text);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--off-white);
    border: 1px solid var(--gray-border);
    color: var(--gray-light);
}

.language-toggle {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-border);
}

.language-toggle-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--ccm-black);
    color: white;
    border: none;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.language-toggle-btn:hover {
    background: var(--ccm-red);
}

.card-link {
    display: inline-block;
    color: var(--ccm-red);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
}

.card-link:hover {
    color: var(--ccm-black);
}

.card-link::after {
    content: " →";
}

/* ====================================
   Fellows Grid (Fellows Page)
   ==================================== */
.fellows-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.fellows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem 2rem;
}

@media (max-width: 640px) {
    .fellows-grid {
        grid-template-columns: 1fr;
    }

    .fellow-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .fellow-avatar {
        width: 100px !important;
        height: 100px !important;
    }

    .fellow-initials {
        font-size: 2rem !important;
    }

    .fellow-name {
        font-size: 1.5rem !important;
    }
}

/* Fellow Card */
.fellow-card {
    background: white;
    border: 1px solid var(--gray-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    height: 100%;
    padding: 2rem 1.5rem;
}

.fellow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.fellow-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.fellow-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ccm-red) 0%, #d84464 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gray-border);
}

.fellow-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fellow-initials {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
}

.fellow-info {
    flex: 1;
    min-width: 0;
}

.fellow-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--ccm-black);
}

.fellow-publication {
    color: var(--ccm-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.875rem;
}

.fellow-bio {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.publication-link {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--off-white);
    color: var(--ccm-red);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid var(--ccm-red);
    transition: all 0.2s;
    margin-top: auto;
}

.publication-link:hover {
    background: var(--ccm-red);
    color: white;
}

/* ====================================
   Loading & Error States
   ==================================== */
.status-message {
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    color: var(--gray-light);
}

.loading {
    animation: pulse 2s ease-in-out infinite;
}

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

.error {
    color: var(--ccm-red);
}

/* ====================================
   Footer
   ==================================== */
.site-footer {
    background: var(--ccm-black);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-inner h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-inner p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.footer-inner a {
    color: var(--ccm-red);
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}

.footer-credit {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.875rem;
    opacity: 0.7;
}
