/* Resources Library Styles */
.resources-library {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    text-align: left;
    padding: 5rem 4rem;
    background: linear-gradient(145deg, var(--primary-color) 0%, #ff8f5a 50%, #ff7676 100%);
    background-size: 200% 200%;
    color: white;
    border-radius: 12px;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    animation: gradientFlow 15s ease infinite;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
    opacity: 0.6;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section > p {
    font-size: 1.2rem;
    opacity: 1;
    margin-bottom: 1.5rem;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-description {
    max-width: 600px;
    margin: 0;
    padding: 0;
    position: relative;
}

.hero-description p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Filter Section */
.filter-section {
    margin-bottom: 3rem;
    margin-top: 4rem;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

/* Resource Type Filters */
.resource-type-filters {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

/* Solution Filters */
.solution-filters {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    background: transparent;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Hide inactive resource sections */
.resource-section.hidden {
    display: none;
}

/* Resource Cards */
.resource-section {
    margin-bottom: 4rem;
}

.resource-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

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

.resource-card {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    background: white;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-thumbnail {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
}

.resource-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-thumbnail i {
    color: var(--primary-color);
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.resource-card:hover .resource-thumbnail i {
    transform: scale(1.1);
}

.resource-content {
    padding: 1.5rem;
}

.resource-type {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(242, 144, 97, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.resource-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.resource-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Buttons */
.download-btn, .read-more, .register-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.download-btn:hover, .read-more:hover, .register-btn:hover {
    background: #ff8f5a;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    max-width: 500px;
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
}

#downloadForm {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

#downloadForm input[type="email"],
#downloadForm select {
    padding: 1rem;
    border: 2px solid #e1e1e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#downloadForm select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

#downloadForm input:focus,
#downloadForm select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(242, 144, 97, 0.1);
    background-color: white;
}

.privacy-consent {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: #ff8f5a;
}

#downloadForm button {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

#downloadForm button:hover {
    background: #ff8f5a;
    transform: translateY(-2px);
}

.form-message {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-message::before {
    content: '🔒';
    font-size: 1rem;
}

/* Error state styling */
#downloadForm input:invalid,
#downloadForm select:invalid {
    border-color: #dc3545;
}

#downloadForm input:invalid:focus,
#downloadForm select:invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Section Headers */
.section-header {
    margin-bottom: 2.5rem;
    max-width: 800px;
}

.section-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-description {
    color: var(--secondary-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 2rem;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        margin: 0 auto;
    }

    .filter-container {
        gap: 1.5rem;
    }

    .resource-type-filters,
    .solution-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 300px;
    }

    .section-header {
        text-align: center;
    }

    .section-header h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .section-description {
        font-size: 1rem;
        text-align: center;
    }
}

/* Add subtle animation for section headers */
.section-header {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Stagger the animations for each section */
#whitepapers .section-header { animation-delay: 0.2s; }
#blogs .section-header { animation-delay: 0.4s; }
#events .section-header { animation-delay: 0.6s; }