/* Jyothi Nivas public gallery + scroll backdrops; V51 consolidated assets. */

/* FILE: gallery-v43.css */
/* V43: Modern editorial gallery, first-visit loader and resilient school film.
   Injected last so it wins legacy V1-V42 gallery styles without replacing CMS cards. */
#gallery{
  height:auto!important; min-height:0!important; overflow:hidden!important;
  padding:clamp(62px,8vw,126px) 0 clamp(58px,7vw,100px)!important;
  background:radial-gradient(ellipse at 95% 0%,rgba(39,98,140,.40) 0%,transparent 48%),
             radial-gradient(ellipse at 0% 105%,rgba(202,161,90,.12),transparent 49%),#061b32!important;
  position:relative!important; isolation:isolate;
}
#gallery::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.22;
 background-image:linear-gradient(90deg,transparent 97%,rgba(255,255,255,.07) 100%);
 background-size:90px 100%;}
#gallery::after{pointer-events:none!important;z-index:0!important}
#gallery .section-title{position:relative!important;inset:auto!important;top:auto!important;left:auto!important;
 transform:none!important;text-align:left!important;width:min(1280px,calc(100% - 48px))!important;
 max-width:1280px!important;margin:0 auto 12px!important;padding:0!important;z-index:2!important}
#gallery .section-title h2{color:#fff!important;font-size:clamp(2rem,4.5vw,4.5rem)!important;
 line-height:1.1!important;letter-spacing:-.045em!important;margin-bottom:12px!important;font-family:'Playfair Display',Georgia,serif!important;}
#gallery .section-title p{color:#acc1d3!important;max-width:660px!important;font-size:clamp(14px,1.3vw,18px)!important;
 margin:0!important;line-height:1.6!important}
#gallery .jn-gallery-eyebrow{display:flex;align-items:center;gap:12px;color:#e2bd7a;font:700 11px/1.5 Lato,Arial,sans-serif;
 letter-spacing:.23em;text-transform:uppercase;margin:0 0 18px}
#gallery .jn-gallery-eyebrow::before{content:"";display:block;width:35px;height:1px;background:#d9ab58}
#gallery .jn-gallery-toolbar{position:relative!important;z-index:4!important;width:min(1280px,calc(100% - 48px));
 max-width:1280px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin:22px auto 19px}
#gallery .jn-gallery-count{font:650 12px/1.3 Lato,Arial,sans-serif;letter-spacing:.14em;color:#d3dae4;text-transform:uppercase}
#gallery .jn-gallery-count strong{font-weight:850;color:#f1c77b;font-size:16px}
#gallery .jn-gallery-controls{display:flex;align-items:center;gap:12px}
#gallery .jn-gallery-controls button{display:grid;place-items:center;width:47px;height:47px;padding:0;
 border:1px solid rgba(255,255,255,.26);border-radius:50%;background:rgba(255,255,255,.08);color:white;
 font:28px/1 Georgia,serif;cursor:pointer;transition:background .2s,transform .2s,border-color .2s}
#gallery .jn-gallery-controls button:hover{background:#e9bd72;color:#08223d;border-color:#e9bd72;transform:translateY(-2px)}
#gallery .jn-gallery-controls button:focus-visible{outline:3px solid #ffe6b4;outline-offset:3px}
#gallery .gallery-slider-wrapper{position:relative!important;inset:auto!important;top:auto!important;left:auto!important;
 width:100%!important;max-width:100%!important;height:auto!important;margin:0!important;
 overflow:visible!important;transform:none!important;z-index:2!important;}
#gallery .gallery-slider-wrapper > .slider-btn{display:none!important}
#gallery #gallerySlider.gallery-grid{display:flex!important;grid-template-columns:none!important;
 gap:clamp(14px,2.4vw,30px)!important;align-items:stretch!important;position:relative!important;
 width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;
 margin:0!important;padding:20px max(24px,calc((100vw - 1280px)/2)) 30px!important;
 overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;
 scroll-behavior:smooth;scroll-snap-type:x mandatory!important;scroll-padding-inline:24px;
 -ms-overflow-style:none;scrollbar-width:none;touch-action:pan-x pan-y;}
