/* ITM IHM Faculty Page — Bootstrap + custom styles matching itm.edu/faculty/ihm */

:root {
  --brand-red: #a91d54;
  --brand-red-soft: #a91d5592;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --font-sans: "HM Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}



img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease;
}

.text-brand-red {
  color: var(--brand-red) !important;
}

.text-justify {
  text-align: justify;
}

/* ---------- Scrollbar (card-scroll) ---------- */
.card-scroll::-webkit-scrollbar {
  height: 0.25rem;
  width: 0.5rem;
}

.card-scroll::-webkit-scrollbar-track {
  background: #8888882e;
  border-radius: 5px;
}

.card-scroll::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: var(--brand-red);
}

/* ---------- Layout helpers ---------- */
.container-xl {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 576px) {
  .container-xl {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (min-width: 992px) {
  .container-xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ---------- Header ---------- */
.site-header {
  z-index: 1030;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: brightness(0);
}

@media (min-width: 576px) {
  .header-logo {
    height: 40px;
    max-width: none;
  }
}

.navbar-toggler {
  border-color: var(--gray-300);
  padding: 0.35rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(169, 29, 84, 0.2);
}

.navbar .nav-link {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.65rem 0.5rem !important;
}

@media (min-width: 992px) {
  .navbar .nav-link {
    padding: 0.5rem 0.75rem !important;
  }
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--brand-red);
}

.navbar-collapse {
  margin-top: 0.5rem;
}

@media (min-width: 992px) {
  .navbar-collapse {
    margin-top: 0;
  }
}

.btn-brand {
  background: var(--brand-red);
  color: #fff !important;
  border: 1px solid var(--brand-red);
  font-weight: 600;
  border-radius: 0.375rem;
  transition: all 0.25s ease;
  width: 100%;
  text-align: center;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 992px) {
  .btn-brand {
    width: auto;
    margin-top: 0;
    margin-bottom: 0;
  }
}

.btn-brand:hover {
  background: #8c1745;
  border-color: #8c1745;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(169, 29, 84, 0.35);
}

/* ---------- Hero ---------- */
.hero-section {
  width: 100%;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  width: 100%;
  min-height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  background-color: var(--gray-100);
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-inner {
    min-height: auto;
  }
}

@media (min-width: 992px) {
  .hero-inner {
    min-height: 500px;
    height: 500px;
    overflow: hidden;
    background-image: url("../assets/hero-image/faculty-hero.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top right;
  }

  .hero-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, transparent, var(--gray-100));
    pointer-events: none;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-top: 1.75rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-content {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }
}

@media (min-width: 992px) {
  .hero-content {
    flex: 1;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

.hero-title {
  font-size: clamp(1.5rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 40rem;
  margin-bottom: 1rem;
  text-align: center;
}

.hero-title span {
  display: block;
}

.hero-text {
  font-size: clamp(0.95rem, 2.4vw, 1.125rem);
  max-width: 40rem;
  margin: 0 auto;
  text-align: justify;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero-text {
    text-align: center;
  }
}

@media (min-width: 992px) {
  .hero-title,
  .hero-text {
    text-align: left;
    margin-left: 0;
  }

  .hero-title {
    margin-bottom: 1.25rem;
  }
}

.hero-mobile-image {
  width: 100%;
  flex: 0 0 auto;
}

.hero-mobile-image img {
  width: 100%;
  height: auto;
  max-height: 280px;
  min-height: 180px;
  object-fit: cover;
  object-position: bottom center;
}

@media (min-width: 576px) {
  .hero-mobile-image img {
    max-height: 360px;
    min-height: 220px;
  }
}

@media (min-width: 768px) {
  .hero-mobile-image img {
    max-height: 420px;
  }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar .breadcrumb {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.breadcrumb-bar .breadcrumb::-webkit-scrollbar {
  display: none;
}

.breadcrumb-bar .breadcrumb-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  white-space: nowrap;
}

@media (min-width: 576px) {
  .breadcrumb-bar .breadcrumb-item {
    font-size: 0.875rem;
  }
}

.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
  display: none;
}

.breadcrumb-home {
  color: var(--gray-400);
  display: inline-flex;
}

.breadcrumb-home:hover {
  color: var(--gray-500);
}

.breadcrumb-sep {
  display: inline-block;
  width: 1rem;
  height: 2.25rem;
  margin-right: 0.65rem;
  background-color: var(--gray-200);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 44' preserveAspectRatio='none'%3E%3Cpath d='M.293 0l22 22-22 22h1.414l22-22-22-22H.293z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 44' preserveAspectRatio='none'%3E%3Cpath d='M.293 0l22 22-22 22h1.414l22-22-22-22H.293z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  flex-shrink: 0;
}

@media (min-width: 576px) {
  .breadcrumb-sep {
    width: 1.5rem;
    height: 2.75rem;
    margin-right: 1rem;
  }
}

.breadcrumb-bar a {
  color: var(--gray-500);
}

.breadcrumb-bar a:hover {
  color: var(--gray-700);
}

.breadcrumb-bar .active {
  color: var(--gray-500);
}

/* ---------- Dean / About ---------- */
.about-section {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

@media (min-width: 768px) {
  .about-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
}

.dean-copy {
  max-width: 32rem;
  width: 100%;
}

.dean-copy h2 {
  font-size: 1.125rem;
}

@media (min-width: 768px) {
  .dean-copy {
    margin-left: 0;
    margin-right: auto;
  }
}

.dean-photo {
  max-width: 20rem;
  width: 100%;
  background: var(--gray-100);
  border-radius: 0.375rem;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dean-photo:hover {
  box-shadow: 0 8px 24px rgba(169, 29, 84, 0.18);
  transform: translateY(-3px);
}

.dean-photo img {
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
  border-radius: 0.375rem;
}

@media (min-width: 576px) {
  .dean-photo img {
    max-height: 20rem;
  }
}

@media (hover: none) {
  .dean-photo:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ---------- Faculty heading shimmer ---------- */
.faculty-heading-wrap {
  display: flex;
  width: fit-content;
}

@media (min-width: 576px) {
  .faculty-heading-wrap {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
}

.faculty-heading {
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
  margin: 0;
  color:#8c1745;
}

.shimmer-effect2 {
  -webkit-mask: linear-gradient(120deg, #fff 35%, var(--brand-red-soft), #a91d54 45%) right / 250% 100%;
  mask: linear-gradient(120deg, #fff 35%, var(--brand-red-soft), #a91d54 45%) right / 250% 100%;
  animation: shimmer2 2.5s infinite;
}

@keyframes shimmer2 {
  100% {
    -webkit-mask-position: left;
    mask-position: left;
  }
}

/* ---------- Faculty cards ---------- */
.faculty-section {
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.faculty-list {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.faculty-card-col {
  display: flex;
}

.faculty-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem;
  font-size: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  cursor: pointer;
  background: #fff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  align-items: stretch;
  justify-content: center;
}

/* Side-by-side photo + details inside each card */
@media (min-width: 480px) {
  .faculty-card {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
}

.faculty-card:hover {
  border-color: var(--brand-red);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
}

@media (hover: none) {
  .faculty-card:hover {
    transform: none;
  }

  .faculty-card:active {
    border-color: var(--brand-red);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  }
}

.faculty-card-media {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  overflow: hidden;
  transition: border-color 0.25s ease;
  min-width: 0;
}

.faculty-card:hover .faculty-card-media {
  border-color: var(--brand-red);
}

.faculty-card-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: 0.375rem;
  transition: transform 0.35s ease;
  background: var(--gray-100);
}

@media (min-width: 480px) {
  .faculty-card-media img {
    aspect-ratio: auto;
    max-height: 180px;
    object-fit: contain;
  }
}

@media (min-width: 768px) {
  .faculty-card-media img {
    max-height: none;
    object-fit: contain;
  }
}

.faculty-card:hover .faculty-card-media img {
  transform: scale(1.03);
}

@media (hover: none) {
  .faculty-card:hover .faculty-card-media img {
    transform: none;
  }
}

.faculty-card-name {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.65rem 0.4rem;
}

.faculty-card-name h4,
.faculty-card-name span {
  display: flex;
  width: 100%;
  text-align: center;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 1.35;
  word-break: break-word;
}

.faculty-card-name h4 {
  font-weight: 600;
  font-size: 0.90rem;
  transition: color 0.25s ease;
}

.faculty-card:hover .faculty-card-name h4 {
  color: var(--brand-red);
}

.faculty-card-name span {
  font-size: 0.75rem;
  color: #000000;

}

.faculty-card-details {
  display: flex;
  width: 100%;
  height: 100%;
  padding-left: 0.25rem;
  padding-right: 0.15rem;
  border-radius: 0.375rem;
  min-width: 0;
}

@media (min-width: 480px) {
  .faculty-card-details {
    padding-left: 0.75rem;
  }
}

@media (min-width: 768px) {
  .faculty-card-details {
    padding-left: 1rem;
  }
}

.faculty-card-details ul {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 100%;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1rem;
  list-style: disc;
}

.faculty-card-details li {
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-weight: 500;
  font-size: 0.75rem;
  color: rgb(0, 0, 0);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #000 !important;
}

.site-footer .container-xl {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .site-footer .container-xl {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

.footer-logo {
  height: 3rem;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .footer-logo {
    height: 3.5rem;
    max-width: none;
  }
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: var(--brand-red);
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: #f3a1c0;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  z-index: 10;
  bottom: 1.25rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
    background-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(169, 29, 84, 0.4);
  animation: none;
}

@media (min-width: 768px) {
  .back-to-top {
    bottom: 5rem;
    right: 1.75rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: bounce 1s infinite;
}

.back-to-top:hover {
  background: #8c1745;
  animation: none;
  transform: translateY(-2px) scale(1.05);
}

.back-to-top ion-icon {
  font-size: 1.35rem;
}

@media (min-width: 768px) {
  .back-to-top ion-icon {
    font-size: 1.5rem;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(-15%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* ---------- Reveal animation on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .faculty-card,
  .dean-photo,
  .back-to-top,
  .shimmer-effect2 {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Extra-small phones ---------- */
@media (max-width: 359.98px) {
  .hero-title {
    font-size: 1.35rem;
  }

  .faculty-card {
    padding: 0.55rem;
    font-size: 0.7rem;
  }

  .faculty-card-name h4 {
    font-size: 0.75rem;
  }

  .faculty-card-details ul {
    padding-left: 0.85rem;
    gap: 0.35rem;
  }
}
