/* Research & Operational Insights Page */

/* Research Hero Section */
.research-hero {
    background: linear-gradient(to right, rgba(18, 18, 18, 0.95) 40%, rgba(18, 18, 18, 0.5)), 
                url('https://via.placeholder.com/1920x600/1e1e1e/ff5722?text=Research+Hero') center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    z-index: 100;
    border-bottom: 3px solid #ff5722;
}

.research-hero .hero-content {
    max-width: 700px;
}

.research-hero h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: capitalize;
    color: #ffffff;
}

.research-hero p {
    font-size: 1.15rem;
    color: #aaaaaa;
    margin-bottom: 0;
}

/* Main Research Container */
.research-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 3rem 0;
    border-bottom: 2px solid rgba(255, 87, 34, 0.2);
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #ff5722;
    color: #ff5722;
}

.filter-btn.active {
    background-color: #ff5722;
    border-color: #ff5722;
    color: #ffffff;
}

/* Research Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* Research Card */
.research-card {
    background-color: #1e1e1e;
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #ff5722;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.research-card:hover {
    background-color: #252525;
    border-color: #ff5722;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 87, 34, 0.15);
}

.research-card:hover::before {
    transform: scaleX(1);
}

/* Card Header & Category Tag */
.card-header {
    margin-bottom: 1.25rem;
}

.category-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-tag.clinical {
    background-color: rgba(100, 150, 255, 0.2);
    color: #6496ff;
    border: 1px solid rgba(100, 150, 255, 0.4);
}

.category-tag.operational {
    background-color: rgba(255, 178, 102, 0.2);
    color: #ffb266;
    border: 1px solid rgba(255, 178, 102, 0.4);
}

.category-tag.grants {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

/* Card Title */
.card-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #ffffff;
    text-transform: none;
}

/* Operational Impact */
.operational-impact {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: #aaaaaa;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1rem;
    background-color: rgba(255, 87, 34, 0.05);
    border-left: 3px solid #ff5722;
    border-radius: 2px;
}

.operational-impact strong {
    color: #ff5722;
}

/* Card Meta */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.source {
    color: #aaaaaa;
    font-weight: 500;
}

.date {
    color: #ff5722;
    font-weight: 600;
}

/* Read More Link */
.read-more {
    color: #ff5722;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
    color: #ff9f6a;
}

/* Chief's Callout Section */
.chiefs-callout {
    background: linear-gradient(135deg, #1e1e1e 0%, #0d0d0d 100%);
    border: 1px solid #ff5722;
    border-radius: 8px;
    padding: 3.5rem;
    margin: 4rem 0;
}

.callout-content h2 {
    font-size: 2rem;
    color: #ff5722;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.callout-content > p {
    font-size: 1.1rem;
    color: #aaaaaa;
    margin-bottom: 2.5rem;
}

/* Callout Features */
.callout-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.callout-feature {
    padding: 1.5rem;
    background-color: rgba(255, 87, 34, 0.08);
    border-left: 3px solid #ff5722;
    border-radius: 4px;
}

.callout-feature h4 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.callout-feature p {
    font-size: 0.95rem;
    color: #aaaaaa;
    line-height: 1.6;
}

/* Button Style for Chief's Callout */
.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
    display: inline-block;
}

