/* 
 * Resources Page Styling
 * Matches the Royal Blue & Warm Orange theme from DSA and Requirements pages
 */

:root {
    --royal-blue: #1E3A8A;
    --royal-blue-light: #2D4EA0;
    --royal-blue-dark: #15296B;
    --warm-orange: #FF7A00;
    --warm-orange-light: #FF9633;
    --warm-orange-dark: #E66E00;
    --light-gray: #F3F4F6;
    --medium-gray: #E5E7EB;
    --dark-gray: #6B7280;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Page Header - Match DSA page styling */
.page-header {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-blue-light) 100%);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 70%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 70%;
    background: radial-gradient(circle at center, rgba(255, 122, 0, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.15rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Resources Introduction Section */
.resources-intro {
    padding: 80px 0;
    background-color: var(--white);
    position: relative;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-content h2 {
    color: var(--royal-blue);
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.intro-content h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--warm-orange);
    margin: 0 auto;
    width: 80px;
}

.intro-content p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.intro-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Funding Types Section */
.funding-types {
    padding: 80px 0;
    background-color: var(--light-gray);
    position: relative;
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.category-heading {
    color: var(--royal-blue);
    font-size: 1.8rem;
    margin: 50px 0 20px;
    position: relative;
    display: inline-block;
    font-weight: 600;
}

.category-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--warm-orange);
}

.section-title h2 {
    color: var(--royal-blue);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--warm-orange);
    margin: 0 auto;
    width: 80px;
}

.section-title p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 0;
}

.funding-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    grid-auto-rows: 1fr;
    gap: 25px;
    margin: 40px auto 0;
    max-width: 1200px;
    justify-content: center;
}

.funding-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 25px 20px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.funding-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.funding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--royal-blue);
    transition: height 0.3s ease;
}

.funding-card:hover::before {
    height: 100%;
}



.funding-card h3 {
    color: #1E3A8A;
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 600;
    min-height: auto;
    text-align: left;
    padding-left: 15px;
    border-left: 3px solid var(--royal-blue);
    line-height: 1.3;
    margin-top: 0;
}


.funding-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 15px 0 25px;
    flex-grow: 1;
    width: 100%;
    text-align: left;
}

.read-more {
    color: var(--royal-blue);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    background-color: transparent;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 0.9rem;
    align-self: flex-start;
}

.read-more:hover {
    color: var(--royal-blue);
    border-bottom: 2px solid var(--royal-blue);
}

.read-more i {
    margin-left: 8px;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Resource Detail Sections */
.resource-details {
    padding: 50px 0;
    background-color: var(--white);
}

.resource-detail-section {
    margin-bottom: 80px;
    padding: 40px;
    border-radius: 12px;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.resource-detail-section:target {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background-color: rgba(255, 122, 0, 0.1); }
    100% { background-color: var(--white); }
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.detail-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-blue-light) 0%, var(--royal-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.detail-icon i {
    color: var(--white);
    font-size: 24px;
}

.detail-header h2 {
    color: var(--royal-blue);
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
}

.detail-intro {
    font-size: 1.1rem;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.detail-col h3 {
    color: var(--royal-blue);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.detail-col h4 {
    color: var(--royal-blue-dark);
    font-size: 1.1rem;
    margin: 20px 0 10px;
    font-weight: 600;
}

.detail-col p, .detail-col li {
    color: var(--dark-gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.detail-col ul, .detail-col ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.benefits-list {
    list-style-type: none;
    padding: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.benefit-icon {
    color: var(--warm-orange);
    margin-right: 10px;
    font-size: 1.1rem;
}

.callout {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
}

.callout h4 {
    color: var(--royal-blue);
    margin-top: 0;
    margin-bottom: 10px;
}

.callout p {
    margin-bottom: 0;
}

.case-study {
    background-color: rgba(30, 58, 138, 0.05);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--royal-blue);
}

.case-study h3 {
    color: var(--royal-blue);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.case-study p {
    color: var(--dark-gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.detail-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

/* FAQ Section */
.resources-faq {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(30, 58, 138, 0.02);
}

.faq-question h3 {
    color: var(--royal-blue);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    flex: 1;
}

.faq-toggle {
    color: var(--royal-blue);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.faq-item.active .faq-toggle i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 1000px;
}

.faq-answer p, .faq-answer li {
    color: var(--dark-gray);
    font-size: 1rem;
    line-height: 1.6;
}

.faq-answer ul {
    padding-left: 20px;
    margin: 15px 0;
}

/* CTA Section */
.resources-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-blue-dark) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 15px 20px -15px rgba(0, 0, 0, 0.3), inset 0 -15px 20px -15px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.resources-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><rect fill-opacity="0.1" fill="white" x="25" y="25" width="50" height="50" transform="rotate(45 50 50)"/></svg>');
    opacity: 0.15;
    z-index: 0;
    animation: patternMove 40s linear infinite;
}

.resources-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: 0;
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 500px 500px; }
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-content h2 {
    font-size: 2.6rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.01em;
    color: #FFFFFF;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 30px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--warm-orange);
    color: var(--white);
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: var(--warm-orange-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--royal-blue);
    border: 1px solid var(--royal-blue);
}

.btn-secondary:hover {
    background-color: rgba(30, 58, 138, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .funding-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }
}

@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .funding-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 720px;
        gap: 25px;
    }
    
    .container {
        max-width: 900px;
        padding: 0 20px;
    }
    
    .funding-card {
        padding: 30px 20px;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .card-icon i {
        font-size: 28px;
    }
    
    .funding-card h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .resources-cta {
        padding: 70px 0;
    }
    
    .cta-content h2 {
        font-size: 2.2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .funding-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .funding-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .category-heading {
        font-size: 1.6rem;
        margin: 40px 0 10px;
    }
    
    .intro-content h2, .section-title h2, .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .intro-actions, .detail-actions, .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .resource-detail-section {
        padding: 30px 20px;
    }
}
