/* ===================================================================
   CONCEPT SCHOOLS JALALPUR CAMPUS - PAGES STYLESHEET
   Admissions, Booklist, Gallery, Uniform, Contact & Academics
   =================================================================== */

/* -------------------------------------------------------------
   Admissions Portal & Form
   ------------------------------------------------------------- */
.admission-portal-wrapper {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.portal-header {
  background: linear-gradient(135deg, var(--primary-deep-maroon) 0%, var(--primary-red) 100%);
  color: #FFFFFF;
  padding: 2.2rem;
  text-align: center;
}

.portal-header h3 {
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.portal-header p {
  color: #FEE2E2;
  font-size: 0.95rem;
}

.admission-form-body {
  padding: 2.5rem;
}

.form-step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  position: relative;
}

.form-step-indicator::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.step-node.active .step-circle {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(211, 35, 42, 0.2);
}

.step-node.completed .step-circle {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #FFFFFF;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step-node.active .step-label {
  color: var(--primary-red);
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-label .req {
  color: var(--primary-red);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1.1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #FFFFFF;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(211, 35, 42, 0.12);
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

/* Criteria Matrix Table */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #1E293B;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 0.92rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: var(--primary-light-red);
}

/* -------------------------------------------------------------
   Book List & Syllabus
   ------------------------------------------------------------- */
.booklist-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  background: #FFFFFF;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.class-pill-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.class-tab {
  padding: 0.5rem 1.1rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg-light);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
}

.class-tab:hover {
  background: var(--border-color);
}

.class-tab.active {
  background: var(--primary-red);
  color: #FFFFFF;
  border-color: var(--primary-red);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-pill);
  font-size: 0.9rem;
}

.search-box svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.book-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.book-card:hover {
  border-color: var(--primary-red);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.book-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.book-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light-red);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.book-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.book-pub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   Uniform & Timings
   ------------------------------------------------------------- */
.uniform-card {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.uniform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--primary-red);
}

.uniform-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light-red);
  color: var(--primary-red);
  padding: 0.35rem 0.9rem;
  border-radius: var(--border-radius-pill);
  margin-bottom: 1.25rem;
}

.uniform-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.uniform-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.uniform-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.timing-card {
  background: #FFFFFF;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 1.8rem;
}

.timing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.timing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.92rem;
}

.timing-row:last-child {
  border-bottom: none;
}

.timing-time {
  font-weight: 700;
  color: var(--primary-red);
}

/* -------------------------------------------------------------
   Interactive Media Gallery
   ------------------------------------------------------------- */
.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.4rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  background: #FFFFFF;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--bg-light);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: var(--primary-red);
  color: #FFFFFF;
  border-color: var(--primary-red);
  box-shadow: 0 4px 12px rgba(211, 35, 42, 0.25);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  background: #000000;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow), opacity var(--transition-fast);
}

.gallery-item:hover img {
  transform: scale(1.08);
  opacity: 0.85;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #F87171;
  margin-bottom: 0.3rem;
}

.gallery-title {
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 15, 25, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #FFFFFF;
  margin-top: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  color: #FFFFFF;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* -------------------------------------------------------------
   Contact Page Styles
   ------------------------------------------------------------- */
.contact-info-card {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  height: 100%;
  box-shadow: var(--shadow-md);
}

.contact-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.contact-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light-red);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon-box svg {
  width: 24px;
  height: 24px;
}

.contact-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.contact-val {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
}

.contact-val a:hover {
  color: var(--primary-red);
}

.map-embed-wrapper {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  height: 380px;
}

.map-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Modal Popup Confirmation */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon-success {
  width: 72px;
  height: 72px;
  background: #D1FAE5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}

.modal-icon-success svg {
  width: 36px;
  height: 36px;
}

/* =============================================================
   PAGES RESPONSIVE STYLES (Tablet, Mobile, Ultra-Mobile)
   ============================================================= */

@media (max-width: 1024px) {
  .book-card {
    padding: 1.2rem;
  }
  .contact-info-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Book List Horizontal Touch Scroll */
  .booklist-filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
  }

  .class-pill-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
    width: 100%;
  }

  .class-pill-tabs::-webkit-scrollbar {
    display: none;
  }

  .class-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
  }

  .search-box {
    min-width: 100%;
    width: 100%;
  }

  /* Gallery Filters on Mobile */
  .gallery-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .gallery-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
  }

  /* Admissions Form Mobile Adjustments */
  .admission-form-body {
    padding: 1.5rem 1.1rem;
  }

  .portal-header {
    padding: 1.75rem 1.25rem;
  }

  .portal-header h3 {
    font-size: 1.3rem;
  }

  .form-control {
    font-size: 16px; /* Prevents auto-zoom on iOS */
    padding: 0.75rem 0.9rem;
  }

  .form-step-indicator {
    margin-bottom: 1.8rem;
  }

  .form-step-indicator::before {
    left: 20px;
    right: 20px;
    top: 15px;
  }

  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .step-label {
    font-size: 0.72rem;
  }

  /* Data Tables Mobile Optimization */
  .data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th, .data-table td {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* Uniform Cards on Mobile */
  .uniform-card {
    padding: 1.6rem 1.25rem;
  }

  .timing-card {
    padding: 1.4rem 1.1rem;
  }

  .timing-row {
    font-size: 0.88rem;
  }

  /* Lightbox on Mobile */
  .lightbox-modal {
    padding: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-caption {
    font-size: 0.95rem;
    margin-top: 0.85rem;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
