/* Modern Professional Theme */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #181c24 !important;
  color: #e0e3ea !important;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden; /* prevent horizontal scroll */
  width: 100%;
}

/* Header & Navigation */
header {
  background: #232837 !important;
  color: #e0e3ea !important;
  box-shadow: 0 2px 12px rgba(30,34,90,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  position: relative;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  color: #ffb300 !important;
  letter-spacing: 2px;
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav ul li a {
  color: #e0e3ea !important;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

nav ul li a.active,
nav ul li a:hover {
  background: #ffb300 !important;
  color: #232837 !important;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2em;
  color: #1a237e;
  cursor: pointer;
}

@media (max-width: 900px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #1a237e;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    z-index: 1001;
    padding: 0;
    margin: 0;
  }
  nav ul.open {
    display: flex;
  }
  .navbar-toggle {
    display: block;
  }
  nav ul li a {
    color: #fff;
    background: none;
  }
  nav ul li a.active,
  nav ul li a:hover {
    background: #ffb300;
    color: #fff;
  }
}

/* Loader */
#loader-bg {
  position: fixed;
  z-index: 9999;
  background: #181c24 !important;
  width: 100vw;
  height: 100vh;
  top: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1);
}
.spark-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.spark-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb300 0%, #1a237e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  animation: spin 1.4s linear infinite;
}
.spark-logo span {
  color: #fff;
  font-size: 2.2em;
  font-weight: bold;
  letter-spacing: 2px;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}
.spark-loader-text {
  font-size: 1.2em;
  color: #f3b408;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Hide loader when opacity is 0 */
#loader-bg[style*="opacity: 0"] {
  pointer-events: none;
  visibility: hidden;
  /* Optionally, you can set display: none if you want it to be removed from layout */
}

/* Pause loader animation when hidden */
#loader-bg[style*="display: none"] .spark-logo {
  animation-play-state: paused !important;
}

/* Hide loader and pause animation when display is none */
#loader-bg[style*="display: none"] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
#loader-bg[style*="display: none"] .spark-logo {
  animation-play-state: paused !important;
  opacity: 0 !important;
}

/* Main Content */
main {
  max-width: 1000px;
  margin: 32px auto 0 auto;
  background: #23273a !important;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(30,34,90,0.07);
  padding: 32px 24px;
  overflow-wrap: break-word; /* Prevent long words breaking layout */
}

@media (max-width: 900px) {
  main {
    padding: 18px 6px;
  }
}

/* Headings */
h1, h2, h3, h4 {
  color: #ffb300 !important;
  font-weight: 700;
  margin-bottom: 0.5em;
  line-height: 1.2;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p, ul, ol {
  color: #e0e3ea !important;
  margin-bottom: 1.2em;
}

/* Buttons */
.cta-button, .btn, button, input[type="submit"] {
  background: #ffb300 !important;
  color: #232837 !important;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0, 119, 255, 0.12);
  margin-right: 10px;
}
.cta-button:hover, .btn:hover, button:hover, input[type="submit"]:hover {
  background: #232837 !important;
  color: #ffb300 !important;
}

/* Cards & Sections */
.card, .program-card, .event-card, .blog-post, .faculty-member, .testimonial {
  background: #23273a !important;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(30,34,90,0.10);
  padding: 24px;
  margin-bottom: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow-wrap: break-word; /* avoid overflow */
}
.card:hover, .program-card:hover, .event-card:hover, .blog-post:hover, .faculty-member:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(30,34,90,0.18);
}

/* Gallery */
.about-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 32px 0;
}
.about-gallery img {
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(30,34,90,0.10);
  width: 220px;
  height: 140px;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), box-shadow 0.4s;
  max-width: 100%;
  display: block;
}
.about-gallery img:hover {
  transform: scale(1.07) rotate(-2deg);
  box-shadow: 0 8px 32px rgba(30,34,90,0.18);
}

/* Responsive images (including hero) */
.hero-image, img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Carousel fixes */
.carousel {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Forms */
form {
  margin: 24px 0;
}
input, textarea {
  border: 1px solid #353a4d !important;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 16px;
  background: #23273a !important;
  color: #e0e3ea !important;
  transition: border 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
input:focus, textarea:focus {
  border-color: #ffb300 !important;
  box-shadow: 0 0 0 2px rgba(255,179,0,0.15) !important;
}

::-webkit-input-placeholder { color: #b0b3bb !important; }
::-moz-placeholder { color: #b0b3bb !important; }
:-ms-input-placeholder { color: #b0b3bb !important; }
::placeholder { color: #b0b3bb !important; }

/* Blockquotes, Lists, Misc */
blockquote {
  font-size: 1.15em;
  font-style: italic;
  color: #ffb300 !important;
  border-left: 4px solid #ffb300 !important;
  padding-left: 14px;
  margin: 12px 0 20px 0;
  background: #232837 !important;
}
ul, ol {
  padding-left: 22px;
}
li {
  margin-bottom: 7px;
}

/* Footer */
footer {
  background: #181c24 !important;
  color: #e0e3ea !important;
  text-align: center;
  padding: 32px 0 16px 0;
  margin-top: 48px;
  font-size: 1em;
  letter-spacing: 1px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Hero Section */
.hero-bg-slideshow {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
}
.hero-bg-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 1;
}
.hero-bg-slide.active {
    opacity: 1;
    z-index: 2;
}
.hero-content-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(26,35,126,0.55) 0%, rgba(255,179,0,0.25) 100%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-content {
    position: relative;
    z-index: 4;
    color: #fff;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.hero-content h1, .hero-content p {
    color: #fff;
    text-shadow: 0 2px 12px rgba(30,34,90,0.25);
}
@media (max-width: 700px) {
    .hero-bg-slideshow { height: 260px; }
    .hero-content h1 { font-size: 1.5rem; }
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  main, .card, .program-card, .event-card, .blog-post {
    background: #23273a !important;
    color: #e0e3ea !important;
  }
  h1, h2, h3, h4 {
    color: #fff !important;
  }
}

/* Loader dark background */
#loader-bg {
  background: #181c24 !important;
}

/* Ensure strong and list items are visible in dark theme */
.vision-mission-section ul li,
.introduction ul li,
ul li,
ol li {
  color: #ffd54f !important;
  font-weight: 600 !important;
}

.vision-mission-section ul li strong,
.introduction ul li strong,
ul li strong,
ol li strong {
  color: #fff !important;
  font-weight: 700 !important;
}

/* Ensure carousel/event text is visible in dark theme */
.carousel-item,
.carousel-item h3,
.carousel-item p {
  background: #8a8837 !important;
  color: #ffd54f !important;
}

.carousel-item h3 {
  color: #fff !important;
}

.carousel-item p {
  color: #e0e3ea !important;
}