#gallery #gallerySlider.gallery-grid::-webkit-scrollbar{display:none}
#gallery #gallerySlider > .gallery-item,
#gallery #gallerySlider > .gallery-item.wide,
#gallery #gallerySlider > .gallery-item.big,
#gallery #gallerySlider > .gallery-item.tall{
 flex:0 0 clamp(290px,31vw,408px)!important;width:clamp(290px,31vw,408px)!important;
 min-width:0!important;max-width:none!important;height:clamp(355px,36vw,465px)!important;
 min-height:355px!important;margin:0!important;padding:0!important;
 position:relative!important;overflow:hidden!important;border-radius:22px!important;
 scroll-snap-align:start!important;scroll-snap-stop:always;
 border:1px solid rgba(255,255,255,.18)!important;background:#15314b!important;
 box-shadow:0 20px 48px rgba(0,0,0,.20)!important;
 contain:layout paint;transform:translateZ(0)!important;transition:border-color .3s,box-shadow .3s!important;
 cursor:pointer!important;}
#gallery #gallerySlider > .gallery-item:focus-visible{outline:3px solid #f3cf94!important;outline-offset:4px!important}
#gallery #gallerySlider > .gallery-item img{display:block!important;width:100%!important;height:100%!important;
 object-fit:cover!important;filter:saturate(1.04)!important;transform:scale(1)!important;
 transition:transform .6s ease,filter .6s ease!important;}
#gallery #gallerySlider > .gallery-item:hover img{transform:scale(1.055)!important;filter:saturate(1.1)!important}
#gallery #gallerySlider > .gallery-item:hover{border-color:rgba(242,204,139,.64)!important;
 box-shadow:0 28px 65px rgba(0,0,0,.32)!important}
#gallery #gallerySlider > .gallery-item::before{content:"";position:absolute;inset:20% 0 0;z-index:1;pointer-events:none;
 background:linear-gradient(180deg,transparent 25%,rgba(2,17,33,.24) 52%,rgba(2,15,30,.95) 100%)}
#gallery #gallerySlider > .gallery-item .gallery-permanent-label{
 display:block!important;position:absolute!important;z-index:3!important;bottom:29px!important;left:26px!important;
 right:26px!important;top:auto!important;width:auto!important;max-width:none!important;
 padding:0!important;margin:0!important;opacity:1!important;visibility:visible!important;
 color:white!important;background:none!important;text-align:left!important;
 font:650 clamp(23px,2.45vw,33px)/1.18 'Playfair Display',Georgia,serif!important;
 letter-spacing:-.02em!important;transform:none!important;white-space:normal!important;text-shadow:0 2px 15px #0008}
#gallery #gallerySlider > .gallery-item .gallery-permanent-label::before{content:'VIEW ALBUM  ↗';display:block;
 color:#edc889;font:750 10px/1.3 Lato,Arial,sans-serif;letter-spacing:.2em;margin-bottom:13px}
#gallery #gallerySlider > .gallery-item .gallery-overlay{display:none!important}
#gallery .jn-gallery-progress{position:relative!important;width:min(1280px,calc(100% - 48px));max-width:1280px;
 height:3px;border-radius:10px;background:rgba(255,255,255,.18);margin:10px auto 0;overflow:hidden}
#gallery .jn-gallery-progress > span{display:block;width:16%;height:100%;background:linear-gradient(90deg,#b78838,#f5dfac);
 border-radius:10px;transform-origin:left;transition:transform .25s ease,width .25s ease}
/* New gallery pop-up is a premium editorial mosaic with true image viewing. */
#facilityModal{background:#f5f7fa!important;}
#facilityModal .modal-header{background:linear-gradient(100deg,#061b32,#123a5c)!important;}
#facilityModal .modal-content{max-width:1380px!important;width:min(100%,1380px)!important;margin:clamp(22px,4vw,56px) auto!important}
#facilityModal .modal-title{font-family:'Playfair Display',Georgia,serif!important;letter-spacing:-.035em!important}
#facilityModal .modal-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:clamp(12px,1.5vw,20px)!important;align-items:stretch!important}
#facilityModal .jn-photo-tile{position:relative;aspect-ratio:4/3!important;min-height:180px!important;
 border:0!important;border-radius:16px!important;box-shadow:0 8px 25px rgba(1,24,50,.10)!important;
 transition:box-shadow .25s,transform .25s!important;}
#facilityModal .jn-photo-tile:nth-child(7n+1){grid-column:span 2;aspect-ratio:16/9!important}
#facilityModal .jn-photo-tile:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(1,24,50,.17)!important}
#facilityModal .jn-photo-tile img{object-fit:cover!important;transition:transform .45s!important}
#facilityModal .jn-photo-tile:hover img{transform:scale(1.045)!important}
/* Restore butterfly experience for first session visit with an always-accessible skip option. */
#jn-new-loader{display:block!important;z-index:180000!important}
#jn-new-loader.jn-finished{visibility:hidden!important;pointer-events:none!important;opacity:0!important}
#jn-new-loader-poster{object-fit:contain!important;}
#jn-new-loader-tap{display:block!important;inset:auto 0 max(25px,env(safe-area-inset-bottom)) auto!important;
 width:auto!important;height:auto!important;background:none!important;pointer-events:none!important;z-index:45!important}
