/* FE Funding Redesign - Custom CSS */
/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
--color-primary: #1a4d2e;
--color-primary-light: #2d6a4f;
--color-accent: #f77f00;
--color-accent-hover: #d66d00;
--color-bg: #fdfcf8;
--color-card: #ffffff;
--color-text: #2b2b2b;
--color-text-light: #666666;
--color-border: #e0ddd1;
--color-section-hover: #f8f6f0;
--shadow-sm: 0 1px 3px rgba(26, 77, 46, 0.08);
--shadow-md: 0 4px 12px rgba(26, 77, 46, 0.1);
--shadow-lg: 0 8px 24px rgba(26, 77, 46, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  }

body {
font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--color-bg);
color: var(--color-text);
line-height: 1.6;
}

/* FE Container */
.fe-container {
max-width: 100%;
}

/* Header */
.fe-header {
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
color: white;
padding: 3rem 2rem;
text-align: center;
position: relative;
overflow: hidden;
}

.fe-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
opacity: 0.4;
}

.header-content {
max-width: 900px;
margin: 0 auto;
position: relative;
z-index: 1;
}

.fe-header h1 {
font-family: 'DM Serif Display', serif;
font-size: 2.8rem;
margin-bottom: 1rem;
font-weight: 400;
letter-spacing: -1px;
}

.fe-header p {
font-size: 1.1rem;
opacity: 0.95;
max-width: 600px;
margin: 0 auto;
}

.stats {
display: flex;
justify-content: center;
gap: 3rem;
margin-top: 2rem;
flex-wrap: wrap;
}

.stat-item {
text-align: center;
}

.stat-number {
font-family: 'DM Serif Display', serif;
font-size: 2.5rem;
display: block;
font-weight: 400;
}

.stat-label {
font-size: 0.9rem;
opacity: 0.9;
}

/* Content Wrapper */
.content-wrapper {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
}

/* Search Section */
.search-section {
margin-bottom: 2rem;
}

/* Keep existing elbi-search styles but update colors */
#elbi-results {
width: 100%;
margin-top: 20px;
}

.elbi-results-item {
background-color: var(--color-card);
color: var(--color-text);
padding: 10px;
border: 1px solid var(--color-border);
border-radius: 10px;
margin-bottom: 5px;
transition: all 0.2s;
}

.elbi-results-item:hover {
border-color: var(--color-primary);
box-shadow: var(--shadow-sm);
}

#elbi-input {
border-radius: 30px;
width: 100%;
padding: 0.75rem 1.5rem;
border: 1px solid var(--color-border);
font-family: inherit;
font-size: 1rem;
transition: border-color 0.2s;
}

#elbi-input:focus {
outline: none;
border-color: var(--color-primary);
}

/* Tools Grid */
.tools-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin-bottom: 3rem;
}

.tool-card {
background: var(--color-card);
border: 1px solid var(--color-border);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
}

.tool-card:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2px);
border-color: var(--color-primary);
}

.tool-card h3 {
font-size: 1.1rem;
color: var(--color-primary);
margin-bottom: 0.5rem;
font-weight: 600;
}

.tool-card p {
color: var(--color-text-light);
font-size: 0.9rem;
margin-bottom: 1rem;
}

.tool-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--color-border);
border-radius: 6px;
font-family: inherit;
font-size: 0.95rem;
transition: border-color 0.2s;
margin-bottom: 0.5rem;
}

.tool-input:focus {
outline: none;
border-color: var(--color-primary);
}

.tool-button {
width: 100%;
padding: 0.75rem;
background: var(--color-accent);
color: white;
border: none;
border-radius: 6px;
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
transition: background 0.2s;
margin-top: 0.5rem;
}

.tool-button:hover {
background: var(--color-accent-hover);
}

.tool-links {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: 0.5rem;
}

.tool-links a {
color: var(--color-primary);
text-decoration: none;
font-size: 0.9rem;
padding: 0.5rem;
border-radius: 4px;
transition: background 0.2s;
}

.tool-links a:hover {
background: var(--color-section-hover);
}

.version-badge {
display: inline-flex;
align-items: center;
margin-bottom: 0.5rem;
font-size: 0.85rem;
}

.badge-label {
background: var(--color-text);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 4px 0 0 4px;
}

.badge-value {
background: var(--color-primary);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 0 4px 4px 0;
}

/* Resources Section Header */
.resources-header {
text-align: center;
margin-bottom: 2rem;
}

.resources-header h2 {
font-family: 'DM Serif Display', serif;
font-size: 2.2rem;
color: var(--color-primary);
margin-bottom: 0.5rem;
font-weight: 400;
}

.resources-header p {
color: var(--color-text-light);
font-size: 1rem;
}

