/* ════════════════════════════════════════
   DARUL ILM – PREMIUM EFFECTS CSS
   Extra animations, particles, gallery,
   cursor, counters, parallax, glassmorphism
════════════════════════════════════════ */

/* ── CUSTOM CURSOR ── */
*, *::before, *::after { cursor: none !important; }
.custom-cursor {
  position: fixed; top: 0; left: 0; z-index: 99999;
  pointer-events: none;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--sky);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%,-50%);
  transition: transform 0.1s, background 0.2s;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 2px solid rgba(33,150,243,0.5);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%,-50%);
  transition: transform 0.12s ease, width 0.2s, height 0.2s, border-color 0.2s;
}
.cursor-ring.hovered {
  width: 56px; height: 56px;
  border-color: var(--sky);
  background: rgba(33,150,243,0.06);
}

/* ── PARTICLES CANVAS ── */
#particles-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: 0.45;
}

/* ── PAGE LOADER ── */
#page-loader {
  position: fixed; inset: 0; z-index: 99998;
  background: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo img { width: 80px; height: 80px; object-fit: contain; animation: loader-pulse 1.5s ease-in-out infinite; }
@keyframes loader-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.08);opacity:0.8} }
.loader-bar-wrap {
  width: 200px; height: 3px;
  background: var(--grey-200); border-radius: 3px; overflow: hidden;
}
.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--sky-dark));
  border-radius: 3px;
  animation: loader-fill 1.8s ease forwards;
}
@keyframes loader-fill { from{width:0} to{width:100%} }
.loader-text { font-size: 0.8rem; color: var(--grey-400); letter-spacing: 0.15em; text-transform: uppercase; }

/* ── ENHANCED HERO ── */
#hero { position: relative; }
.hero-particle {
  position: absolute; border-radius: 50%;
  background: rgba(33,150,243,0.15);
  pointer-events: none; z-index: 0;
  animation: float-particle linear infinite;
}
@keyframes float-particle {
  0%  { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { opacity: 0.6; }
  100%{ transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.hero-title .highlight {
  position: relative; display: inline-block;
}
.hero-title .highlight::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--sky), var(--sky-dark));
  border-radius: 2px;
  animation: underline-grow 1s 0.8s ease both;
  transform-origin: left;
}
@keyframes underline-grow { from{transform:scaleX(0)} to{transform:scaleX(1)} }

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block; width: 3px; height: 1em;
  background: var(--sky); margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── ANIMATED COUNTER ── */
.stat-num { display: inline-block; }
.stat-num.counting { animation: count-pop 0.3s ease; }
@keyframes count-pop { 0%{transform:scale(1)} 50%{transform:scale(1.15)} 100%{transform:scale(1)} }

/* ── TILT CARDS ── */
.course-card, .why-card, .testi-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.course-card .card-shine,
.why-card .card-shine,
.testi-card .card-shine {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.15) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none; z-index: 10;
  opacity: 0; transition: opacity 0.3s;
}
.course-card:hover .card-shine,
.why-card:hover .card-shine,
.testi-card:hover .card-shine { opacity: 1; }

/* ── RIPPLE BUTTON ── */
.btn-primary, .btn-secondary, .wa-btn, .call-btn {
  position: relative; overflow: hidden;
}
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ── SCROLL PROGRESS BAR ── */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 10001;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--sky), var(--sky-dark), #7c3aed);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(33,150,243,0.6);
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed; bottom: 96px; right: 28px; z-index: 500;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--sky), var(--sky-dark));
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(33,150,243,0.35);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  cursor: pointer;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(33,150,243,0.45); }
#back-to-top svg { width: 20px; height: 20px; stroke: white; fill: none; stroke-width: 2.5; }

/* ── SECTION DIVIDERS (animated wave) ── */
.wave-divider {
  position: relative; height: 60px; overflow: hidden; margin-top: -1px;
}
.wave-divider svg { position: absolute; bottom: 0; width: 100%; }

/* ── GLASSMORPHISM CARDS ── */
.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 32px rgba(33,150,243,0.1);
}

