/* Resources Page Styles */

/* Page Hero with modern gradient and pattern */
.page-hero {
    background: linear-gradient(rgba(40, 170, 225, 0.1), rgba(40, 170, 225, 0.05));
    color: var(--text-color);
    padding: 6rem 1rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../photos/pattern-dots.svg');
    background-size: 20px;
    opacity: 0.15;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    color: var(--light-text);
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resource Sections */
.resource-section {
    padding: 4rem 1rem;
}

.resource-section:nth-child(even) {
    background-color: var(--background-color);
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-dark);
    opacity: 0;
}

.section-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0;
}

/* Fade-in classes for scroll animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

.fade-in-stagger {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
    will-change: opacity, transform;
}

.fade-in-stagger.visible {
    opacity: 1;
    transform: none;
}

/* Crisis Support Section - Enhanced Cards */
.crisis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.crisis-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 6px rgba(40, 170, 225, 0.1);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
}

.crisis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.crisis-card:hover::before {
    transform: scaleX(1);
}

.crisis-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(40, 170, 225, 0.15);
}

.crisis-card.urgent {
    background: #fff5f5;
    border: 2px solid #e53e3e;
}

.crisis-card.urgent::before {
    background: #e53e3e;
}

.crisis-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.emergency-number,
.helpline-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.75rem 0;
    display: block;
}

.crisis-card.urgent .emergency-number {
    font-size: 3rem;
    color: #e53e3e;
}

.resource-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.resource-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.resource-link:hover {
    color: var(--primary-dark);
}

.resource-link:hover::after {
    transform: translateX(5px);
}

/* Support Guide Section - Enhanced Design */
.support-approach {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.support-approach h3 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.approach-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(40, 170, 225, 0.3);
    transition: all 0.3s ease;
}

.step-card:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(40, 170, 225, 0.4);
}

.step-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.step-card p {
    color: var(--light-text);
    line-height: 1.6;
}

/* Key Strategies - Enhanced List */
.key-strategies {
    margin-top: 3rem;
}

.key-strategies h3 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.strategy-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto;
}

.strategy-list li {
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: white;
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.strategy-list li:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(40, 170, 225, 0.1);
}

.strategy-list strong {
    color: var(--primary-dark);
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

/* Resource Grid - Modern Card Design */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Fix for 4-card rows */
.resource-grid:has(> :nth-child(4)) {
    grid-template-columns: repeat(3, 1fr);
}

.resource-grid > :nth-child(4) {
    grid-column: 1 / -1;
    max-width: calc(33.333% - 1.333rem);
    margin: 0 auto;
}

.resource-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(40, 170, 225, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.resource-card:hover::before {
    opacity: 0.1;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(40, 170, 225, 0.2);
    border-color: var(--primary-color);
}

.resource-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.resource-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.resource-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resource-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.resource-button:hover::before {
    width: 300px;
    height: 300px;
}

.resource-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 170, 225, 0.3);
}

/* Support Grid - Consistent with Resource Grid */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.support-grid:has(> :nth-child(4)) {
    grid-template-columns: repeat(3, 1fr);
}

.support-grid > :nth-child(4) {
    grid-column: 1 / -1;
    max-width: calc(33.333% - 1.333rem);
    margin: 0 auto;
}

.support-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(40, 170, 225, 0.1);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.support-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(40, 170, 225, 0.2);
}

.support-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.support-card .helpline-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.75rem 0;
    display: block;
}

/* Practical Guides - Enhanced Design */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.guide-grid:has(> :nth-child(4)) {
    grid-template-columns: repeat(3, 1fr);
}

.guide-grid > :nth-child(4) {
    grid-column: 1 / -1;
    max-width: calc(33.333% - 1.333rem);
    margin: 0 auto;
}

.guide-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(40, 170, 225, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.guide-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(40, 170, 225, 0.2);
}

.guide-card h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.guide-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.download-link {
    margin-top: auto;
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-align: center;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 170, 225, 0.3);
}

/* Contact Support Section - Premium Design */
.contact-support {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-support::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../photos/wave-pattern.svg');
    background-size: cover;
    opacity: 0.1;
    pointer-events: none;
}

.contact-support .section-content {
    position: relative;
    z-index: 1;
}

.contact-support h2,
.contact-support .section-intro {
    color: white;
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.emergency-info {
    font-size: 1.125rem;
    margin: 0.75rem 0;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-dark);
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}


/* Responsive Design */
@media (max-width: 1200px) {
    .resource-grid:has(> :nth-child(4)),
    .support-grid:has(> :nth-child(4)),
    .guide-grid:has(> :nth-child(4)) {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-grid > :nth-child(4),
    .support-grid > :nth-child(4),
    .guide-grid > :nth-child(4) {
        grid-column: auto;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .crisis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-content h2 {
        font-size: 1.75rem;
    }
    
    .resource-grid,
    .support-grid,
    .guide-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-grid > :nth-child(4),
    .support-grid > :nth-child(4),
    .guide-grid > :nth-child(4) {
        max-width: 100%;
    }
    
    .support-approach {
        padding: 2rem 1.5rem;
    }
    
    .approach-steps {
        gap: 1.5rem;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .emergency-number,
    .helpline-number {
        font-size: 1.75rem;
    }
    
    .crisis-card.urgent .emergency-number {
        font-size: 2.25rem;
    }
    
    .contact-options {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-card {
        padding: 2rem;
    }
    
}

@media (max-width: 480px) {
    .page-hero {
        padding: 4rem 1rem 3rem;
    }
    
    .resource-section {
        padding: 3rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .section-content h2 {
        font-size: 1.5rem;
    }
    
    .crisis-card,
    .resource-card,
    .support-card,
    .guide-card {
        padding: 1.75rem;
    }
    
    .strategy-list li {
        padding: 1.5rem;
    }
    
    .contact-card h3 {
        font-size: 1.5rem;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .fade-in-section,
    .fade-in-stagger,
    * {
        animation: none !important;
        transition: none !important;
    }
}