/* Reset and basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Gradient Background for Page */
body {
  background: linear-gradient(135deg, #e0f7fa, #bbdefb, #90caf9);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Header and Navbar Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  padding: 15px 20px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px; /* Adjust based on your logo size */
  width: auto;
}

/* Navigation Links */
.navbar {
  display: flex;
  align-items: center;
}

.navbar ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar li {
  margin: 0 15px;
}

.navbar li:last-child {
  margin-right: 25px; /* Extra spacing for the last item to prevent edge proximity */
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 8px 15px;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
}

.navbar a:hover {
  color: #5efce8;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: #5efce8;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar a:hover::after {
  width: 80%;
}

.navbar .active a {
  color: #5efce8;
  background-color: rgba(255, 255, 255, 0.1);
}

.icon {
  margin-right: 8px;
}

/* Hamburger Menu for Mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Admin Logout Button Styles within Navbar */
.admin-only {
  display: none; /* Hidden by default for non-admins */
}

.admin-only:not(.hidden) {
  display: block; /* Shown only when admin mode is active and hidden class is removed */
}

.admin-logout {
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
}

.admin-logout:hover {
  background: linear-gradient(135deg, #ff8e53, #ff6b6b);
  transform: scale(1.05);
}

.admin-logout.hidden, .edit-text-btn.hidden {
  display: none;
}

/* Edit Buttons Styling */
.edit-text-btn {
  margin-top: 10px;
  background: linear-gradient(135deg, #61a5ff, #5efce8);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s, transform 0.2s;
}

.edit-text-btn:hover {
  background: linear-gradient(135deg, #5efce8, #61a5ff);
  transform: scale(1.05);
}

/* About Hero Section (Reused for Contact) */
.about-hero {
  min-height: 60vh;
  background: url('hero-placeholder.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  font-weight: bold;
  position: relative;
  overflow: hidden;
  margin-top: 70px; /* Adjusted for fixed navbar height */
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.about-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  z-index: 2;
}

/* About Content (Reused for Contact) */
.about-content {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

.about-section {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.about-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 20px;
  color: #333;
}

.about-section p {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.7;
  color: #555;
  max-width: 800px;
}

.text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mission Vision Cards (Reused for Contact Details and Form) */
.mission-vision {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin: 60px 0;
}

.card {
  background: #f0f4f8;
  padding: 30px;
  border-radius: 20px;
  flex: 1 1 300px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card:hover {
  transform: translateY(-10px);
}

.card h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 15px;
  color: #444;
}

.card p {
  color: #666;
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card a {
  color: #1e3a8a;
  text-decoration: none;
  transition: color 0.3s;
}

.card a:hover {
  color: #3045c4;
  text-decoration: underline;
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin-top: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 1rem;
  color: #444;
}

.form-group input, .form-group textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: #61a5ff;
  outline: none;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #61a5ff, #5efce8);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  margin: 0 auto;
}

.contact-form button:hover {
  background: linear-gradient(135deg, #5efce8, #61a5ff);
  transform: scale(1.05);
}

/* Navbar scroll effect */
.header.scrolled {
  background-color: rgba(51, 51, 51, 0.95);
}

/* Google Map in Contact Details Card */
.google-map {
    margin-top: 20px;
    width: 100%;
}

.google-map iframe {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (min-width: 768px) {
  .about-section {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 40px;
  }

  .about-section:nth-child(even) {
    flex-direction: row-reverse;
  }

  .text-content {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .navbar ul {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #333;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
  }

  .navbar ul.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  .navbar li {
    margin: 15px 0;
    width: 100%;
    text-align: center;
  }

  .navbar li:last-child {
    margin-right: 0; /* Reset extra margin on mobile for centered alignment */
  }

  .navbar a, .admin-logout {
    padding: 10px 20px;
    display: block;
  }
}

@media (max-width: 480px) {
  .about-content {
    padding: 40px 15px;
  }

  .mission-vision {
    gap: 20px;
  }

  .about-hero {
    margin-top: 60px; /* Adjusted for smaller navbar height on mobile */
  }
}