/* ── ENHANCED GALLERY ── */
#gallery { padding-bottom: 100px; }

.gallery-filter {
  display: flex; justify-content: center; gap: 0.75rem;
  flex-wrap: wrap; margin: 2rem 0 2.5rem;
}
.filter-btn {
  padding: 0.5rem 1.4rem;
  border-radius: 50px;
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  color: var(--grey-600);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--sans);
}
.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, var(--sky), var(--sky-dark));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(33,150,243,0.3);
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media(max-width:900px){ .gallery-masonry { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px){ .gallery-masonry { grid-template-columns: 1fr; } }

.gallery-item {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer;
  background: var(--grey-100);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item.hidden { display: none; }
.gallery-item:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-lg); }
.gallery-item img {
  width: 100%; height: 260px; object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item.tall img { height: 380px; }

.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(21,101,192,0.85) 0%, transparent 55%);
  opacity: 0; transition: opacity var(--transition);
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 1.4rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { font-family: var(--serif); font-size: 1.05rem; color: white; font-weight: 700; margin-bottom: 0.3rem; }
.gallery-overlay p { font-size: 0.78rem; color: rgba(255,255,255,0.8); }
.gallery-zoom-icon {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s, transform 0.25s;
}
.gallery-item:hover .gallery-zoom-icon { opacity: 1; transform: scale(1); }
.gallery-zoom-icon svg { width: 16px; height: 16px; stroke: var(--sky-dark); fill: none; stroke-width: 2.5; }

/* Gallery category badge */
.gallery-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(33,150,243,0.9);
  color: white; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border-radius: 50px;
}

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.93);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
  animation: lb-in 0.25s ease;
}
#lightbox.open { display: flex; }
@keyframes lb-in { from{opacity:0} to{opacity:1} }
#lightbox img {
  max-width: 92vw; max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: lb-scale 0.3s cubic-bezier(0.34,1.56,0.64,1);
  object-fit: contain;
}
@keyframes lb-scale { from{transform:scale(0.8)} to{transform:scale(1)} }
.lb-close {
  position: fixed; top: 20px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: white; font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lb-close:hover { background: rgba(255,255,255,0.25); }
.lb-caption {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  color: white; font-size: 0.88rem; font-weight: 500;
  padding: 0.6rem 1.5rem; border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15);
  text-align: center; white-space: nowrap;
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 50%; color: white; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s; user-select: none;
}
.lb-nav:hover { background: rgba(255,255,255,0.28); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ── ENHANCED TESTIMONIALS SLIDER ── */
.testi-slider-wrap {
  position: relative; overflow: hidden; padding-bottom: 3rem;
}
.testi-track {
  display: flex; gap: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.testi-track .testi-card {
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 0;
}
@media(max-width:900px){ .testi-track .testi-card { flex: 0 0 calc(50% - 0.75rem); } }
@media(max-width:600px){ .testi-track .testi-card { flex: 0 0 100%; } }
.testi-dots {
  display: flex; justify-content: center; gap: 0.5rem;
  position: absolute; bottom: 0; left: 0; right: 0;
}
.testi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grey-200); border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.testi-dot.active { background: var(--sky); transform: scale(1.3); }
.testi-nav-btns {
  display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem;
}
.testi-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--grey-200);
  background: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.testi-nav-btn:hover {
  border-color: var(--sky);
  background: var(--sky-pale);
  box-shadow: var(--shadow-md);
}
.testi-nav-btn svg { width: 18px; height: 18px; stroke: var(--sky-dark); fill: none; stroke-width: 2.5; }

