/* Global Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0; 
  padding: 0; 
  background: #f4f4f4;
  color: #333;
  line-height: 1.6; /* Improved readability */
}

/* Header */
header {
  background-color: #001f4d;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Added shadow for depth */
}
header img {
  height: 70px;
  margin-right: 20px;
}
header h1 {
  font-size: 24px;
  margin: 0;
}

/* Navigation */
nav {
  background: #003366;
  display: flex;
  justify-content: center;
  margin-top: 90px; /* Adjust for fixed header */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
nav a {
  color: white;
  padding: 15px 20px;
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s; /* Added transform for hover effect */
}
nav a:hover {
  background: #00509e;
  transform: translateY(-2px); /* Subtle lift on hover */
}
.submenu {
  display: none;
  background-color: #004080;
  text-align: center;
}
nav .has-submenu:hover .submenu {
  display: block;
  position: absolute;
  top: 145px; /* Adjust for fixed header */
  width: 100%;
  z-index: 1001;
}
.submenu a {
  display: block;
  color: white;
  padding: 10px 0;
  transition: background 0.3s;
}
.submenu a:hover {
  background: #00509e;
}

/* Container and Sections */
.container {
  max-width: 1000px;
  background: white;
  margin: 20px auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Added shadow */
}
.welcome-image {
  max-width: 100%;
  border-radius: 10px;
  transition: transform 0.3s; /* Subtle animation */
}
.welcome-image:hover {
  transform: scale(1.02);
}
h2 {
  color: #001f4d;
  border-bottom: 2px solid #003366; /* Added underline for headings */
  padding-bottom: 10px;
}
section {
  padding: 4rem 2rem;
  min-height: 100vh;
}
#home {
  background: linear-gradient(to right, #001f4d, #003366);
  color: white;
  text-align: center;
}
#about-us, #admission, #academic, #guidance-counselling, #facilities, #gallery, #notice-board, #contact-us {
  background-color: white;
}
#gallery {
  background-color: #f4f4f4;
}

/* Cards */
.cards {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  width: 300px;
  margin: 1rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transform: translateY(-5px);
}
.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.gallery-item {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
}
.gallery-item:hover {
  transform: scale(1.05);
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1001;
  animation: fadeIn 0.3s; /* Added fade-in animation */
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
}
form input, form textarea, form button {
  margin: 0.5rem 0;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s;
}
form input:focus, form textarea:focus {
  border-color: #001f4d;
  outline: none;
}
form button {
  background-color: #001f4d;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}
form button:hover {
  background-color: #003366;
}

/* Footer */
footer {
  background: #001f4d;
  color: white;
  text-align: center;
  padding: 10px 0;
  margin-top: 40px;
}

/* Mobile Responsiveness */
@media(max-width: 700px) {
  nav {
    flex-direction: column;
  }
  nav a {
    padding: 10px;
    border-top: 1px solid #00509e;
  }
  .cards {
    flex-direction: column;
    align-items: center;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  section {
    padding: 2rem 1rem;
  }
  header {
    flex-direction: column;
    text-align: center;
  }
  header img {
    margin-right: 0;
    margin-bottom: 10px;
  }
}
