* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* VIDEO BACKGROUND */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: #000;
  /* Optimize for video quality */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: contents;
}

.video-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  border: none;
  opacity: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-transform: translate(-50%, -50%) translateZ(0);
  transform: translate(-50%, -50%) translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
  /* Force hardware acceleration for better quality */
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

/* Minimal overlay for text readability (set to transparent for maximum video clarity) */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0); /* Completely transparent for maximum video clarity */
  z-index: 1;
  pointer-events: none;
  /* Ensure overlay doesn't affect video quality */
  opacity: 0;
  will-change: auto;
}

/* Content wrapper to appear above video */
.content-wrapper {
  position: relative;
  z-index: 2;
  background: transparent;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  background: rgba(11,60,109,0.75);
  color: #fff;
  padding: 12px 104px 12px 16px;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

/* Logo and School Info Section (Top Left) */
.header-logo-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.school-logo {
  width: 60px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.school-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.school-name {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: #8B0000; /* Dark red/maroon matching logo */
  font-family: 'Poppins', sans-serif;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2); /* Light shadow for visibility on dark background */
}

.school-details {
  font-size: 0.75rem;
  line-height: 1.3;
  margin: 0;
  color: #fff;
  font-weight: 400;
}

.school-affiliation {
  font-size: 0.7rem;
  line-height: 1.3;
  margin: 0;
  color: #fff;
  font-weight: 400;
}

/* Header Right Section */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.header-test-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: absolute;
  top: 12px;
  right: 16px;
  width: 72px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(11, 60, 109, 0.25);
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.header-test-qr img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: cover;
}

.header-test-qr span {
  color: #0b3c6d;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.header-test-qr:hover {
  transform: translateY(-1px);
}

.alumni-tagline {
  font-size: 1.6rem; /* Even bigger - increased from 1.3rem */
  margin: 0;
  color: #8B0000; /* Dark red/maroon matching logo */
  font-weight: 700; /* Increased from 600 */
  text-shadow: 0 3px 6px rgba(255, 255, 255, 0.5), 0 0 8px rgba(255, 255, 255, 0.3); /* Even stronger shadow */
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  gap: 15px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* HERO IMAGE - Background removed to show video clearly */
.hero-banner {
  position: relative;
  min-height: 600px;
  background: transparent; /* No image background - video shows through */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0); /* Completely transparent - video fully visible */
}

/* HERO TEXT */
.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  max-width: 1100px;
  margin: auto;
  padding: 56px 24px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: #fff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* REMOVE ALL DEFAULT GAPS */
.hero-content h2,
.hero-content h3,
.hero-content p {
  margin: 0;
  padding: 0;
  line-height: 1.3;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 1); /* Even stronger shadow for maximum prominence */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* TEXT SIZES - Made even bigger and more prominent */
.hero-content h2 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase; /* Makes it more prominent */
  max-width: 100%;
  line-height: 1.2;
}

.hero-subtext {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3px;
  max-width: 100%;
  padding: 0 10px;
}

.hero-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase; /* Makes it more prominent */
  max-width: 100%;
  line-height: 1.3;
}

.hero-about {
  font-size: 1.22rem;
  font-weight: 500;
  max-width: 950px;
  margin: 0 auto;
  line-height: 1.55;
  letter-spacing: 0.2px;
  padding: 0 15px;
}

