/* ==========================================================================
   ICFMSGT-2027: International Conference on Functional Materials for 
   Sustainability and Green Technology
   Organized by: Department of Physics, SBAS, MGM University, Chhatrapati Sambhajinagar
   Clean, Responsive Green-Tech Stylesheet with Modern Animations & Justified Typography
   ========================================================================== */

:root {
  /* Font Family Stacks */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Theme Palette */
  --primary: #0d5c3a;
  --primary-dark: #072e1d;
  --primary-light: #15803d;
  --primary-subtle: #edf7f2;
  
  --accent-green: #10b981;
  --accent-mint: #34d399;
  --accent-gold: #c28b38;
  --accent-gold-dark: #9b6c24;
  --accent-gold-light: #dfa143;
  --accent-gold-subtle: #fdf8f0;

  --dark: #0f172a;
  --dark-slate: #1e293b;
  --muted: #475569;
  --light-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --border-color: #e2e8f0;
  --border-accent: rgba(13, 92, 58, 0.15);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(13, 92, 58, 0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.07);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 50rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  font-family: var(--font-body);
  color: var(--dark-slate);
  background-color: var(--light-bg);
  font-size: 1.04rem;
  line-height: 1.76;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.018em;
}

/* Paragraph Typography & Justified Alignment */
p {
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--dark-slate);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  margin-bottom: 1rem;
}

.leading-relaxed {
  line-height: 1.8 !important;
  text-align: justify;
  text-justify: inter-word;
}

.text-justify {
  text-align: justify !important;
  text-justify: inter-word !important;
}

.small, small {
  font-size: 0.96rem !important;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--accent-green);
}

/* Scroll Progress Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #dfa143 100%);
  z-index: 1060;
  transition: width 0.1s ease-out;
}

/* Background Utility Classes */
.bg-surface-soft {
  background-color: var(--surface-soft) !important;
}

.bg-white-section {
  background-color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Top Bar
   -------------------------------------------------------------------------- */
.top-bar {
  background: var(--primary-dark);
  color: #e2e8f0;
  font-size: 0.88rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar a {
  color: #a7f3d0;
  font-weight: 600;
}

.top-bar a:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Main Navbar (Balanced, Larger Logo & Reduced Gap)
   -------------------------------------------------------------------------- */
.navbar-minimal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 14px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}

.navbar-minimal.scrolled {
  padding: 5px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.brand-logo-main {
  height: 68px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-logo-main:hover {
  transform: scale(1.04);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.navbar-nav {
  gap: 1px;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-slate) !important;
  padding: 8px 10px !important;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-subtle);
}

/* Shimmer & Glow ERP Button */
.btn-erp {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 0.9rem;
  box-shadow: 0 3px 10px rgba(194, 139, 56, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-erp::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-25deg);
  transition: none;
}

.btn-erp:hover::after {
  left: 200%;
  transition: left 0.85s ease;
}

.btn-erp:hover {
  background: linear-gradient(135deg, var(--accent-gold-dark) 0%, var(--accent-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(194, 139, 56, 0.4);
}

.btn-primary-green {
  background: var(--primary);
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-green:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 92, 58, 0.3);
}

.btn-outline-green {
  background: transparent;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary);
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  font-size: 0.88rem;
}

.btn-outline-green:hover {
  background: var(--primary);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Hero Section with Dynamic Particle Canvas
   -------------------------------------------------------------------------- */
.hero-minimal {
  background: linear-gradient(180deg, #062416 0%, #0d4a30 100%);
  color: #ffffff;
  padding: 65px 0 75px;
  position: relative;
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.hero-minimal .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.2); }
  100% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.5); }
}

.hero-title {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  font-weight: 800;
  line-height: 1.22;
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero-title span.highlight-green {
  color: #6ee7b7;
  text-shadow: 0 0 20px rgba(110, 231, 183, 0.35);
}

.hero-org-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  backdrop-filter: blur(8px);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero-org-card:hover {
  border-color: rgba(110, 231, 183, 0.5);
  transform: translateY(-2px);
}

.hero-dates-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.75rem;
}

.date-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.date-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

/* Minimal Countdown with Animated Digits */
.countdown-card {
  background: rgba(6, 32, 20, 0.92);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.countdown-flex {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.count-unit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  transition: transform 0.2s ease;
}

.count-unit:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.14);
}

.count-val {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.count-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Section Containers & Headers
   -------------------------------------------------------------------------- */
.section-pad {
  padding: 65px 0;
  position: relative;
}

.section-head {
  margin-bottom: 34px;
}

.section-head .sub-badge {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 4px;
}

.section-head h2 {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.head-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-green));
  border-radius: 2px;
  margin: 8px auto 0;
}

/* --------------------------------------------------------------------------
   Content Boxes & Cards (Justified Text & Polished Font Size)
   -------------------------------------------------------------------------- */
.content-box {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.content-box p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--dark-slate);
  text-align: justify;
  text-justify: inter-word;
  margin-bottom: 0.85rem;
}

