/* Custom CSS for Case Stories Page */

:root {
  --crimson: #ED1A3B;
  --emerald: #009444;
  --light-gray: #f8f9fa;
  --border-gray: #dee2e6;
  --text-gray: #6c757d;
  --shadow-light: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 20px rgba(0,0,0,0.15);
}

/* Case Studies Page Section */
.case-studies-page-section {
    padding: 4rem 1rem;
    background-color: #f8f9fa;
}

/* Case Studies Container */
.case-studies-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Section */
.case-studies-header {
    text-align: center;
    margin-bottom: 3rem;
}

.case-studies-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--emerald);
    margin-bottom: 2rem;
}

.case-studies-intro {
    margin-bottom: 3rem;
}

.case-studies-text {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin-bottom: 1rem;
}

.case-studies-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    max-width: 600px;
}

/* Filter Controls */
.filter-controls {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-light);
}

.filter-controls h3 {
    color: var(--emerald);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid var(--border-gray);
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--emerald);
}

.clear-filters-btn {
    background: var(--crimson);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    align-self: end;
}

.clear-filters-btn:hover {
    background: #c01632;
}

/* Case Studies Grid - Clean Card Layout */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

/* Case Study Cards - Clean White Card Design */
.case-study-card {
    background: white !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    display: block !important;
    position: relative !important;
}

.case-study-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

.case-study-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

.case-study-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.case-study-image {
    height: 240px !important;
    overflow: hidden !important;
    position: relative !important;
    border-radius: 16px 16px 0 0 !important;
    flex-shrink: 0 !important;
}

.case-study-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
    display: block !important;
}

.case-study-card:hover .case-study-img {
    transform: scale(1.08) !important;
}

.placeholder-image {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--border-gray) 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-gray) !important;
    font-size: 2rem !important;
}

.case-study-info {
    padding: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: white !important;
}

.case-study-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.case-study-province {
    background: var(--emerald);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.case-study-year {
    color: var(--text-gray);
    font-weight: 500;
}

.case-study-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--emerald);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--emerald);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.case-study-summary {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
}

.case-study-tags {
    display: none; /* Hide tags to match reference design */
}

.case-study-tag {
    background: var(--light-gray);
    color: var(--text-gray);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.case-study-cta {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--emerald);
    text-transform: uppercase;
    margin-top: auto;
    padding-top: 1rem;
}

/* Animation classes for reveal effect */
.reveal {
    opacity: 1;
    animation: none;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-4px);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

.no-results h3 {
    color: var(--emerald);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .case-studies-container {
        padding: 1rem;
    }
    
    .case-studies-title {
        font-size: 2rem;
    }
    
    .filter-buttons {
        grid-template-columns: 1fr;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-controls {
        padding: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .case-studies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Navigation Styles for Case Stories Page - Aligned with Universal Styling */
nav[role="navigation"] a[href="/case-studies/"],
nav[role="navigation"] a[href*="case-studies"] {
    color: white !important;
    font-weight: 300 !important;
    letter-spacing: 0.02em !important;
    transition: all 0.2s ease !important;
}

nav[role="navigation"] a[href="/case-studies/"]:hover,
nav[role="navigation"] a[href*="case-studies"]:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.02) !important;
}

/* Case Studies active state */
nav[role="navigation"] a[href="/case-studies/"][aria-current="page"],
nav[role="navigation"] a[href*="case-studies"][aria-current="page"] {
    position: relative;
}

nav[role="navigation"] a[href="/case-studies/"][aria-current="page"]::after,
nav[role="navigation"] a[href*="case-studies"][aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
}
