/* ==========================================================================
   LEARN PAGE STYLES (RUBY-PURPLE & PURE BLACK THEME)
   ========================================================================== */

body {
    background-color: #030005;
    color: #e2e8f0;
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* HERO SECTION */
.learn-hero {
    position: relative;
    padding: 100px 20px 70px 20px;
    text-align: center;
    background: radial-gradient(circle at top center, #1b021d 0%, #030005 85%);
    border-bottom: 1px solid rgba(192, 132, 252, 0.25);
    overflow: hidden;
}

/* Single Direction Linear Lines Background Animation */
.learn-hero::before {
    content: '';
    position: absolute;
    width: 200vw; 
    height: 200vw;
    top: -50vw; 
    left: -50vw;
    background: repeating-linear-gradient(
        0deg,
        transparent, 
        transparent 48px, 
        rgba(225, 29, 72, 0.35) 49px, 
        rgba(225, 29, 72, 0.35) 50px
    );
    animation: panbg 30s linear infinite;
    z-index: 0;
}

/* TITLE STYLES */
.learn-title {
    position: relative;
    z-index: 1;
    font-size: 3.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    color: #ffffff; /* Plain white for Nokkhotropoth */
    animation: fadeInDown 1s ease-out;
}

/* DEEPER, LESS BRIGHT RUBY-PURPLE FOR "ACADEMY" */
.learn-title span.ruby-text {
    background: linear-gradient(135deg, #c026d3 0%, #9f1239 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(192, 38, 211, 0.35), 0 0 20px rgba(159, 18, 57, 0.25);
}

.learn-subtitle {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    color: #e879f9;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out;
}

/* CENTERED SUBTITLE SECTION */
.resources-header {
    text-align: center;
    padding: 55px 20px 15px 20px;
    background: #030005;
}

.resources-subtitle {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.resources-desc {
    color: #c084fc;
    font-size: 1.05rem;
}

/* CONTENT SECTIONS */
.learn-section {
    padding: 40px 8% 80px 8%;
    animation: slideUpFade 0.6s ease-out forwards;
}

.learn-section.active {
    display: block;
}

/* SUBCATEGORY STYLES */
.subcategory-block {
    margin-bottom: 60px;
}

.subcategory-title {
    font-size: 1.4rem;
    color: #f3e8ff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(192, 132, 252, 0.25);
    padding-bottom: 12px;
}

.subcategory-title i {
    color: #f43f5e;
}

/* FIXED GRID LAYOUT FOR STRICT EQUAL SIZES ACROSS ALL ROWS */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* CARD DESIGNS */
.tool-card {
    background: rgba(15, 2, 18, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(192, 132, 252, 0.25);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9), 0 0 14px rgba(168, 85, 247, 0.3);
}

/* Thumbnail header */
.card-thumb {
    width: 100%;
    height: 140px;
    background: #08010d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
    flex-shrink: 0;
}

/* ORIGINAL BRAND COLORS FOR LOGOS */
.icon-python { color: #3776ab; }
.icon-c { color: #a8b9cc; }
.icon-cpp { color: #00599c; }
.icon-java { color: #f89820; }
.icon-html { color: #e34f26; }
.icon-css { color: #1572b6; }
.icon-js { color: #f7df1e; }
.icon-react { color: #61dafb; }
.icon-rust { color: #dea584; }
.icon-arduino { color: #00979d; }
.icon-wifi { color: #38bdf8; }
.icon-pi { color: #c51a4a; }
.icon-cad { color: #fb923c; }

.card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(225, 29, 72, 0.2);
    color: #f3e8ff;
    padding: 4px 10px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 12px;
    border: 1px solid rgba(225, 29, 72, 0.35);
}

.card-body h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 1.25rem;
}

.card-body p {
    color: #a792a9;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 20px;
    flex: 1;
}

.card-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 9px 0;
    background: transparent;
    color: #d8b4fe;
    border: 1px solid #c084fc;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: auto;
}

.card-btn:hover {
    background: #f43f5e;
    color: #ffffff;
    border-color: #f43f5e;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.card-btn.disabled {
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.3);
    cursor: not-allowed;
    pointer-events: none;
}

.card-btn.disabled:hover {
    background: transparent;
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.3);
    box-shadow: none;
}

/* =============================
   CSS DUAL-LANGUAGE TOGGLE RULES
   ============================= */
html[lang="en"] [lang="bn"] {
    display: none !important;
}

html[lang="bn"] [lang="en"] {
    display: none !important;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1200px) {
    .resources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .resources-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* ANIMATIONS */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes panbg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}