/* General Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 620px;
}

/* Card Container */
.card-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative; /* Positioning context for logo and photo */
    padding: 25px;
    box-sizing: border-box;
}

/* Absolutely Positioned Logo */
.logo-container {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 70px;
    z-index: 10;
}
.logo-container img { width: 100%; height: auto; }

/* Absolutely Positioned Photo */
.photo-container {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 100px;
    height: 100px;
    border-radius: 15px;
    overflow: hidden;
    background-color: #e9ecef;
}
.photo-container img { width: 100%; height: 100%; object-fit: cover; }

/* Main Text Content Area */
.text-content-container {
    /* This container holds all the text, with padding to avoid the positioned items */
}

.card-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 15px;
    /* Text needs to clear the logo */
    padding-left: 90px;
}

.name-section { text-align: left; }
.name-section .dept { font-size: 0.9rem; color: #6c757d; margin: 0; }
.name-section .title { font-size: 1rem; color: #495057; margin: 4px 0; font-weight: 600; }
.name-section .name { font-size: 1.8rem; font-weight: 700; color: #212529; margin: 4px 0; }
.name-section .name-han { font-size: 0.9rem; color: #adb5bd; margin: 0; }

.card-main {
    padding-left: 90px;
}

.info-section { text-align: left; }

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.info-item i { color: #007bff; width: 18px; text-align: center; margin-right: 12px; font-size: 1rem; }
.info-item a, .info-item span { color: #343a40; text-decoration: none; word-break: break-all; }

/* Interactive Sections Container */
.interactive-sections-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    padding: 25px;
    box-sizing: border-box;
	
}

/* Image Slider */
.image-slider-container {
    position: relative;
    width: 100%;
    height: 340px; 
    overflow: hidden;
    border-radius: 10px;
    margin: 5px auto;
    padding: 15px 0px;
    background-color: #000;
    box-sizing: border-box;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-image.active {
    opacity: 1;
}

/* Button Grid */
.button-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 10px; /* Space between buttons */
}

.grid-button {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-button:hover {
    background-color: #0056b3;
}

.modal-button {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-button:hover {
    background-color: #0056b3;
}



/* Actions Container below the card */
.actions-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 15px;
    margin-top: 20px;
    padding: 15px 25px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.action-buttons { display: flex; }

.action-btn {
    display: flex;
    align-items: center;
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
    margin-right: 10px;
}

.action-btn i { font-size: 1rem; margin-right: 8px; color: #007bff; }

.social-share {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.share-btn {
    background-color: #e9ecef;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 3px;
    font-size: 1.1rem;
    color: #495057;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 600px) {
    .card-container {
        padding: 20px;
    }
    .logo-container {
        top: 20px;
        left: 20px;
        width: 60px;
    }
    .photo-container {
        position: static; /* Revert to normal flow */
        width: 120px;
        height: 120px;
        border-radius: 50%;
        margin: 0 auto 20px auto; /* Center it */
    }
    .text-content-container {
        text-align: center;
    }
    .card-header {
        padding-left: 0;
        border-bottom: none;
    }
    .name-section { text-align: center; }
    .card-main {
        padding-left: 0;
    }
    .info-section {
        max-width: 300px;
        margin: 0 auto;
        text-align: left;
    }
    .actions-container {
        flex-direction: column;
        padding: 20px;
    }
    .action-buttons {
        width: 100%;
        display: flex;
        justify-content: space-around;
        margin-bottom: 15px;
    }
    .action-btn { font-size: 0.8rem; }
    .social-share { text-align: center; }

    .button-grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on small screens */
    }
}


.qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.qr-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 15px;
    border-radius: 10px;
    width: 260px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.qr-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.qr-close {
    font-size: 20px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}
.qr-close:hover {
    color: #000;
}

.qr-modal-body {
    text-align: center;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-10px);}
    to {opacity: 1; transform: translateY(0);}
}


.map-link {
    color: #333;
    text-decoration: none;
}
.map-link:hover {
    text-decoration: underline;
    color: #1e90ff;
}







.slider-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.slider-image.active {
    opacity: 1;
}

/* 네비게이션 버튼 */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.4);
    border: none;
    color: white;
    font-size: 22px;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 2;
}
.nav-btn:hover {
    background-color: rgba(255,255,255,0.7);
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* 점(dot) 네비게이션 */
.dot-container {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    z-index: 2;
}
.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 4px;
    background-color: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}
.dot.active {
    background-color: white;
}


.modal {
  display: none; /* ✅ 처음에는 보이지 않게 */
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
}

.modal-content {
  position: relative;
  margin: 50px auto;
  background: #000;
  border-radius: 10px;
  width: 850px;           /* PC에서 가로 고정 */
  max-width: 95%;         /* 모바일 대응 */
  height: 90vh;           /* 화면 높이 기준 고정 */
  overflow-y: auto;       /* 세로 스크롤 허용 */
  overflow-x: hidden;
  padding: 10px;
}

/* 이미지 세로 나열 */
.slide {
  margin-bottom: 10px;
}
.slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* 모바일 */
@media (max-width: 768px) {
  .modal-content {
    width: 100%;
    height: 90vh;
    margin: 20px auto;
  }
}

/* 
.image-slider-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 250px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    background: #000;
}


.button-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}
.grid-button {
    padding: 10px;
    border: none;
    background-color: #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.grid-button:hover {
    background-color: #ccc;
}



Hide elements if they are empty
[data-field]:empty { display: none; }
[data-field]:empty + .info-item { display: none; }
 */
 
 
 