#jn-new-loader-tap button{pointer-events:auto!important;border:1px solid rgba(255,255,255,.58)!important;
 margin:0 max(20px,env(safe-area-inset-right));background:rgba(1,17,35,.6)!important;
 backdrop-filter:blur(12px);min-height:42px;cursor:pointer;font:700 11px Lato,Arial,sans-serif!important}
#jn-new-loader-tap button:focus-visible{outline:3px solid #fff;outline-offset:4px}
html.jn-intro-off #jn-new-loader{display:none!important}
/* School video remains 16:9 and visible on both desktop and mobile. */
#jn-home-screen .jn-home-video-frame{position:relative!important;aspect-ratio:16/9!important;
 background:#071f36!important;}
#jn-home-screen #jn-home-video-a{display:block!important;visibility:visible!important;
 width:100%!important;height:100%!important;object-fit:contain!important;background:#071f36;
 opacity:0!important;transition:opacity .35s!important;}
#jn-home-screen #jn-home-video-a.active{opacity:1!important}
#jn-home-screen #jn-home-video-a.jn-video-error{opacity:0!important}
#jn-home-screen .jn-video-button{position:absolute;z-index:31;bottom:16px;right:16px;width:44px;height:44px;
 border-radius:50%;border:1px solid rgba(255,255,255,.75);background:rgba(2,26,49,.75);
 color:#fff;display:grid;place-items:center;cursor:pointer;font:18px/1 Arial;backdrop-filter:blur(10px);}
