/* =======================
   Reset and Base Styling
   ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #f9f9f9;
}

/* =======================
   Header and Navbar
   ======================= */
header {
  background-color: #1e3a8a;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  
}
.logo img {
  width: 30px;       /* control size */
  height: 30px;      /* same as width */
  border-radius: 50%; /* makes it circular */
  object-fit: cover;  /* keeps image inside */
 
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Hide logo only on small screens */
@media (max-width: 768px) {
  .logo {
    display: none !important;
  }
}

.logo-img {
  height: 40px;   /* adjust size */
  width: auto;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding-left: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-links a:hover {
  color: #dbeafe;
}

/* =======================
   Buttons (General)
   ======================= */
.btn {
  background-color: white;
  color: #1e3a8a;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s, color 0.3s;
}

.btn:hover {
  background-color: #1e3a8a;
  color: white;
  border: 1px solid white;
}

/* =======================
   Login Modal Styling
   ======================= */
.login-modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1100; /* above other modals */
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);

  /* Center modal content */
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 1rem;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-modal.show {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.login-modal.hide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Login form box */
.login-modal .login {
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: fadeIn 0.3s ease, slideUp 0.3s ease;
}

/* Close button for login modal */
.login-close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  z-index: 1200;
}

.login-close-button:hover {
  color: #e74c3c;
}

/* =======================
   Animations
   ======================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* =======================
   Login Section
   ======================= */
#login {
  /* Full viewport height with background */
  width: 100%;
  height: 100vh;
  background-image: url('ssm.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: whitesmoke; /* fallback */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.login {
  background: #fff;
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-sizing: border-box;
}

/* Logo in login form */
#logo {
  border-radius: 8px;
  max-width: 50%;
  height: auto;
  margin-bottom: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Labels in login */
.login label {
  display: block;
  text-align: left;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

/* Inputs and select in login */
.login input[type="text"],
.login input[type="password"],
.login select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login select:focus {
  border-color: #1e3a8a;
  outline: none;
}

/* Error message in login */
.login .error-message {
  color: red;
  min-height: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Buttons container in login */
.login .btn-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Login buttons */
.login .btn-login {
  flex: 1;
  background-color: #1e3a8a;
  color: white;
  padding: 0.75rem 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
  text-decoration: none;
}

.login .btn-login:hover {
  background-color: #3b82f6;
}

/* Back button in login */
.login .btn-back {
  background-color: #6c757d;
}

.login .btn-back:hover {
  background-color: #5a6268;
}



/* =======================
   Hero and General Sections
   ======================= */
.hero, .section {
  min-height: 100vh;
  padding: 5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero {
  background: linear-gradient(to right, #1e40af, #3b82f6);
  color: white;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* =======================
   Modal Styling
   ======================= */

/* Modal container */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show modal with fadeIn */
.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
}

/* Hide modal with fadeOut */
.modal.hide {
  animation: fadeOut 0.3s ease forwards;
}

/* Modal content box */
.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 2rem;
  border-radius: 10px;
  max-width: 700px;
  width: 100%;
  position: relative;
  animation: slideUp 0.4s ease forwards;
}

/* Slide down when closing */
.modal.hide .modal-content {
  animation: slideDown 0.3s ease forwards;
}

/* =======================
   Animations
   ======================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(40px);
    opacity: 0;
  }
}


/* Close button */
.close-button {
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
}
.close-button:hover {
  color: #000;
}

/* Section styling */
.form-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #1e3a8a;
}

/* Stack inputs vertically */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Input groups */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 0.5rem;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fdfdfd;
}

/* Button container */
.btn-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.btn-admission {
  background-color: #1e3a8a;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.btn-admission:hover {
  background-color: #3b82f6;
}


/* =======================
   Footer
   ======================= */
footer {
  background-color: #f1f5f9;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #555;
}

/* =======================
   Responsive Adjustments
   ======================= */
@media (max-width: 600px) {
  #login {
    padding: 0.5rem;
  }
  .login {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }
  .login .btn-container {
    flex-direction: column;
  }
  .login .btn-login,
  .login .btn-back {
    width: 100%;
  }
}

/* =======================
   About Section Styling
   ======================= */
#about {
  background-color: #ffffff;
  padding: 5rem 1rem;
  text-align: center;
}

#about .container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#about h2 {
  font-size: 2.5rem;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
}

#about p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 2rem;
}

#about .btn-wrapper {
  margin-top: 0;
}

#about .btn-admission {
  background-color: #1e3a8a;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
}

#about .btn-admission:hover {
  background-color: #3b82f6;
}

