/* ================================================================
   study-material.css — Study Material (class/subject/chapter picker,
   resource cards), NCERT books, and Entrance Exam content styling.
   ================================================================ */

    .study-picker-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 16px 0 24px; }

    .study-picker-row select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: #fff; color: var(--secondary); }

    .study-res-heading { background: linear-gradient(120deg, var(--shade2), var(--shade1)); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 14px; box-shadow: 0 10px 24px -8px rgba(0,29,57,0.35); }

    .study-res-heading .srh-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 19px; color: #f6c94a; }

    .study-res-heading h3 { margin: 2px 0 6px; font-size: 16px; color: #fff; font-weight: 800; }

    .study-res-heading p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,0.82); line-height: 1.5; }

    .study-breadcrumb {
      font-size: 13.5px; font-weight: 700; color: var(--gray); margin-bottom: 18px; display: flex;
      align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border);
      border-radius: 12px; padding: 12px 16px;
    }

    .study-breadcrumb a { color: var(--primary); cursor: pointer; text-decoration: none; }

    .study-breadcrumb a:hover { text-decoration: underline; }

    .study-breadcrumb i.fa-chevron-right { font-size: 10px; color: var(--border); }

    .study-breadcrumb span { color: var(--secondary); }

    .study-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-bottom: 28px; }

    .study-tile {
      background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 22px 10px;
      text-align: center; cursor: pointer; transition: 0.2s ease;
      box-shadow: 0 2px 10px rgba(11,43,94,0.05);
    }

    .study-tile i {
      font-size: 20px; color: #fff; display: flex; align-items: center; justify-content: center;
      width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px;
      box-shadow: 0 8px 16px -4px rgba(0,29,57,0.28);
    }

    .study-tile span { font-weight: 700; font-size: 14px; color: var(--secondary); }

    .study-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -8px rgba(11,43,94,0.2); border-color: var(--primary); }

    .study-tile:hover i { transform: rotate(-6deg) scale(1.08); }

    #study-chapter-grid .study-tile:nth-child(6n+1) i { background: linear-gradient(145deg, var(--shade2), var(--shade1)); }

    #study-chapter-grid .study-tile:nth-child(6n+2) i { background: linear-gradient(145deg, var(--shade4), var(--shade3)); }

    #study-chapter-grid .study-tile:nth-child(6n+3) i { background: linear-gradient(145deg, #7c5cd6, #5637a8); }

    #study-chapter-grid .study-tile:nth-child(6n+4) i { background: linear-gradient(145deg, #f0985a, #d97438); }

    #study-chapter-grid .study-tile:nth-child(6n+5) i { background: linear-gradient(145deg, #e0a83a, #b8811f); }

    #study-chapter-grid .study-tile:nth-child(6n+6) i { background: linear-gradient(145deg, #e05c8a, #b83b68); }

    .sm-intro{background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px 20px;margin-bottom:16px;display:flex;align-items:center;gap:14px;box-shadow:0 4px 16px rgba(11,42,102,.06);}

    .sm-intro .ic{flex:none;width:46px;height:46px;border-radius:12px;background:var(--primary-light);color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:20px;}

    .sm-intro h3{margin:0 0 3px;font-size:16px;color:var(--secondary);font-weight:800;}

    .sm-intro p{margin:0;font-size:12.5px;color:var(--gray);}

    .sm-hero-art{display:flex;align-items:center;gap:10px;flex:none;}

    .sm-hero-art svg{width:80px;height:60px;flex:none;}

    .sm-hero-art img{width:auto;height:64px;max-width:180px;object-fit:contain;flex:none;border-radius:8px;}

    .sm-hero-txt{font-family:Georgia,serif;font-style:italic;font-weight:700;font-size:14px;color:var(--primary);line-height:1.3;transform:rotate(-3deg);}

    .sm-picker{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:22px;}

    .sm-step{background:#fff;border:1.5px solid var(--border);border-radius:14px;padding:14px 16px;display:flex;align-items:center;gap:12px;box-shadow:0 2px 10px rgba(11,43,94,0.05);}

    .sm-num{width:30px;height:30px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;flex:none;font-size:14px;}

    .sm-step-body{flex:1;min-width:0;}

    .sm-step-body label{display:block;font-size:11.5px;font-weight:700;color:var(--gray);margin-bottom:5px;text-transform:uppercase;letter-spacing:.3px;}

    .sm-step-body select{width:100%;padding:9px 10px;border:1px solid var(--border);border-radius:8px;font-family:inherit;font-size:14px;background:#fff;color:var(--secondary);}

    .sm-step-body select:disabled{background:#f4f6f9;color:var(--gray);}

    .sm-chap-head{display:flex;align-items:center;gap:14px;margin:4px 0 14px;}

    .sm-chap-head button{display:inline-flex;align-items:center;gap:6px;background:var(--primary-light);color:var(--primary);border:1px solid var(--border);border-radius:20px;padding:7px 14px;font-weight:700;font-size:12.5px;cursor:pointer;font-family:inherit;}

    .sm-chap-head h4{margin:0;font-size:15px;color:var(--secondary);display:flex;align-items:center;gap:8px;}

    .sm-chap-head h4 small{font-weight:600;color:var(--gray);font-size:12px;}

    .sm-back-link{display:inline-flex;align-items:center;gap:6px;background:none;border:0;color:var(--primary);font-weight:700;font-size:12.5px;cursor:pointer;margin-bottom:10px;padding:0;font-family:inherit;}

    .sm-more-section{padding-top:10px;padding-bottom:50px;}

    .sm-more-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}

    .sm-more-card{background:#fff;border:1.5px solid var(--border);border-radius:16px;padding:22px 18px;cursor:pointer;transition:.2s;box-shadow:0 2px 10px rgba(11,43,94,0.05);}

    .sm-more-card:hover{transform:translateY(-4px);box-shadow:0 14px 28px -8px rgba(11,43,94,0.22);border-color:var(--primary);}

    .sm-more-card .ic{
      width:56px;height:56px;border-radius:50%;position:relative;overflow:hidden;
      display:flex;align-items:center;justify-content:center;font-size:22px;color:#fff;margin-bottom:14px;
      box-shadow:0 10px 18px -6px rgba(0,0,0,.28), inset 0 -8px 12px rgba(0,0,0,.18), inset 0 5px 7px rgba(255,255,255,.4);
    }

    .sm-more-card .ic::after{
      content:'';position:absolute;top:7px;left:11px;width:20px;height:11px;border-radius:50%;
      background:rgba(255,255,255,.6);filter:blur(1.5px);transform:rotate(-18deg);
    }

    .sm-more-card h4{font-size:15px;color:var(--secondary);margin-bottom:6px;}

    .sm-more-card p{font-size:12.5px;color:var(--gray);line-height:1.5;margin-bottom:12px;}

    .sm-more-card .view{color:var(--primary);font-weight:700;font-size:12.5px;}

    .sm-res-item{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);}

    .sm-res-item:last-child{border-bottom:0;}

    .sm-res-item .n{flex:1;min-width:0;font-size:13.5px;font-weight:600;color:var(--secondary);}

    .sm-res-item .sub{display:block;font-size:11.5px;color:var(--gray);font-weight:500;}

    .ncert-tile-grid {
      display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding-bottom: 6px; margin-bottom: 24px;
    }

    .ncert-tile-grid .study-tile.ncert-tile {
      flex: 0 0 auto; width: 78px; padding: 10px 6px; text-decoration: none; background: #fffaf0; border-color: #f0dca6;
    }

    .ncert-tile-grid .study-tile.ncert-tile i { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; margin: 0 auto 6px; background: linear-gradient(145deg, #e6c05a, #c9971f); }

    .ncert-tile-grid .study-tile.ncert-tile span { font-size: 12px; }

    .ncert-tile-grid .study-tile.ncert-tile:hover { background: #f3f7fd; }

    .ncert-tile-grid .study-tile.ncert-tile small { display: none; }

    /* Alternating palette (matches the reference's mixed-colour class badges) */
    .ncert-tile-grid .study-tile.ncert-tile:nth-child(6n+1) i { background: linear-gradient(145deg, var(--shade2), var(--shade1)); }

    .ncert-tile-grid .study-tile.ncert-tile:nth-child(6n+2) i { background: linear-gradient(145deg, #f0985a, #d97438); }

    .ncert-tile-grid .study-tile.ncert-tile:nth-child(6n+3) i { background: linear-gradient(145deg, #e0a83a, #b8811f); }

    .ncert-tile-grid .study-tile.ncert-tile:nth-child(6n+4) i { background: linear-gradient(145deg, #7c5cd6, #5637a8); }

    .ncert-tile-grid .study-tile.ncert-tile:nth-child(6n+5) i { background: linear-gradient(145deg, var(--shade4), var(--shade3)); }

    .ncert-tile-grid .study-tile.ncert-tile:nth-child(6n+6) i { background: linear-gradient(145deg, #e05c8a, #b83b68); }

    .ncert-tile-grid .study-tile.ncert-tile.active i { background: linear-gradient(145deg, var(--secondary), #001226); }

    .study-empty-msg { grid-column: 1/-1; text-align: center; color: var(--gray); padding: 30px 10px; background: #fff; border: 1.5px dashed var(--border); border-radius: 16px; }

    .study-restype-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 16px; margin: 4px 0 22px; }

    .study-restype-btn { display: block; text-align: left; padding: 20px; border-radius: 16px; cursor: pointer; border: 1.5px solid var(--border); transition: 0.2s; }

    .study-restype-btn .rt-ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; margin-bottom: 12px; }

    .study-restype-btn h5 { font-size: 14.5px; color: var(--secondary); font-weight: 800; margin-bottom: 6px; }

    .study-restype-btn p { font-size: 12.5px; color: var(--gray); line-height: 1.5; margin-bottom: 14px; }

    .study-restype-btn .rt-view { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 20px; padding: 8px 18px; font-weight: 700; font-size: 12.5px; color: #fff; }

    .study-restype-btn[data-type="notes"] { background: var(--primary-light); }

    .study-restype-btn[data-type="notes"] .rt-ic { background: var(--primary); }

    .study-restype-btn[data-type="notes"] .rt-view { background: var(--secondary); }

    .study-restype-btn[data-type="practice"] { background: #f1e9fb; }

    .study-restype-btn[data-type="practice"] .rt-ic { background: #7a3fc9; }

    .study-restype-btn[data-type="practice"] .rt-view { background: #7a3fc9; }

    .study-restype-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -8px rgba(11,43,94,0.2); }

    .study-restype-btn.active { border-color: var(--secondary); box-shadow: 0 8px 18px -6px rgba(0,29,57,0.25); }