/* MOBILE */
@media (max-width: 600px) {
  /* Video Background Responsive */
  .video-iframe {
    width: 100%;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* Maintain aspect ratio */
  }

  header {
    padding: 10px 76px 10px 12px;
  }

  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .header-logo-section {
    width: 100%;
    gap: 10px;
  }

  .school-logo {
    width: 45px;
    flex-shrink: 0;
  }

  .school-info {
    flex: 1;
    min-width: 0; /* Allows text to wrap */
  }

  .school-name {
    font-size: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
  }

  .school-details {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .school-affiliation {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  .header-right {
    width: 100%;
    align-items: flex-start;
    gap: 6px;
  }

  .alumni-tagline {
    font-size: 1.2rem; /* Reduced for mobile to prevent overlap */
    font-weight: 700;
    line-height: 1.3;
  }

  nav {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
  }

  nav a {
    font-size: 0.85rem;
    padding: 4px 8px;
  }

  .hero-banner {
    height: auto; /* Auto height for mobile */
    min-height: 500px; /* Minimum height to accommodate text */
    padding: 20px 0;
  }

  .hero-content {
    padding: 20px 12px;
    gap: 10px; /* More gap on mobile to prevent overlap */
    min-height: 460px;
  }

  .hero-content h2 {
    font-size: 1.6rem; /* Reduced for mobile to prevent overlap */
    font-weight: 800;
    line-height: 1.2;
    padding: 0 5px;
    word-break: break-word;
  }

  .hero-content h3 {
    font-size: 1.2rem; /* Reduced for mobile to prevent overlap */
    font-weight: 700;
    margin-top: 14px;
    line-height: 1.3;
    padding: 0 5px;
    word-break: break-word;
  }

  .hero-subtext {
    font-size: 1rem; /* Reduced for mobile to prevent overlap */
    font-weight: 600;
    line-height: 1.4;
    padding: 0 8px;
  }

  .hero-about {
    font-size: 0.95rem; /* Reduced for mobile to prevent overlap */
    line-height: 1.5;
    font-weight: 500;
    padding: 0 10px;
  }
}

/* GALLERY SECTION */
.gallery {
  padding: 0;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

.gallery-grid {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0;
  height: 100vh;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.gallery-grid img {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  scroll-snap-align: center;
  background: rgba(244, 246, 249, 0.3); /* Semi-transparent background so video shows through */
}

/* REGISTRATION SECTION */
#register {
  padding: 40px 20px;
  background: rgba(249, 250, 251, 0.85); /* Semi-transparent so video shows through */
}

.container {
  max-width: 1100px;
  margin: auto;
}

#register h2 {
  color: #0b3c6d;
  font-size: 1.75rem;
  margin-bottom: 20px;
  text-align: center;
}

.register-box {
  background: rgba(230, 237, 245, 0.9); /* Semi-transparent */
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #0b3c6d;
}

.register-box p {
  margin: 8px 0;
  color: #222;
  font-size: 0.95rem;
}

.register-box strong {
  color: #0b3c6d;
  font-weight: 600;
}

.qr-payment-container {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: rgba(230, 237, 245, 0.5);
  border-radius: 8px;
  border: 2px dashed #0b3c6d;
}

.qr-link {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none;
}

.qr-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.qr-link:active {
  transform: scale(0.98);
}

.qr-image {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 3px solid #fff;
}

.qr-caption {
  margin-top: 15px;
  font-size: 1rem;
  color: #0b3c6d;
  font-weight: 600;
}

.qr-instruction {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
}

/* FORM STYLING */
form {
  background: rgba(255, 255, 255, 0.95); /* Semi-transparent white */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-section-title {
  color: #0b3c6d;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 30px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #0b3c6d;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.form-group-half {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
  color: #222;
}

.required {
  color: #d32f2f;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.2s;
  background-color: #fff;
}

select {
  cursor: pointer;
}

input[type="file"] {
  padding: 8px;
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
  background: #0b3c6d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  margin-right: 10px;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background: #072b4e;
}

/* PHOTO UPLOAD WITH CAMERA */
.photo-upload-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 10px;
}

.photo-upload-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-upload,
.btn-camera {
  background: #0b3c6d;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-upload:hover,
.btn-camera:hover {
  background: #072b4e;
}

.btn-camera {
  background: #28a745;
}

.btn-camera:hover {
  background: #218838;
}

.photo-preview-container {
  flex: 0 0 150px;
  min-width: 150px;
  display: block;
}

.photo-preview {
  width: 150px;
  height: 150px;
  border: 3px solid #0b3c6d;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 150px;
  box-sizing: border-box;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.photo-placeholder {
  color: #999;
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
}

/* CAMERA MODAL */
.camera-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.camera-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.camera-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ddd;
}

.camera-modal-header h3 {
  margin: 0;
  color: #0b3c6d;
  font-size: 1.3rem;
}

.camera-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.camera-close:hover {
  background: #f0f0f0;
  color: #333;
}

.camera-preview-container {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

#camera-video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.camera-controls {
  display: flex;
  gap: 15px;
  padding: 20px;
  justify-content: center;
  border-top: 1px solid #ddd;
}

.btn-capture,
.btn-cancel {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-capture {
  background: #28a745;
  color: white;
}

.btn-capture:hover {
  background: #218838;
}

.btn-cancel {
  background: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background: #5a6268;
}

input[type="date"] {
  cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #0b3c6d;
  box-shadow: 0 0 0 3px rgba(11, 60, 109, 0.1);
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
  margin-bottom: 0;
}

.radio-label input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
  margin-bottom: 0;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-help {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
}

.btn {
  background: #0b3c6d;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.btn:hover {
  background: #072b4e;
}

/* FOOTER */
footer {
  background: #0b3c6d;
  color: #fff;
  text-align: center;
  padding: 20px 16px;
  font-size: 0.8rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-copyright {
  margin: 0;
  font-size: 0.85rem;
}

.footer-design {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.designer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.footer-credit {
  margin: 0;
  font-size: 0.8rem;
  color: #fff;
  display: flex;
  align-items: center;
}

/* ADDITIONAL MOBILE RESPONSIVE STYLES */
@media (max-width: 600px) {
  /* Registration section mobile */
  #register {
    padding: 30px 15px;
  }

  #register h2 {
    font-size: 1.5rem;
  }

  form {
    padding: 20px 15px;
  }

  .register-box {
    padding: 16px;
  }

  .header-test-qr {
    top: 10px;
    right: 12px;
    width: 58px;
    padding: 3px;
  }

  .header-test-qr img {
    width: 44px;
    height: 44px;
  }

  .header-test-qr span {
    font-size: 0.55rem;
  }

  .qr-payment-container {
    padding: 15px;
    margin: 15px 0;
  }

  .qr-image {
    max-width: 180px;
  }

  .qr-caption {
    font-size: 0.9rem;
    margin-top: 12px;
  }

  .qr-instruction {
    font-size: 0.8rem;
    margin-top: 6px;
  }

  .form-section-title {
    font-size: 1.1rem;
    margin: 25px 0 15px 0;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group-half {
    margin-bottom: 20px;
  }

  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .photo-upload-container {
    flex-direction: column;
    gap: 15px;
  }

  .photo-preview-container {
    flex: 0 0 auto;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .photo-preview {
    width: 100%;
    max-width: 200px;
    height: 200px;
    margin: 0 auto;
  }

  .camera-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .camera-preview-container {
    min-height: 300px;
  }

  .camera-controls {
    flex-direction: column;
  }

  .btn-capture,
  .btn-cancel {
    width: 100%;
  }

  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  footer {
    padding: 16px 12px;
  }

  .footer-content {
    gap: 10px;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }

  .footer-design {
    flex-direction: column;
    gap: 8px;
  }

  .designer-logo {
    width: 35px;
    height: 35px;
  }

  .footer-credit {
    font-size: 0.75rem;
  }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 400px) {
  .hero-content h2 {
    font-size: 1.4rem;
  }

  .hero-content h3 {
    font-size: 1.1rem;
  }

  .hero-subtext {
    font-size: 0.9rem;
  }

  .hero-about {
    font-size: 0.85rem;
  }

  .alumni-tagline {
    font-size: 1rem;
  }
}

/* DUPLICATE REMOVAL - OLD RESPONSIVE */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.2rem;
  }

  header p {
    font-size: 0.85rem;
  }

  nav a {
    font-size: 0.8rem;
    margin-right: 12px;
  }

  #register {
    padding: 30px 15px;
  }

  #register h2 {
    font-size: 1.4rem;
  }

  form {
    padding: 20px;
  }

  .register-box {
    padding: 16px;
  }
}