/* Custom file upload container */
.custom-file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  border: 1px solid #ccc;
  padding: 8px 12px;
  border-radius: 6px;
  width: fit-content;
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.custom-file-upload:hover {
  border-color: #007bff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

/* Hide default input */
.custom-file-upload input[type="file"] {
  display: none;
}

/* Upload button */
.upload-btn {
  background: #007bff;
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
}

.upload-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.upload-btn:active {
  transform: translateY(0);
}

.file-name {
  font-size: 14px;
  color: #555;
}

/* Preview styles */
.file-preview {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-item {
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  max-width: 150px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-size: 13px;
  transition: transform 0.2s ease;
}

.preview-item:hover {
  transform: translateY(-3px);
}

/* Preview images */
.file-preview img {
  max-width: 100%;
  max-height: 100px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 6px;
}

/* Remove button */
.remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  border: none;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* File preview container */
.file-preview {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Individual preview card */
.preview-item {
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  max-width: 150px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-size: 13px;
  transition: transform 0.2s ease;
}

.preview-item:hover {
  transform: translateY(-3px);
}

/* Image preview */
.file-preview img {
  max-width: 100%;
  max-height: 100px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 6px;
}

/* PDF preview */
.preview-item .pdf-icon {
  font-size: 60px;
  color: #dc2626; /* Tailwind red-600 */
  margin-bottom: 6px;
}

.preview-item .file-label {
  font-size: 12px;
  color: #444;
  word-break: break-word;
}

/* Remove button */
.remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  border: none;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}


/* =======================
   Confirm & Success Modals
   ======================= */

/* Confirm Modal */
#confirmModal {
  display: none;                 /* hidden by default */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  justify-content: center;       /* only works when flex */
  align-items: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#confirmModal.show {
  display: flex;
  opacity: 1;
}
#confirmModal.hide {
  display: none;                 /* ensure it's gone */
  opacity: 0;
}
#confirmModal .modal-content {
  background: #fff;
  padding: 25px 20px;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  animation: slideUp 0.4s ease;
}
#confirmModal .modal-content h3 { margin-bottom: 15px; font-size: 1.4rem; font-weight: 600; color: #2c3e50; }
#confirmModal .modal-content p  { font-size: 1rem; color: #555; margin-bottom: 20px; }
#confirmModal .btn { margin: 10px 5px; padding: 10px 20px; min-width: 100px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background 0.3s ease, color 0.3s ease; }
#confirmModal .btn-confirm { background: #007bff; color: #fff; }
#confirmModal .btn-confirm:hover { background: #0056b3; }
#confirmModal .btn-cancel { background: #e0e0e0; color: #333; }
#confirmModal .btn-cancel:hover { background: #bdbdbd; }

/* Success Modal */
#successModal {
  display: none;                 /* hidden by default */
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.4);
  justify-content: center;       /* active when .show is applied */
  align-items: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#successModal.show {
  display: flex;
  opacity: 1;
}
#successModal .modal-content {
  background: #fff;
  padding: 30px 25px;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  animation: slideUp 0.4s ease;
}
#successModal .modal-content h2 { margin-bottom: 10px; font-size: 1.5rem; font-weight: 600; color: #2c3e50; }
#successModal .modal-content p  { font-size: 1rem; color: #555; margin-bottom: 20px; }
#successModal button { padding: 10px 20px; background: blue; border: none; color: #fff; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background 0.3s ease; }
#successModal button:hover { background: #003bd1; }


/* ✅ Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* =======================
   Global Responsive Adjustments
   ======================= */

/* Tablet screens (portrait tablets and small desktops) */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  /* Hide logo */
  .logo-text {
    display: none;
  }

  /* Keep nav horizontal */
  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* Mobile screens */
@media (max-width: 600px) {
  .container {
    flex-direction: column;
    padding: 0 1rem;
  }

  /* Hide logo */
  .logo-text {
    display: none;
  }

  /* Navbar stays horizontal */
  .nav-links {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  #login {
    padding: 0.5rem;
  }

  .login {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }

  .login .btn-container {
    flex-direction: column;
  }

  .login .btn-login,
  .login .btn-back {
    width: 100%;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .form-grid {
    flex-direction: column;
  }
}

/* Large desktops */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .section h2 {
    font-size: 2.5rem;
  }
}


/* Default hidden */
#transfereeFields {
  display: none;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
}

/* Heading style */
#transfereeFields h3.transferee-heading {
  font-size: 18px;
  margin-bottom: 10px;
  color: #444;
}