/* Resources Page - Modern Design System */
:root {
    --resources-primary: #2c3e50;
    --resources-secondary: #3498db;
    --resources-accent: #e74c3c;
    --resources-accent-hover: #c0392b;
    --resources-success: #27ae60;
    --resources-warning: #f39c12;
    --resources-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --resources-gradient-alt: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --resources-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --resources-card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --resources-border-radius: 16px;
    --resources-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar */
.resources-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--resources-gradient);
    z-index: 9999;
    transition: width 0.2s ease-out;
    border-radius: 0 2px 2px 0;
}

/* Main Container */
.resources-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow-x: hidden;
}

/* Hero Section */
.resources-hero {
    background: var(--resources-gradient);
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resources-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><circle cx="20" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="15" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="80" cy="5" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.resources-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resources-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.resources-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Container */
.resources-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 5rem;
    animation: fadeInGrid 1s ease-out 0.3s both;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resource Cards */
.resource-card {
    background: white;
    border-radius: var(--resources-border-radius);
    box-shadow: var(--resources-card-shadow);
    transition: var(--resources-transition);
    overflow: hidden;
    position: relative;
    animation: fadeInCard 0.8s ease-out both;
}

.resource-card:nth-child(even) {
    animation-delay: 0.2s;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--resources-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.resource-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--resources-card-shadow-hover);
}

.card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--resources-transition);
}

.resource-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 2.5rem;
    position: relative;
}

.card-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--resources-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.card-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.resources-page .primary-button {
    background-color: var(--accent-orange);
    color: var(--primary-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--resources-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.resources-page .primary-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.resources-page .primary-button:hover::before {
    width: 300px;
    height: 300px;
}

.resources-page .primary-button:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    color: var(--primary-white);
}

.resources-page .primary-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.resources-page .primary-button:hover i {
    transform: translateX(4px);
}

/* Video Section */
.video-section-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-video-container {
    position: relative;
}

.resources-page .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--resources-border-radius);
    box-shadow: var(--resources-card-shadow);
    transition: var(--resources-transition);
}

.resources-page .video-wrapper:hover {
    transform: scale(1.02);
    box-shadow: var(--resources-card-shadow-hover);
}

.resources-page .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--resources-border-radius);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--resources-gradient);
    border-radius: var(--resources-border-radius);
    cursor: pointer;
    transition: var(--resources-transition);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    color: white;
}

.video-placeholder:hover {
    transform: scale(1.05);
    background: var(--resources-gradient-alt);
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--resources-transition);
}

.video-placeholder:hover .play-button {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.play-button i {
    font-size: 2rem;
    margin-left: 4px;
}

.video-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.video-description {
    background: white;
    padding: 2.5rem;
    border-radius: var(--resources-border-radius);
    box-shadow: var(--resources-card-shadow);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.video-description h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--resources-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.video-description p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.video-description p:last-child {
    margin-bottom: 0;
}

/* Modal Styles */
.gift-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.gift-modal-content {
    background: white;
    border-radius: var(--resources-border-radius);
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s ease 0.1s both;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gift-modal-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--resources-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.gift-modal-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 2rem;
}

.resources-page .form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--resources-transition);
}

.resources-page .form-control:focus {
    outline: none;
    border-color: var(--resources-secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.resources-page .btn-primary {
    background-color: var(--accent-orange);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: var(--primary-white);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--resources-transition);
    width: 100%;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.resources-page .btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    color: var(--primary-white);
}

.resources-page .close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: var(--resources-transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resources-page .close-button:hover {
    color: var(--resources-accent);
    background: rgba(231, 76, 60, 0.1);
}

.privacy-notice {
    font-size: 0.9rem;
    color: #999;
    text-align: center;
    line-height: 1.4;
    margin-top: 1rem;
}

.privacy-notice a {
    color: var(--resources-secondary);
    text-decoration: none;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

/* Loading States */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--resources-success);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--resources-accent);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .resources-container {
        padding: 3rem 1.5rem;
    }

    .video-section-wrapper {
        gap: 3rem;
    }
}

@media (max-width: 968px) {
    .resources-hero {
        padding: 4rem 1.5rem 3rem;
    }

    .video-section-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .video-description {
        position: static;
    }

    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .gift-modal-content {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    .resources-hero {
        padding: 3rem 1rem 2rem;
    }

    .resources-container {
        padding: 2rem 1rem;
    }

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

    .card-content {
        padding: 1.5rem;
    }

    .video-description {
        padding: 1.5rem;
    }

    .primary-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .resources-page .resource-card {
        border: 2px solid #000;
    }

    .resources-page .primary-button,
    .resources-page .btn-primary {
        border: 2px solid #000;
    }
}

/* Focus Styles for Accessibility - Resources Page Only */
.resources-page .primary-button:focus,
.resources-page .btn-primary:focus,
.resources-page .form-control:focus,
.resources-page .close-button:focus {
    outline: 3px solid var(--resources-secondary);
    outline-offset: 2px;
}