/* ========================================================
TEAM.CSS - Shine Masters Team Page
======================================================== */

/* ===== RESET & THEME ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --bright-green: #2F6B2F;
  --dark-green: #182D09;
  --gold: #EAAA00;
  --olive-green: #4B4C2B;
  --footer-green: #0F1F07;
  --white: #ffffff;
  --soft-white: #f9f9f9;
  --muted-text: #666666;
  --shadow: rgba(0, 0, 0, 0.12);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  color: var(--dark-green);
  background: url("behind.png") no-repeat center center fixed;
  background-size: cover;
}

/* ===== TOP BAR ===== */
.social-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  background-color: transparent;
  color: var(--white);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 18px;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 2;
}

.contact-info {
  display: flex;
  gap: 25px;
  font-size: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== HEADER ===== */
header {
  position: relative;
  width: 100%;
  min-width: 0;
  background: linear-gradient(135deg, var(--olive-green), var(--bright-green) 50%, var(--olive-green));
  color: var(--gold);
  text-align: center;
  padding: 58px 20px 40px;
}

header h1 {
  font-size: 48px;
  color: var(--gold);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle,
header p {
  color: var(--white);
  font-size: 18px;
  margin-top: 10px;
}

/* ===== MAIN LAYOUT ===== */
main {
  width: 100%;
  min-width: 0;
  flex: 1 0 auto;
  padding: 40px 20px;
}

.content-box {
  max-width: 900px;
  margin: 0 auto 50px;
  background-color: var(--white);
  padding: 35px;
  border-radius: 10px;
  box-shadow: 0 8px 20px var(--shadow);
  line-height: 1.7;
}

.content-box h2 {
  color: var(--dark-green);
  font-size: 32px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 12px;
}

.content-box p {
  color: var(--dark-green);
  font-size: 16px;
  margin-bottom: 16px;
}

.content-box p:last-child {
  margin-bottom: 0;
}

.content-box a:not(.back-btn) {
  color: var(--bright-green);
  font-weight: bold;
}

.title-bar,
.section-title {
  color: var(--dark-green);
  font-size: 24px;
  font-weight: bold;
  margin: 30px 0 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--gold);
}

.content-box > .title-bar:first-child,
.content-box > .section-title:first-child {
  margin-top: 0;
}

.section-header {
  max-width: 900px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-header h2 {
  color: var(--dark-green);
  font-size: 36px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.section-header p {
  color: var(--dark-green);
  font-size: 16px;
}

/* ===== STAFF CARDS ===== */
.staff-section,
.welfare-section,
.video-section {
  width: 100%;
  min-width: 0;
  max-width: 1200px;
  margin: 60px auto;
}

.staff-grid,
.welfare-gallery,
.videos-container {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.staff-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.staff-card,
.welfare-card,
.video-card {
  min-width: 0;
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.staff-card:hover,
.welfare-card:hover,
.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.staff-card:focus-visible,
.welfare-card:focus-visible,
.video-card:focus-visible {
  outline: 3px solid rgba(234, 170, 0, 0.85);
  outline-offset: 3px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.staff-photo {
  height: 220px;
  background: linear-gradient(135deg, #eeeeee, #d8d8d8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.staff-photo,
.welfare-image,
.video-frame {
  position: relative;
  overflow: hidden;
}

.photo-placeholder,
.image-placeholder {
  width: 86%;
  height: 86%;
  background: linear-gradient(135deg, var(--dark-green), var(--olive-green));
  color: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.staff-info {
  padding: 18px;
  text-align: center;
}

.staff-info h3 {
  color: var(--dark-green);
  font-size: 18px;
  margin-bottom: 6px;
}

.staff-role {
  color: var(--muted-text);
  font-size: 14px;
}

/* ===== WELFARE GALLERY ===== */
.welfare-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.welfare-image {
  height: 170px;
  background: linear-gradient(135deg, #eeeeee, #d8d8d8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-visual-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.media-visual-img--contain {
  object-fit: contain;
  background: linear-gradient(135deg, rgba(24, 45, 9, 0.98), rgba(47, 107, 47, 0.88));
  padding: 12px;
}

.media-visual-img--portrait {
  object-fit: contain;
  object-position: center top;
  background: linear-gradient(135deg, #f5f5f5, #dfdfdf);
  padding: 10px 12px 0;
}

.photo-card:hover .media-visual-img,
.video-card:hover .video-preview {
  transform: scale(1.04);
}

.media-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 45, 9, 0.15) 0%, rgba(24, 45, 9, 0.72) 100%);
  pointer-events: none;
}

.media-visual-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.welfare-caption {
  padding: 16px;
}

.welfare-caption h4 {
  color: var(--dark-green);
  font-size: 17px;
  margin-bottom: 6px;
}

.welfare-caption p {
  color: var(--muted-text);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== VIDEO CARDS ===== */
.videos-container {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.video-section--compact .videos-container {
  max-width: 560px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--dark-green), var(--olive-green));
  overflow: hidden;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

.video-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
  transition: transform 0.35s ease;
}

.video-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: bold;
  pointer-events: none;
  z-index: 1;
  text-align: center;
  padding: 18px;
}

.video-label i {
  font-size: 58px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.video-label span {
  font-size: 20px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.video-info {
  padding: 18px;
}

.video-info h3 {
  color: var(--dark-green);
  font-size: 18px;
  margin-bottom: 8px;
}

.video-info p {
  color: var(--muted-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== FAQ PAGES ===== */
.faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.faq-list h2 {
  text-align: center;
}

.faq-item {
  margin-bottom: 15px;
}

.faq-question {
  background-color: #eeeeee;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.faq-question:hover {
  background-color: var(--gold);
  color: var(--white);
}

.arrow {
  flex: 0 0 auto;
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.faq-answer {
  display: none;
  background-color: var(--soft-white);
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  margin-top: 5px;
  border-radius: 0 8px 8px 8px;
  line-height: 1.7;
}

/* ===== FOUNDERS ===== */
.intro p {
  margin-bottom: 16px;
}

.founders-section {
  margin-top: 45px;
}

.founders-section > h2 {
  text-align: center;
  margin-bottom: 32px;
}

.founders-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  justify-items: center;
  gap: 30px;
}

.founder-card {
  width: 180px;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 8px 24px var(--shadow);
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-card-back {
  background-color: var(--gold);
  color: var(--dark-green);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  font-size: 14px;
}

.flip-card-back p {
  margin: 0;
  font-size: 14px;
}

/* ===== LOCATION ===== */
.address-section {
  line-height: 1.7;
}

.map-container {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 6px 18px var(--shadow);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

/* ===== BUTTON & FOOTER ===== */
.button-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 40px;
  padding: 0 20px;
  text-align: left;
}

.back-btn {
  display: inline-block;
  background-color: var(--gold);
  color: var(--dark-green);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(234, 170, 0, 0.3);
}

.back-btn:hover {
  background-color: var(--dark-green);
  color: var(--white);
  transform: translateX(-5px);
}

footer {
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  background-color: var(--footer-green);
  color: var(--white);
  text-align: center;
  padding: 25px 20px;
  font-size: 13px;
  line-height: 1.6;
  margin-top: auto;
}

body.modal-open {
  overflow: hidden;
}

.video-modal[hidden],
.photo-modal[hidden] {
  display: none !important;
}

.video-modal,
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 15, 5, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.is-open,
.photo-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.video-modal-dialog,
.photo-modal-dialog {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.3s ease;
}

.video-modal-dialog {
  width: min(960px, 100%);
}

.photo-modal-dialog {
  width: min(1040px, 100%);
}

.video-modal.is-open .video-modal-dialog,
.photo-modal.is-open .photo-modal-dialog {
  transform: translateY(0) scale(1);
}

.video-modal-close,
.photo-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 31, 7, 0.78);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-modal-close:hover,
.video-modal-close:focus-visible,
.photo-modal-close:hover,
.photo-modal-close:focus-visible {
  background: var(--gold);
  color: var(--dark-green);
  transform: scale(1.06);
  outline: none;
}

.video-modal-media {
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-modal-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.video-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.video-modal-header h3,
.photo-modal-header h3 {
  color: var(--dark-green);
  font-size: 28px;
  margin-bottom: 8px;
}

.video-modal-header p,
.photo-modal-header p {
  color: var(--muted-text);
  font-size: 15px;
  line-height: 1.6;
}

.video-modal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.video-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--dark-green);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.video-control-btn:hover,
.video-control-btn:focus-visible {
  background: var(--gold);
  color: var(--dark-green);
  transform: translateY(-2px);
  outline: none;
}

.video-control-btn--accent {
  background: var(--gold);
  color: var(--dark-green);
}

.video-control-btn--accent:hover,
.video-control-btn--accent:focus-visible {
  background: var(--olive-green);
  color: var(--white);
}

.video-modal-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-seek {
  width: 100%;
  accent-color: var(--gold);
}

.video-time {
  align-self: flex-end;
  color: var(--muted-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.photo-modal-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #0b1407;
}

.photo-modal-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(78vh, 820px);
  object-fit: contain;
  border-radius: 12px;
}

.photo-modal-body {
  padding: 20px 24px 24px;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
  header {
    padding: 50px 15px 30px;
  }

  header h1 {
    font-size: 36px;
  }

  main {
    padding: 30px 15px;
  }

  .content-box {
    padding: 25px 20px;
  }

  .button-container {
    padding: 0 15px;
  }

  .title-bar,
  .section-title {
    font-size: 22px;
  }

  .section-header h2 {
    font-size: 30px;
  }

  .video-modal,
  .photo-modal {
    padding: 18px;
  }
}

@media screen and (max-width: 480px) {
  body,
  header,
  main,
  footer {
    width: 100vw;
    max-width: 100vw;
  }

  .social-bar {
    padding: 8px 10px;
    position: static;
    justify-content: center;
    width: 100%;
  }

  .contact-info {
    width: 100%;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    justify-content: center;
    text-align: center;
  }

  header {
    padding: 0 15px 28px;
  }

  header h1 {
    font-size: 28px;
    margin-top: 6px;
  }

  .header-subtitle,
  header p,
  .section-header p {
    max-width: 100%;
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .content-box,
  .staff-section,
  .welfare-section,
  .video-section {
    width: calc(100vw - 30px);
    max-width: calc(100vw - 30px);
  }

  .content-box h2,
  .section-header h2 {
    font-size: 24px;
  }

  .title-bar,
  .section-title {
    font-size: 20px;
  }

  .faq-question {
    padding: 12px;
    gap: 12px;
  }

  .map-container iframe {
    height: 320px;
  }

  .staff-grid,
  .welfare-gallery,
  .videos-container {
    grid-template-columns: 1fr;
  }

  .staff-photo {
    height: 190px;
  }

  .media-visual-label {
    font-size: 16px;
  }

  .video-label i {
    font-size: 48px;
  }

  .video-label span {
    font-size: 18px;
  }

  .video-modal,
  .photo-modal {
    padding: 14px;
  }

  .video-modal-body,
  .photo-modal-body {
    padding: 18px;
  }

  .photo-modal-media {
    padding: 14px;
  }

  .video-modal-header h3,
  .photo-modal-header h3 {
    font-size: 22px;
  }

  .video-control-btn {
    width: 100%;
    justify-content: center;
  }
}
