/* ==========================================================================
   RESOURCES PAGE SPECIFIC STYLES
   ========================================================================== */

/* ==========================================================================
   PAGE SETUP
   ========================================================================== */
.resources-page {
    background: var(--color-darker);
    min-height: 100vh;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 10rem 4rem 4rem;
    position: relative;
    overflow: hidden;
    background: var(--dark-gradient);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Background */
.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.grid-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    top: -20%;
    right: -10%;
    animation: float 25s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-gradient);
    bottom: -20%;
    left: -10%;
    animation: float 30s ease-in-out infinite reverse;
}

/* Knowledge Network Animation */
.knowledge-network {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.2;
    animation: float-books 15s ease-in-out infinite;
}

@keyframes float-books {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.2;
    }
    50% { 
        transform: translateY(-30px) rotate(15deg);
        opacity: 0.3;
    }
}

.icon-1 { top: 20%; left: 10%; animation-delay: 0s; }
.icon-2 { top: 60%; right: 15%; animation-delay: 3s; }
.icon-3 { top: 40%; left: 5%; animation-delay: 6s; }
.icon-4 { bottom: 20%; right: 30%; animation-delay: 9s; }
.icon-5 { top: 10%; right: 40%; animation-delay: 12s; }

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.8s ease-out;
}

.badge-icon {
    font-size: 1.25rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3rem;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    color: var(--color-light);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-purple);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    position: absolute;
    right: 8px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: white;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-light);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.filter-icon {
    font-size: 1rem;
}

/* Results Count */
.results-count {
    text-align: center;
    color: var(--color-gray);
    font-size: 0.875rem;
    animation: fadeIn 0.5s ease-out 1s both;
}

.results-count span {
    color: var(--color-purple);
    font-weight: 600;
}

/* ==========================================================================
   FEATURED SECTION
   ========================================================================== */
.featured-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    color: var(--color-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray);
    max-width: 600px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.featured-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

.featured-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--color-purple);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.featured-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.featured-description {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.featured-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--color-gray);
    position: relative;
    z-index: 1;
}

.featured-btn {
    background: var(--primary-gradient);
    color: var(--color-light);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.featured-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

/* ==========================================================================
   RESOURCES SECTION
   ========================================================================== */
.resources-section {
    padding: 6rem 0;
}

.resource-category {
    margin-bottom: 6rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.category-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.category-info p {
    color: var(--color-gray);
    font-size: 1.125rem;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.resource-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.resource-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(164, 85, 247, 0.2));
    position: relative;
    overflow: hidden;
}

.resource-image {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
}

.resource-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
}

.resource-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-dark);
    transition: var(--transition-smooth);
}

.resource-card:hover .resource-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

.resource-content {
    padding: 2rem;
}

.resource-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--color-light);
}

.resource-author {
    font-size: 0.875rem;
    color: var(--color-purple);
    margin-bottom: 1rem;
}

.resource-description {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-gray);
}

.resource-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resource-duration svg {
    opacity: 0.7;
}

.resource-level {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resource-level.beginner {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
}

.resource-level.intermediate {
    background: rgba(254, 225, 64, 0.2);
    color: #fee140;
}

.resource-level.advanced {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

/* ==========================================================================
   LOAD MORE
   ========================================================================== */
.load-more-container {
    text-align: center;
    margin-top: 4rem;
    padding: 0 2rem;
}

.load-more-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-light);
    padding: 1rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   NEWSLETTER SECTION
   ========================================================================== */
.newsletter-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(116, 75, 162, 0.1) 100%);
}

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

.newsletter-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.newsletter-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--color-light);
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--color-purple);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-submit {
    background: var(--primary-gradient);
    color: var(--color-light);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.newsletter-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.newsletter-privacy {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--color-gray);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(30px, -30px) scale(1.1) rotate(120deg); }
    66% { transform: translate(-20px, 20px) scale(0.9) rotate(240deg); }
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 8rem 2rem 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .filter-icon {
        display: none;
    }

    .resources-section {
        padding: 4rem 0;
    }

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

    .category-header {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }

    .category-info h2 {
        font-size: 2rem;
    }

    .featured-grid {
        padding: 0 1rem;
    }

    .featured-card {
        padding: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-submit {
        width: 100%;
    }
}