#jn-home-screen .jn-video-button:hover{background:#cfa865;color:#02182c}
#jn-home-screen .jn-video-button:focus-visible{outline:3px solid #ffdd8c;outline-offset:4px}
@media(max-width:992px){
 #gallery .section-title{width:calc(100% - 36px)!important}
 #gallery .jn-gallery-toolbar{width:calc(100% - 36px)!important}
 #gallery #gallerySlider.gallery-grid{display:flex!important;grid-template-columns:none!important;
  padding:12px 18px 20px!important;overflow-x:auto!important;}
 #gallery #gallerySlider > .gallery-item,#gallery #gallerySlider > .gallery-item.wide,
 #gallery #gallerySlider > .gallery-item.big,#gallery #gallerySlider > .gallery-item.tall{
   flex:0 0 min(75vw,360px)!important;width:min(75vw,360px)!important;height:clamp(315px,62vw,425px)!important;
   min-height:0!important;max-width:none!important;}
 #gallery .jn-gallery-progress{width:calc(100% - 36px)}
 #facilityModal .modal-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #facilityModal .jn-photo-tile:nth-child(7n+1){grid-column:span 2}
}
@media(max-width:560px){
 #gallery{padding:60px 0 62px!important}
 #gallery .section-title{width:calc(100% - 34px)!important;margin-bottom:10px!important}
 #gallery .jn-gallery-toolbar{width:calc(100% - 34px)!important;margin:16px auto 9px}
 #gallery #gallerySlider.gallery-grid{display:flex!important;grid-template-columns:none!important;
  padding:14px 17px 24px!important;gap:12px!important;scroll-padding-inline:17px}
 #gallery #gallerySlider > .gallery-item,#gallery #gallerySlider > .gallery-item.wide,
 #gallery #gallerySlider > .gallery-item.big,#gallery #gallerySlider > .gallery-item.tall{
   flex:0 0 min(83vw,345px)!important;width:min(83vw,345px)!important;
   height:clamp(330px,112vw,400px)!important;min-height:0!important}
 #gallery #gallerySlider > .gallery-item .gallery-permanent-label{left:19px!important;right:19px!important;bottom:22px!important;
  font-size:25px!important}
 #gallery .jn-gallery-controls button{width:41px;height:41px}
 #facilityModal .modal-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 #facilityModal .jn-photo-tile,#facilityModal .jn-photo-tile:nth-child(7n+1){grid-column:span 1!important;
  aspect-ratio:3/4!important;min-height:140px!important;border-radius:12px!important}
 #facilityModal .jn-photo-tile:first-child{grid-column:span 2!important;aspect-ratio:16/10!important}
 #facilityModal .modal-content{margin:20px auto!important}
 #jn-home-screen .jn-video-button{width:40px;height:40px;bottom:9px;right:9px}
}
@media(prefers-reduced-motion:reduce){#gallery *{scroll-behavior:auto!important;transition-duration:.01ms!important}}
/* Last-step refinements: remove inherited decorative strips, align titles and mosaic. */
#gallery .section-title{display:block!important;box-sizing:border-box!important;margin-left:auto!important;margin-right:auto!important;}
#gallery .section-title::before,#gallery .section-title::after,#gallery .section-title h2::after{display:none!important;content:none!important;}
#gallery .section-title h2{display:block!important;width:100%!important;padding:0!important;}
#gallery .section-title p{margin:0!important;}
#facilityModal .modal-desc{min-height:0!important;padding:clamp(16px,2.5vw,26px)!important;
 background:linear-gradient(110deg,#fff,#f7f3eb)!important;border-left:3px solid #d5a857!important;
 border-radius:14px!important;line-height:1.65!important;text-align:left!important;}
#facilityModal .modal-desc p{margin:0!important;min-height:0!important;}
@media(max-width:560px){
 #facilityModal .jn-photo-tile:last-child:nth-child(even){grid-column:span 2!important;aspect-ratio:16/10!important}
}


/* FILE: scroll-backdrops-v46.css */
/* V46: scroll-responsive BACKGROUND artwork only. No element/content geometry changed.
   Replaces the V45 multi-colour static gradients with one coherent school palette:
   midnight navy, ivory, deep teal, muted lavender, sandstone and antique gold. */
:root {
 --jn46-navy: #102d49;
 --jn46-navy-deep: #0b2340;
 --jn46-teal: #2f777b;
 --jn46-gold: #bb944f;
 --jn46-text: #223a50;
}
/* Calm, readable paper-like section surfaces. Every alternate chapter has a
   distinct tint; decorative panels, not text blocks, travel in from each edge. */
#latest-activities.jn46-scene {background:linear-gradient(145deg,#f4faf8 0%,#e7f4f3 52%,#fffdf8 100%) !important}
#values-slider.jn46-scene {background:linear-gradient(136deg,#fcfaf5 0%,#f9f0e1 56%,#fffdf8 100%) !important}
#programs.jn46-scene {background:linear-gradient(138deg,#f6f8fc 0%,#eaf1fa 58%,#fefdfb 100%) !important}
.toppers-section.jn46-scene {background:linear-gradient(140deg,#fffdf7 0%,#f6f0e8 55%,#faf8f2 100%) !important}
#achievements.jn46-scene {background:linear-gradient(133deg,#f8f6ff 0%,#edeaf8 52%,#fffcf7 100%) !important}
#about.jn46-scene {background:linear-gradient(135deg,#fffdf9 0%,#f0f7f4 55%,#f9fcfb 100%) !important}
#principal.jn46-scene {background:linear-gradient(125deg,#071b32 0%,#153a58 52%,#09263d 100%) !important}
#foundress.jn46-scene {background:linear-gradient(130deg,#fffaf2 0%,#f7ede1 55%,#fdf9f4 100%) !important}
#admission-timeline.jn46-scene {background:linear-gradient(135deg,#f4f8ff 0%,#edf2fa 55%,#fffbf3 100%) !important}
#facilities.jn46-scene {background:linear-gradient(128deg,#f1f9f6 0%,#e9f2ee 53%,#fffefb 100%) !important}
#gallery.jn46-scene {background:linear-gradient(145deg,#071e36 0%,#15395b 53%,#09233d 100%) !important}
#faq.jn46-scene {background:linear-gradient(130deg,#fefbf7 0%,#f7f0e9 54%,#fffdf9 100%) !important}
#testimonials.jn46-scene {background:linear-gradient(130deg,#f4f8fb 0%,#eaf1f5 58%,#fbfdfc 100%) !important}
#contact.jn46-scene {background:linear-gradient(125deg,#f5f9f7 0%,#e9f2ef 55%,#fbfaf7 100%) !important}
/* These statistics sit on an intentionally dark chapter in the original site. */
.stats-section.jn46-scene {background:linear-gradient(115deg,#092841 0%,#145070 50%,#09263d 100%) !important}
/* The backdrop occupies no space, captures no interaction and cannot overlap text. */
.jn46-scene {position:relative!important;isolation:isolate}
.jn46-backdrop {position:absolute!important;inset:0;z-index:-1;overflow:hidden;pointer-events:none;contain:paint}
.jn46-shape {position:absolute;display:block;opacity:0;pointer-events:none;
  border:1px solid var(--jn46-stroke,rgba(26,79,89,.13));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42);
  transition:transform 1350ms cubic-bezier(.18,.75,.22,1), opacity 1350ms ease;
  border-radius:clamp(18px,3vw,42px);
  will-change:transform,opacity;
}
/* Two broad translucent, softly patterned rectangles glide in from opposite sides.
   They remain behind ALL headings, text, cards and controls. */
.jn46-shape-left {
  top:7%;left:-12%;width:clamp(220px,36vw,590px);height:clamp(230px,56%,640px);
  background:linear-gradient(135deg,var(--jn46-fill1,rgba(72,143,139,.19)),rgba(255,255,255,.025) 78%);
  transform:translate3d(-190px,0,0) rotate(-11deg);
}
.jn46-shape-right {
  bottom:5%;right:-13%;width:clamp(230px,37vw,620px);height:clamp(235px,55%,610px);
  background:linear-gradient(305deg,var(--jn46-fill2,rgba(195,157,94,.14)),rgba(255,255,255,.045) 78%);
  transform:translate3d(210px,0,0) rotate(12deg);
  transition-delay:100ms;
}
.jn46-shape-outline {
  top:28%;right:11%;width:clamp(130px,18vw,270px);height:clamp(150px,24vw,320px);
  border:1.5px solid var(--jn46-outline,rgba(48,103,121,.15));
  background:repeating-linear-gradient(0deg, transparent 0px, transparent 30px, var(--jn46-lines,rgba(41,102,111,.042)) 31px, transparent 32px);
  transform:translate3d(110px,25px,0) rotate(-15deg);
  transition-delay:220ms;
}
.jn46-scene.jn46-inview .jn46-shape-left {opacity:.83;transform:translate3d(0,0,0) rotate(-11deg)}
.jn46-scene.jn46-inview .jn46-shape-right {opacity:.78;transform:translate3d(0,0,0) rotate(12deg)}
.jn46-scene.jn46-inview .jn46-shape-outline {opacity:.7;transform:translate3d(0,0,0) rotate(-15deg)}
/* Subtle individuality without a disconnected rainbow of saturated colours. */
#latest-activities, #about, #facilities, #contact {--jn46-fill1:rgba(43,139,124,.18);--jn46-fill2:rgba(119,171,157,.17);--jn46-outline:rgba(44,111,98,.15)}
#values-slider, .toppers-section, #foundress, #faq {--jn46-fill1:rgba(198,158,98,.18);--jn46-fill2:rgba(225,188,133,.15);--jn46-outline:rgba(167,117,52,.16)}
#programs, #admission-timeline, #testimonials {--jn46-fill1:rgba(78,127,187,.17);--jn46-fill2:rgba(151,176,209,.15);--jn46-outline:rgba(58,102,162,.16)}
#achievements {--jn46-fill1:rgba(139,111,178,.14);--jn46-fill2:rgba(186,157,200,.13);--jn46-outline:rgba(120,83,162,.15)}
#principal,#gallery,.stats-section {--jn46-fill1:rgba(59,127,151,.19);--jn46-fill2:rgba(203,158,82,.12);--jn46-outline:rgba(231,199,131,.23);--jn46-stroke:rgba(201,213,219,.14);--jn46-lines:rgba(220,232,239,.042)}
/* Principal's Message: V45 gave this section a pale background but retained white
   lettering. This deep navy panel restores sufficient foreground contrast. */
#principal .principal-text h2 {color:#fff!important}
#principal .principal-text p {color:#e5eff4!important}
#principal .principal-text blockquote {color:#fdfdf8!important;background:rgba(255,255,255,.085)!important;border-color:rgba(255,255,255,.18)!important;border-left-color:#d5b574!important}
#principal .signature {color:#f3ce80!important}
/* Keep white lettering on the intentionally dark gallery/stats sections. */
#gallery .section-title h2 {color:#fff!important}
#gallery .section-title p {color:#e5eff4!important}
@media(max-width:700px) {
 .jn46-shape-left {left:-30%;width:88%;height:45%;}
 .jn46-shape-right {right:-36%;width:90%;height:45%;}
 .jn46-shape-outline {right:6%;top:43%;width:38%;height:23%;}
 .jn46-scene.jn46-inview .jn46-shape-left,.jn46-scene.jn46-inview .jn46-shape-right {opacity:.55}
}
@media(prefers-reduced-motion:reduce) {
 .jn46-shape,.jn46-scene.jn46-inview .jn46-shape {transition:none!important;transform:none!important;will-change:auto!important}
 .jn46-shape {opacity:.45!important}
}