body { padding-bottom: 0; }
@media(max-width:600px){ #back-to-top { bottom: 28px; } }

/* ── ENHANCED SECTION TRANSITIONS ── */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.from-left  { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.zoom-in    { transform: scale(0.92); }
.reveal.visible    { opacity: 1; transform: none !important; }

/* ── GLOW EFFECTS ── */
.btn-primary:hover { box-shadow: 0 8px 30px rgba(33,150,243,0.5), 0 0 0 4px rgba(33,150,243,0.1); }
.course-card:hover { box-shadow: 0 16px 48px rgba(33,150,243,0.18); }
.contact-card:hover .c-icon-wrap { background: linear-gradient(135deg, var(--sky), var(--sky-dark)); }
.contact-card:hover .c-icon-wrap { transform: scale(1.1) rotate(-5deg); transition: all 0.3s; }

/* ── FLOATING LABELS (form) ── */
.form-group { position: relative; }
.form-group input:not(:placeholder-shown) + label,
.form-group input:focus + label,
.form-group select:focus + label {
  top: -0.5rem; font-size: 0.7rem; color: var(--sky);
}

/* ── COUNTER SECTION ── */
.stats-band {
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  padding: 56px 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem; text-align: center;
  position: relative; overflow: hidden;
}
.stats-band::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.stat-item { position: relative; z-index: 1; }
.stat-item .big-num {
  font-family: var(--serif); font-size: clamp(2.5rem,5vw,4rem);
  font-weight: 800; color: white; display: block; line-height: 1;
}
.stat-item .big-lbl {
  font-size: 0.88rem; color: rgba(255,255,255,0.8);
  font-weight: 500; margin-top: 0.4rem; letter-spacing: 0.04em;
}
.stat-item .stat-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ── MARQUEE TRUST STRIP ── */
.trust-strip {
  background: var(--grey-50);
  padding: 1.2rem 0;
  overflow: hidden;
  border-top: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
}
.trust-track {
  display: flex; gap: 3rem; align-items: center;
  animation: marquee 20s linear infinite;
  white-space: nowrap; width: max-content;
}
.trust-track:hover { animation-play-state: paused; }
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.trust-item {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 600; color: var(--grey-600);
  letter-spacing: 0.04em;
}
.trust-item .ti-icon { font-size: 1.1rem; }

/* ── PULSE RING (hero) ── */
.pulse-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(33,150,243,0.25);
  animation: pulse-expand 3s ease-out infinite;
  pointer-events: none;
}
.pulse-ring:nth-child(2) { animation-delay: 1s; }
.pulse-ring:nth-child(3) { animation-delay: 2s; }
@keyframes pulse-expand {
  0%  { transform: scale(0.8); opacity: 1; }
  100%{ transform: scale(2.2); opacity: 0; }
}

/* ── TEXT GRADIENT ANIMATION ── */
.animated-gradient-text {
  background: linear-gradient(270deg, var(--sky), var(--sky-dark), #7c3aed, var(--sky));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}
@keyframes gradient-shift { 0%{background-position:0%} 50%{background-position:100%} 100%{background-position:0%} }

/* ── TOOLTIP ── */
[data-tooltip] { position: relative; }
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--grey-800); color: white;
  font-size: 0.72rem; font-weight: 500;
  padding: 0.35rem 0.75rem; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
}
[data-tooltip]:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── ABOUT IMAGE HOVER ── */
.about-logo-wrap {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s;
}
.about-logo-wrap:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 64px rgba(33,150,243,0.2);
}

/* ── SECTION NUMBER DECORATION ── */
.section-num {
  font-family: var(--serif); font-size: 6rem; font-weight: 800;
  color: rgba(33,150,243,0.05); position: absolute;
  top: 1rem; right: 5%; line-height: 1; pointer-events: none;
  user-select: none;
}

/* ── ANIMATED BORDER ── */
@keyframes border-dance {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animated-border {
  border: 2px solid transparent;
  background: linear-gradient(white,white) padding-box,
              linear-gradient(90deg, var(--sky), #7c3aed, var(--sky)) border-box;
  background-size: 200% auto;
  animation: border-dance 3s linear infinite;
}

/* ── FLOATING ACTION BADGE ── */
.hero-badge {
  animation: badge-bounce 2.5s ease-in-out infinite;
}
@keyframes badge-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

/* ── MOBILE ENHANCEMENTS ── */
@media(max-width:600px){
  .section-num { display: none; }
  .gallery-item img { height: 200px; }
  .gallery-item.tall img { height: 260px; }
  .stats-band { grid-template-columns: repeat(2,1fr); }
}
