:root {
  /* Light theme colors */
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4cc9f0;
  --text-color: #333333;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --footer-bg: #2b2d42;
  --input-bg: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --overlay: rgba(255, 255, 255, 0.9);
  --gradient: linear-gradient(135deg, #4361ee, #4cc9f0);
  --text-on-dark: #ffffff;
  --success: #4ade80;
  --error: #f87171;

  /* Animation timing */
  --transition: all 0.3s ease;
}

.dark-theme {
  --primary-color: #4895ef;
  --secondary-color: #4361ee;
  --accent-color: #4cc9f0;
  --text-color: #e0e0e0;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --footer-bg: #0d0d0d;
  --input-bg: #2a2a2a;
  --border-color: #444444;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  --overlay: rgba(18, 18, 18, 0.9);
  --gradient: linear-gradient(135deg, #4895ef, #4cc9f0);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition);
}

.nepali {
  font-family: "Noto Sans Nepali", sans-serif;
}

/* Header and Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--overlay);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.nav-hidden {
  transform: translateY(-100%);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 15px;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

/* Special spacing for admission link */
.nav-links li.admission-link {
  margin-left: 40px;
  position: relative;
}

.nav-links li.admission-link::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background-color: var(--border-color);
}

@media (max-width: 768px) {
  .nav-links li.admission-link {
    margin-left: 0;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
  }

  .nav-links li.admission-link::before {
    display: none;
  }
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--gradient);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(67, 97, 238, 0.3);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon fill="rgba(67, 97, 238, 0.05)" points="0,100 100,0 100,100"/></svg>');
  background-size: cover;
  z-index: -1;
}

.hero-content {
  max-width: 700px;
  z-index: 1;
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  color: var(--text-color);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

/* Principal Message Section */
.principal-message-content {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  margin-top: 40px;
}

.principal-image {
  flex-shrink: 0;
}

.principal-image img {
  width: 250px;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.principal-text {
  flex: 1;
}

.principal-text h3 {
  font-size: 2rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.principal-text .title {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 25px;
  font-weight: 600;
}

.message p {
  margin-bottom: 20px;
  text-align: justify;
}

.contact-info {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--primary-color);
}

/* Section Styles */
.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-title p {
  max-width: 700px;
  margin: 20px auto 0;
  font-size: 1.1rem;
  opacity: 0.8;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

.about-image:hover img {
  transform: scale(1.05);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.feature i {
  font-size: 1.5rem;
  color: var(--primary-color);
  background: rgba(67, 97, 238, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Services Section */
.services {
  background-color: rgba(67, 97, 238, 0.03);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-image {
  height: 200px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-image img {
  transform: scale(1.1);
}

.service-content {
  padding: 25px;
}

.service-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-content p {
  margin-bottom: 20px;
  color: var(--text-color);
  opacity: 0.9;
}

/* Contact Section */
.contact {
  position: relative;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.contact-form {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--primary-color);
}

.contact-form .form-control {
  margin-bottom: 0;
}

.contact-form .btn {
  width: 100%;
  margin-top: 10px;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact-method i {
  font-size: 1.5rem;
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  background: rgba(67, 97, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-container {
  flex: 1;
}

.map-container h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.map-placeholder {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 5% auto;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 25px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: var(--primary-color);
}

.close {
  color: var(--text-color);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 30px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: var(--text-on-dark);
  padding: 70px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.footer-column h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: #cccccc;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--accent-color);
  transform: translateX(5px);
}

.footer-links i {
  width: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link{
  width: 40px;
  height:40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent-color);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-content {
    max-width: 100%;
    text-align: center;
    padding-top: 80px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .about-content,
  .principal-message-content {
    flex-direction: column;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-form {
    order: 2;
  }

  .map-container {
    order: 3;
  }
}

@media (max-width: 768px) {
  .navbar {
    position: relative;
  }

  .menu-toggle {
    display: block;
    order: 3;
    margin-left: auto;
  }

  .nav-buttons {
    order: 2;
    margin-right: 15px;
  }

  .logo {
    order: 1;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--overlay);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: var(--transition);
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-links li {
    margin: 15px 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    gap: 15px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .logo-text span {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
  }

  .modal-header,
  .modal-body {
    padding: 20px;
  }
}

/* Success Modal */
.success-modal {
  display: none;
  position: fixed;
  z-index: 2001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.success-modal-content {
  background-color: var(--card-bg);
  margin: 15% auto;
  padding: 40px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

.success-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 20px;
}

.success-modal h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.success-modal p {
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.success-modal .btn {
  margin-top: 10px;
}

/* Gallery Section */
.gallery-filter {
  text-align: center;
  margin-bottom: 50px;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-btn {
  padding: 10px 25px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.gallery-info p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.gallery-zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-color);
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 3001;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--accent-color);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3001;
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.lightbox-image-container {
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
  margin-top: 20px;
  color: white;
  text-align: center;
}

.lightbox-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--accent-color);
}

.lightbox-info p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Gallery Animation */
.gallery-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Gallery */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }

  .gallery-item img {
    height: 200px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 2rem;
  }

  .lightbox-counter {
    bottom: 20px;
    padding: 8px 15px;
    font-size: 0.8rem;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-image-container img {
    max-height: 60vh;
  }

  .lightbox-info h3 {
    font-size: 1.2rem;
  }

  .lightbox-info p {
    font-size: 0.9rem;
  }
}