/* Hide Cards by Filter */
.research-card.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .research-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 2rem;
    }

    .chiefs-callout {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .research-hero {
        height: 50vh;
    }

    .research-hero h1 {
        font-size: 2.2rem;
    }

    .research-hero p {
        font-size: 1rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filter-bar {
        flex-direction: column;
        padding: 2rem 0;
        gap: 0.75rem;
    }

    .filter-btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .callout-features {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .chiefs-callout {
        padding: 2rem;
    }

    .callout-content h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .research-hero {
        height: 45vh;
    }

    .research-hero h1 {
        font-size: 1.8rem;
    }

    .research-hero p {
        font-size: 0.95rem;
    }

    .research-container {
        padding: 0 3%;
    }

    .research-card {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-meta {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .operational-impact {
        font-size: 0.9rem;
    }
}

/* =========================================
   CHIEFS CALLOUT SECTION
   ========================================= */

.chiefs-callout {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-top: 4px solid #ff3333; /* Signature red accent line */
    border-radius: 8px;
    padding: 4rem;
    margin: 4rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.callout-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split into two columns */
    gap: 4rem;
    align-items: center;
}

/* Left Column Styling */
.callout-info h2 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.callout-info p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Right Column Features */
.callout-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.callout-feature {
    border-left: 2px solid #ff3333; /* Nice industrial detail */
    padding-left: 1.5rem;
}

.callout-feature h4 {
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.callout-feature p {
    font-size: 0.95rem;
    color: #999999;
    margin: 0;
    line-height: 1.5;
}

/* Call to Action Button */
.read-more-btn.solid-red {
    display: inline-block;
    background-color: #ff3333;
    color: #ffffff;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.read-more-btn.solid-red:hover {
    background-color: #cc0000;
}

/* Mobile Responsiveness */
@media screen and (max-width: 900px) {
    .chiefs-callout {
        padding: 2.5rem 1.5rem;
    }
    
    .callout-content {
        grid-template-columns: 1fr; /* Stack into one column on small screens */
        gap: 3rem;
    }
}

.callout-feature {
    transition: border-width 0.2s ease, padding-left 0.2s ease, background-color 0.3s ease;
    border-left: 2px solid #ff3333; /* Base state */
}

.callout-feature:hover {
    border-left: 6px solid #ff3333; /* Thicker border on hover */
    padding-left: 1.8rem; /* Pushes text slightly to the right */
    background-color: rgba(255, 51, 51, 0.05); /* Very faint red background highlight */
    border-radius: 0 4px 4px 0;
}

/* Ensures anchor links jump to the correct offset below the sticky header */
#savings-calculator {
    scroll-margin-top: 130px;
}

/* ROI Calculator Section */
.roi-container {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.roi-header {
    text-align: center;
    margin-bottom: 3rem;
}

.roi-header h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.roi-header p {
    color: #999;
    max-width: 700px;
    margin: 0 auto;
}

.roi-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
}

.input-group {
    margin-bottom: 2rem;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.input-header label {
    color: #ccc;
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.val-display {
    color: #ff3333;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Custom Range Slider Styling */
/* Update your existing .roi-slider styling in research.css */

/* Custom Range Slider Styling */
/* Custom Range Slider Styling */
.roi-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px; 
    border-radius: 3px; 
    outline: none;
    background: #333; /* Fallback baseline - JS handles the live gradient trail */
}

.roi-slider::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 6px;
    background: transparent; 
    border: none;
}

.roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ff3333;
    cursor: pointer;
    margin-top: -7px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

.roi-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Firefox Support */
.roi-slider::-moz-range-track {
    height: 6px;
    background: transparent;
    border: none;
}

.roi-slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ff3333;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

/* Results Styling */
.roi-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}

.result-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
}

.result-card.highlight {
    border-color: #ff3333;
    background-color: rgba(255, 51, 51, 0.05);
}

.result-card h4 {
    color: #888;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.result-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.result-card p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

@media screen and (max-width: 900px) {
    .roi-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .roi-container {
        padding: 2rem 1.5rem;
    }
}
/* =========================================
   FILTER BAR & DROPDOWN STYLES
   ========================================= */

/* Desktop Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 3rem 0;
    border-bottom: 2px solid rgba(255, 87, 34, 0.2);
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #ff5722;
    color: #ff5722;
}

.filter-btn.active {
    background-color: #ff5722;
    border-color: #ff5722;
    color: #ffffff;
}

/* Hide mobile dropdown by default (Desktop view) */
.mobile-only-filter {
    display: none;
}

/* Mobile Dropdown Styling */
.filter-dropdown {
    width: 100%;
    padding: 1rem;
    background-color: #1e1e1e;
    color: #ffffff;
    border: 2px solid rgba(255, 87, 34, 0.5);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ff5722%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #ff5722;
}

/* Hide mobile dropdown by default (Desktop view) */
.mobile-only-filter {
    display: none;
}

/* Base style for desktop buttons */
.desktop-only {
    display: flex;
}

/* Hide cards when filtered */
.research-card.hidden {
    display: none !important;
}

/* --- MEDIA QUERY FOR MOBILE --- */
@media (max-width: 768px) {
    /* Hide desktop buttons */
    .desktop-only {
        display: none !important; 
    }
    
    /* Show mobile dropdown */
    .mobile-only-filter {
        display: block; 
        padding: 2rem 0;
        margin-bottom: 2rem;
        border-bottom: 2px solid rgba(255, 87, 34, 0.2);
    }
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Offset for the anchor link to account for the sticky header */
#savings-calculator {
    scroll-margin-top: 100px; /* Adjust this value based on your actual header height */
}