/* About Page Styles */
/* Top image and navbar overlay */

.hero-about {
  position: relative;
  height: 700px;
  display: flex;
  flex-direction: column;
  background-image: url("../../assets/img/image2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Content section */

.about-content {
  display: flex;
  padding: 50px 32px;
  max-width: 1600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  position: relative;
  overflow: hidden;
  gap: 10px;
  flex-direction: row;
}

.about-content .container {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: flex-start;
  max-width: 1300px;
  margin: 0 auto;
  height: fit-content;
  flex: 5;
}

.about-content .container h1 {
  font-size: 3rem;
  color: #000000;
  margin-bottom: 20px;
}

.about-content .container p {
  text-align: start;
  font-weight: 500;
  font-size: 1.2rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
}

.about-content .box1 {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: left;
  padding: 100px 0 60px 0;
}

.about-content .box2 {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: flex-start;
}

.about-content .signature-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-direction: row;
  width: 100%;
}

.about-content .signature-container .signature-text {
  text-align: end;
  margin-bottom: 0;
  line-height: 1.6;
}

.about-content .container2 {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: flex-start;
  max-width: 1300px;
  margin: auto;
  height: fit-content;
  flex: 4;
}

.signature-image {
  width: 30%;
}

.ceo-image {
  display: flex;
  margin: auto;
  justify-content: center;
  align-self: center;
  max-width: 100%;
  max-height: 80%;
}

.about-video {
  display: block;
  max-width: 1000px;
  width: 100%;
  height: auto;
  margin: 6rem auto 4rem auto;
  max-height: 500px;
  object-fit: contain;
}

.about-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 0 60px 0;
  background-color: #f9f9f9;
}

.details-title-wrapper {
  max-width: 1200px;
  width: 100%;
  padding: 2rem 2rem;
  text-align: left;
}

.details-title {
  padding: 70px 0;
  font-size: 2rem;
  color: #000000;
  text-align: flex-start;
}

.details-title h1 {
  font-size: 3rem;
  color: #000000;
  font-weight: 700;
}

/* Desktop carousel styles - grid layout */
.details-scale-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: top center;
  transition: transform 0.3s ease;
  padding-bottom: 6rem;
}

.scroll-container {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

.details-list {
  display: flex;
  flex-wrap: nowrap;
  gap: calc(10px + (50 * ((100vw - 1200px) / 720)));
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  justify-self: center;
  justify-content: center;
  list-style: none;
}

.details-list li {
  list-style: none;
}

/* 카드 스타일 */
.details-list-card {
  background-color: #ffffff;
  position: relative;
  border-radius: 10px;
  padding: 30px 20px;
  height: 400px;
  aspect-ratio: 5 / 7;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: default;
}

.card-image {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  object-fit: contain;
  z-index: 1;
}

.card-text {
  position: absolute;
  bottom: 50px;
  left: 20px;
  right: 20px;
  text-align: center;
}

.card-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #777;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.7rem;
  font-weight: bold;
  color: #333;
}

.details-list-card h2 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1rem;
  font-weight: 600;
}

.details-list-card p {
  font-size: 1.2rem;
  color: #666;
  font-weight: 500;
}

/* ----------------------------------------------------*/
/*뉴스 페이지 */

.news-list {
  padding: 6rem 2rem 4rem 2rem;
  margin: 2rem 0;
}

.news-list .container {
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
  flex-direction: column;
}

.news-list .box1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.news-list .box1 h2 {
  font-size: 2.5rem;
  font-weight: bold;
}

.news-list .box2 p {
  text-align: center;
  font-size: 1.2rem;
  font-weight: normal;
}

.news-list .box2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 4rem 0;
}

.news-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  justify-self: center;
}

.news-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 6rem 4rem;
  margin-bottom: 40px;
  padding: 0 30px;
  margin: 0 auto;
  justify-content: center;
}

.news-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
}