.content-box p:last-child {
  margin-bottom: 0;
}

.content-box:hover {
  border-color: rgba(13, 92, 58, 0.25);
  box-shadow: var(--shadow-md);
}

.attend-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.attend-card p {
  font-size: 1.01rem;
  line-height: 1.78;
  color: var(--dark-slate);
  text-align: justify;
  text-justify: inter-word;
  margin-bottom: 0;
}

.attend-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.campus-gallery-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.campus-gallery-card p {
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: left;
}

.campus-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.campus-gallery-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.campus-gallery-card:hover .campus-gallery-img {
  transform: scale(1.04);
}

.topics-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.topics-list li {
  font-size: 0.98rem;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.topics-list li:last-child {
  border-bottom: none;
}

.topics-list li:hover {
  background-color: var(--primary-subtle);
  transform: translateX(4px);
}

.topics-list li i {
  color: var(--accent-green);
  font-size: 1.05rem;
  margin-top: 3px;
  transition: transform 0.25s ease;
}

.topics-list li:hover i {
  transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   Photo Cards: 413 × 513 px Aspect Ratio (Patrons, Steering, Speakers)
   -------------------------------------------------------------------------- */
.person-card-413x513 {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.person-card-413x513:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(13, 92, 58, 0.14);
  border-color: var(--primary);
}

.person-photo-container {
  width: 100%;
  aspect-ratio: 413 / 513;
  position: relative;
  background: linear-gradient(135deg, #0d4a30 0%, #174d39 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.person-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.person-card-413x513:hover .person-photo-container img {
  transform: scale(1.04);
}

.person-details {
  padding: 15px 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.person-details h5 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--dark);
  line-height: 1.3;
}

.person-details p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.35;
  text-align: center;
}

.person-details p.role-patron {
  color: var(--accent-gold-dark);
  font-weight: 600;
}

.person-details p.role-steering {
  color: var(--primary);
  font-weight: 600;
}

.advisory-column {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advisory-column:hover {
  box-shadow: var(--shadow-md);
}

.advisory-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.94rem;
}

.advisory-list li {
  padding: 7px 4px;
  border-bottom: 1px dashed #f1f5f9;
  color: var(--dark-slate);
  transition: all 0.2s ease;
}

.advisory-list li:hover {
  background-color: var(--primary-subtle);
  padding-left: 8px;
  color: var(--primary-dark);
}

.advisory-list li:last-child {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Registration & ERP Banner
   -------------------------------------------------------------------------- */
.erp-card-minimal {
  background: linear-gradient(135deg, #082d1c 0%, #0d4a30 100%);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}

.erp-card-minimal p {
  text-align: center;
  font-size: 1.05rem;
}

.table-custom {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-custom table {
  margin-bottom: 0;
}

.table-custom thead {
  background: var(--primary);
  color: #ffffff;
}

.table-custom thead th {
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
}

.table-custom tbody td {
  padding: 14px 16px;
  font-size: 0.96rem;
  vertical-align: middle;
  border-color: #f1f5f9;
}

.table-custom tbody tr {
  transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
  background-color: var(--primary-subtle);
}

/* --------------------------------------------------------------------------
   Footer & Floating Elements
   -------------------------------------------------------------------------- */
.footer-minimal {
  background: var(--dark);
  color: #94a3b8;
  padding: 45px 0 25px;
  font-size: 0.92rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-minimal p {
  text-align: center;
  font-size: 0.96rem;
}

.footer-minimal a {
  color: #cbd5e1;
}

.footer-minimal a:hover {
  color: #34d399;
}

.floating-erp-pill {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1020;
  animation: floatBounce 4s infinite ease-in-out;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Back to Top Button */
#backToTopBtn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 1020;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTopBtn:hover {
  background: var(--accent-green);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* --------------------------------------------------------------------------
   Scroll Reveal Animations
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.reveal-left {
  transform: translateX(-40px);
}

.reveal.reveal-right {
  transform: translateX(40px);
}

.reveal.reveal-zoom {
  transform: scale(0.94);
}

.reveal.active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Mobile & Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .navbar-collapse {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    border: 1px solid var(--border-color);
  }
  .navbar-nav {
    gap: 4px;
    margin-bottom: 12px;
  }
  .nav-link {
    padding: 9px 12px !important;
  }
}

@media (max-width: 767.98px) {
  body { font-size: 0.98rem; }
  p, .content-box p, .attend-card p { font-size: 0.98rem; }
  .brand-logo-main { height: 52px; }
  .brand-title { font-size: 1.05rem; }
  .hero-title { font-size: 1.65rem; }
  .countdown-flex { grid-template-columns: repeat(2, 1fr); }
  .count-val { font-size: 1.4rem; }
  .floating-erp-pill { bottom: 15px; right: 15px; }
  #backToTopBtn { bottom: 15px; left: 15px; width: 38px; height: 38px; }
  .btn-erp { padding: 7px 14px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