/* Collapsible Sections */
.funding-sections {
margin-bottom: 2rem;
}

.section {
background: var(--color-card);
border: 1px solid var(--color-border);
border-radius: 12px;
margin-bottom: 1rem;
overflow: hidden;
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
}

.section:hover {
box-shadow: var(--shadow-md);
}

.section-header {
padding: 1.5rem 2rem;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
background: var(--color-card);
transition: background 0.2s;
user-select: none;
}

.section-header:hover {
background: var(--color-section-hover);
}

.section-title {
font-size: 1.3rem;
font-weight: 600;
color: var(--color-primary);
display: flex;
align-items: center;
gap: 0.75rem;
}

.section-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: var(--color-primary);
color: white;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 600;
flex-shrink: 0;
}

.section-chevron {
width: 24px;
height: 24px;
transition: transform 0.3s ease;
color: var(--color-primary);
flex-shrink: 0;
}

.section.active .section-chevron {
transform: rotate(180deg);
}

.section-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}

.section.active .section-content {
max-height: 2500px;
}

.section-inner {
padding: 0 2rem 2rem 2rem;
}

/* Resource Grid */
.resource-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}

.resource-link {
display: flex;
align-items: flex-start;
gap: 0.75rem;
padding: 1rem;
border: 1px solid var(--color-border);
border-radius: 8px;
text-decoration: none;
color: var(--color-text);
transition: all 0.2s;
background: var(--color-bg);
}

.resource-link:hover {
border-color: var(--color-primary);
background: var(--color-card);
transform: translateX(4px);
}

.resource-icon {
flex-shrink: 0;
width: 12px;
height: 12px;
margin-top: 4px;
}

.resource-text {
flex: 1;
}

.resource-title {
font-weight: 600;
color: var(--color-primary);
margin-bottom: 0.25rem;
font-size: 0.95rem;
}

.resource-url {
font-size: 0.8rem;
color: var(--color-text-light);
word-break: break-all;
}

.view-all-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
margin-top: 1rem;
color: var(--color-accent);
text-decoration: none;
font-weight: 600;
font-size: 0.95rem;
transition: gap 0.2s;
}

.view-all-link:hover {
gap: 0.75rem;
}

/* Feedback Section */
.feedback-section {
text-align: center;
margin: 2rem 0;
}

.button-feedback {
padding: 0.75rem 1.5rem;
background: #f4b400;
color: var(--color-text);
border: none;
border-radius: 6px;
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
transition: all 0.2s;
}

.button-feedback:hover {
background: #dfa000;
transform: translateY(-2px);
box-shadow: var(--shadow-sm);
}

/* ILR Rule Results Styling */
#rule-results .card {
background: var(--color-card);
border: 1px solid var(--color-border);
border-radius: 8px;
padding: 1rem;
margin: 0.5rem 0;
}

#rule-results .title {
font-size: 1rem;
font-weight: 600;
color: var(--color-primary);
margin-bottom: 0.5rem;
}

#rule-results .subtitle {
font-size: 0.9rem;
color: var(--color-text);
margin-bottom: 0.5rem;
}

#rule-results .tag {
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 600;
}

#rule-results .has-background-danger {
background: #dc3545;
color: white;
}

#rule-results .has-background-warning {
background: #ffc107;
color: black;
}

/* Responsive Design */
@media (max-width: 768px) {
.fe-header h1 {
font-size: 2rem;
}

.stats {
    gap: 1.5rem;
}

.section-header {
    padding: 1.25rem 1.5rem;
}

.section-inner {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.resource-grid {
    grid-template-columns: 1fr;
}

.tools-grid {
    grid-template-columns: 1fr;
}

.section-icon {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.content-wrapper {
    padding: 1
}
}

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

.section {
animation: fadeInUp 0.4s ease backwards;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.2s; }
.section:nth-child(5) { animation-delay: 0.25s; }
.section:nth-child(6) { animation-delay: 0.3s; }
.section:nth-child(7) { animation-delay: 0.35s; }
.section:nth-child(8) { animation-delay: 0.4s; }
.section:nth-child(9) { animation-delay: 0.45s; }
.section:nth-child(10) { animation-delay: 0.5s; }
.section:nth-child(11) { animation-delay: 0.55s; }
.section:nth-child(12) { animation-delay: 0.6s; }

.tool-card {
animation: fadeInUp 0.4s ease backwards;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.15s; }
.tool-card:nth-child(3) { animation-delay: 0.2s; }
.tool-card:nth-child(4) { animation-delay: 0.25s; }

/* Tag styling for resource count */
.tag.is-primary.is-light {
background: var(--color-primary);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 4px;
font-size: 0.85rem;
display: inline-block;
margin-bottom: 0.5rem;
}