.news-item a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.news-item:hover {
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

.news-thumbnail {
  width: 100%;
  height: 65%;
  object-fit: cover;
  border-bottom: 2px solid var(--primary-color);
  cursor: pointer;
  flex-shrink: 0;
}

.news-content {
  padding: 0 1.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  background-color: transparent;
  flex-shrink: 0;
}

.news-content .date {
  font-size: 0.9rem;
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
  flex-grow: 0;
}

.news-content h2 {
  font-size: 1.3rem;
  color: #222;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 관리자 메뉴 래퍼 */
.admin-menu-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

/* 더보기 버튼 (점 3개) */
.more-btn {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 0;
}

.more-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.more-btn span {
  width: 3px;
  height: 3px;
  background-color: white;
  border-radius: 50%;
  display: block;
}

/* 관리자 메뉴 드롭다운 */
.admin-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.admin-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 관리자 메뉴 항목 */
.admin-menu-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  color: #333;
}

.admin-menu-item:hover {
  background-color: #f5f5f5;
}

.edit-btn {
  color: #007bff;
}

.edit-btn:hover {
  background-color: #e3f2fd !important;
  color: #0056b3;
}

.delete-btn {
  color: #dc3545;
  border-top: 1px solid #eee;
}

.delete-btn:hover {
  background-color: #ffeaea !important;
  color: #c82333;
}

.add-news {
  position: fixed;
  bottom: 110px;
  right: 57px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 1000;
}

.add-news:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 1024px) {
  .news-items {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 0 0;
  }

  .news-content h2 {
    font-size: 1.6rem;
  }

  .news-content .date {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .admin-menu-wrapper {
    top: 8px;
    right: 8px;
  }

  .more-btn {
    width: 28px;
    height: 28px;
  }

  .admin-menu {
    min-width: 100px;
  }

  .admin-menu-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .add-news {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}

/* ---------------------------------------------*/
/* 오시는 길  */

.map-section {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.map-contact-wrapper {
  width: 96%;
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: 7rem 0 6rem 0;
}

.contact-title {
  font-size: 3rem;
  color: #000;
}

.map-container {
  width: 100%;
  height: 100%;
  position: relative;
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-info {
  display: grid;
  gap: 2.5rem;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: 5rem;
}

.info-group {
  background: transparent;
}

.info-item {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.info-item:last-child {
  margin-bottom: 0;
}

.label {
  font-weight: 600;
  color: black;
  background: linear-gradient(135deg, rgb(25, 64, 104), #3a4f61);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.9em;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.2rem;
  box-sizing: content-box;
  min-width: fit-content;
}

.value {
  color: #444;
  hyphens: auto;
  text-align: start;
  line-height: 1.5;
}

.value a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.value a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.contact-methods {
  display: flex;
  gap: 2rem 6rem;
  flex-wrap: wrap;
  width: 90%;
  justify-self: center;
  margin: 0 auto;
}

/* ---------------------------------------------- */
/* 연혁 */
/* -----Timeline------- */

.timeline-container {
  max-width: 1400px;
  margin: 0 auto 6rem auto;
  padding: 0 20px 4rem 20px;
  position: relative;
}

.timeline-container::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 2px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 4rem;
  background-color: #dddddd;
  z-index: 10;
}

.timeline {
  position: relative;
  padding: 5em 0 2em 0;
}

.timeline:before {
  background-color: #dddddd;
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
}

.timeline::after {
  z-index: 100;
  display: flex;
  position: absolute;
  justify-content: center;
  align-items: center;
  text-align: center;

  background-color: var(--primary-color);
  color: white;

  content: "2025";

  top: 5rem;
  left: calc(50% - 50px);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 700;
}

.timeline-events {
  position: relative;
  margin-bottom: 4em;
  width: 100%;
}

/* 홀수 번호 */
.timeline-events:nth-child(odd) .timeline-event-copy {
  justify-self: right;
  margin: 0 0 0 auto;
}

/* 짝수 */
.timeline-events:nth-child(even) .timeline-event-copy {
  justify-self: left;
  margin: 0 auto 0 0;
}

.timeline-event-copy {
  padding: 2em;
  position: relative;
  width: 45%;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.5s ease;
}

.timeline-event-copy h2 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #303030;
}

.timeline-event-copy h3 {
  font-size: 1.75em;
  margin: 0 0 0.5em 0;
  color: #222222;
}

.timeline-event-copy h4 {
  font-size: 1.2em;
  margin: 0 0 1.2em 0;
  color: #666;
}

.timeline-event-copy strong {
  font-weight: 700;
}

.timeline-event-copy p:not(.timeline-event-thumbnail) {
  padding-bottom: 1.2em;
  margin: 0;
}

.timeline-event-copy p:last-child {
  padding-bottom: 0;
}

.timeline-event-icon {
  position: absolute;
  top: 2em;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background-color: #c1c1c1;
  outline: 10px solid #fcfcfc;
  width: 1em;
  height: 1em;
  transition: all 0.3s ease;
  z-index: 2;
}

.timeline-event-thumbnail {
  background-color: black;
  color: white;
  font-size: 0.75em;
  display: inline-flex;
  width: 20%;
  margin-bottom: 1.2em;
  padding: 0.25em 1em 0.2em 1em;
  border-radius: 4px;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 0em var(--primary-color);
}

.timeline-list {
  margin: 1.2em 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.timeline-list li {
  position: relative;
  display: inline-block;
  padding-left: 2em;
  margin-bottom: 1rem;
  line-height: 1.5;
  vertical-align: middle;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--primary-color), #d63384);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(168, 50, 121, 0.3);
  transform: translateY(-50%);
}

.timeline-list li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translateY(-50%);
}

/* 연혁 리스트 아이템 hover 효과 */
.timeline-list li:hover:before {
  background: linear-gradient(135deg, #d63384, var(--primary-color));
  transform: translateY(-50%) scale(1.2);
}
.timeline-list li:hover h2 {
  color: #ff4444;
}

/* 카드 hover 효과 */
.timeline-event-copy:hover ~ .timeline-event-icon {
  transform: translateX(-50%) rotate(-45deg);
  background-color: var(--primary-color);
}

.timeline-event-copy:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.timeline-event-copy:hover .timeline-event-thumbnail {
  background-color: var(--primary-color);
  width: 100%;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .timeline:before {
    left: 2em;
    transform: none;
  }

  .timeline::after {
    left: calc(2rem - 25px);
    width: 50px;
    height: 50px;
  }

  .timeline-container::after {
    content: "";
    position: absolute;
    width: 42px;
    height: 2px;
    left: 2rem;
    bottom: 4rem;
    background-color: #dddddd;
    transform: none;
    z-index: 10;
  }

  .timeline-event-copy {
    justify-self: left !important;
    width: 80%;
    left: 6em !important;
    right: auto !important;
    margin: 0 !important;
    text-align: left !important;
  }

  .timeline-event-copy:hover {
    transform: translateX(15px);
  }

  .timeline-event-icon {
    left: 1.6em;
    transform: rotate(45deg);
  }

  .timeline-events:hover .timeline-event-icon {
    transform: rotate(-45deg);
  }
}

.history {
  max-width: 1000px;
  margin: 80px auto 0;
  position: relative;
  padding-left: 60px;
}

.history h2 {
  font-size: 3rem;
}

.entry-image {
  position: absolute;
  top: 0;
  right: -30rem;
  width: auto;
  height: 30rem;
  aspect-ratio: 720 / 480;
  overflow: hidden;
}

.entry-image img {
  height: 100%;
  width: 100%;
  border-radius: 30px;
  object-fit: cover;
}

/* Mobile Carousel Styles - Single card centered with glimpse cards */
@media (max-width: 1200px) {
  .details-title {
    padding: 40px 0 0 0;
  }
  .details-title h1 {
    font-size: 2.5rem;
  }

  .details-scale-wrapper {
    padding: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  .scroll-container {
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  .details-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 30px;
    padding: 3rem 20px;
    margin: 0;
    justify-content: flex-start;
    grid-template-columns: none;

    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* Add padding to allow first and last cards to be centered */
    padding-left: calc(50vw - 140px); /* Half viewport minus half card width */
    padding-right: calc(50vw - 140px);
  }

  .details-list::-webkit-scrollbar {
    display: none;
  }

  .details-list-card {
    flex: 0 0 280px;
    min-width: 280px;
    width: 280px;
    scroll-snap-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
    transform: scale(0.85);
    cursor: pointer;
    position: relative;
    background: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  /* Active card */
  .details-list-card.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 12px 40px rgba(42, 45, 48, 0.25);
    z-index: 3;
    cursor: default;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  }

  /* Glimpse cards */
  .details-list-card.glimpse {
    opacity: 0.6;
    transform: scale(0.85);
    cursor: pointer;
    z-index: 2;
    border-color: rgba(0, 123, 255, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  }

  .details-list-card.glimpse:hover {
    opacity: 0.8;
    transform: scale(0.9);
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.12);
  }

  /* Enhanced styling for active card content */
  .details-list-card.active h2 {
    color: #000000;
    font-weight: 700;
  }

  .details-list-card.active p {
    color: #333;
    font-weight: 600;
  }

  .details-title-wrapper {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .about-content .box1 {
    padding: 10px 0;
  }

  .about-content .container h1 {
    font-size: 2rem;
  }

  .about-content .container p {
    font-size: 0.9rem;
  }

  .details-title h1 {
    font-size: 2rem;
  }

  .details-list {
    gap: 25px;
    padding: 6rem;
    padding-left: calc(50vw - 130px);
    padding-right: calc(50vw - 130px);
  }

  .details-list-card {
    flex: 0 0 260px;
    min-width: 260px;
    width: 260px;
    padding: 1.5rem;
    height: 350px;
  }

  .details-list-card h2 {
    font-size: 1.3rem;
  }

  .details-list-card p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .about-content .container {
    padding: 10px;
  }

  .signature-image {
    width: 40%;
  }

  .details-list {
    gap: 20px;
    padding: 6rem;
    padding-left: calc(50vw - 120px);
    padding-right: calc(50vw - 120px);
  }

  .details-list-card {
    flex: 0 0 220px;
    min-width: 220px;
    width: 220px;
    padding: 1rem;
    height: 320px;
    transform: scale(0.9);
  }

  .details-list-card h2 {
    font-size: 1.2rem;
  }

  .details-list-card p {
    font-size: 1rem;
  }

  .about-content .box2 {
    padding: 0;
  }

  .about-video {
    margin: 2rem 0;
  }

  /* --------------뉴스 구성요소---------------- */

  .news-items {
    padding: 0;
  }

  .temp-container {
    padding: 0 10px;
  }

  /* ------------연혁-------------- */
  .history {
    padding-left: 30px;
  }

  /* -------------오시는길-------------- */
  .label {
    min-width: 46px;
    text-align: left;
  }

  .contact-methods {
    gap: 1rem 6rem;
  }
}

/* Desktop styles - normal grid layout */
@media (min-width: 1201px) {
  .details-list-card {
    opacity: 1;
    transform: scale(1);
    cursor: default;
  }

  /* Remove mobile classes on desktop */
  .details-list-card.active,
  .details-list-card.glimpse {
    opacity: 1;
    transform: scale(1);
    border-color: transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background: #ffffff;
  }

  .details-list-card.glimpse:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  }

  .details-list-card.active h2,
  .details-list-card.glimpse h2 {
    color: #333;
    font-weight: 600;
  }

  .details-list-card.active p,
  .details-list-card.glimpse p {
    color: #666;
    font-weight: 500;
  }
}
