/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* ===== Header: logo left, menu right (no float) ===== */
@media (min-width: 992px) {
  header.header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  header.header #logo {
    flex-shrink: 0;
  }
  header.header .main-menu {
    margin-left: auto;
  }
}

/* ===== WYD Schedule Table ===== */
.wyd-schedule {
  width: 100%;
  max-width: 100%;
  border: none;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: #fff;
  font-family: 'Poppins', sans-serif;
  border-radius: 10px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.wyd-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto;
  background-color: #6c757d;
}

.wyd-header div {
  padding: 20px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
}

.wyd-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, auto);
  background: #fff;
  padding: 18px;
  gap: 18px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.wyd-cell {
  min-height: 110px;
  padding: 16px;
  margin: 4px;
  border-bottom: 1px solid #e8e8e8;
  border-left: 3px solid #d0d0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: #333;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.wyd-cell:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* Cell Type Styles */
.wyd-cell-mass {
  border-left-color: #fc5b62 !important;
  background: linear-gradient(135deg, #fff5f6 0%, #ffeef0 100%) !important;
  color: #b71c1c !important;
}

.wyd-cell-mass:hover {
  box-shadow: 0 4px 16px rgba(252, 91, 98, 0.25) !important;
  background: linear-gradient(135deg, #ffe6e8 0%, #ffd6d9 100%) !important;
}

.wyd-cell-group1 {
  border-left-color: #0054a6 !important;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  color: #0d47a1 !important;
}

.wyd-cell-group1:hover {
  box-shadow: 0 4px 16px rgba(0, 84, 166, 0.25) !important;
  background: linear-gradient(135deg, #c5e1f5 0%, #90caf9 100%) !important;
}

.wyd-cell-default {
  border-left-color: #ffc107 !important;
  background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%) !important;
  color: #856404 !important;
}

.wyd-cell-default:hover {
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.25) !important;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%) !important;
}

/* Grid Position (6 columns) */
.wyd-body > .wyd-cell:nth-child(1) { grid-column: 1; grid-row: 1; }
.wyd-body > .wyd-cell:nth-child(2) { grid-column: 2 / 5; grid-row: 1; }
.wyd-body > .wyd-cell:nth-child(3) { grid-column: 5; grid-row: 1 / 3; }
.wyd-body > .wyd-cell:nth-child(4) { grid-column: 6; grid-row: 1 / 3; }
.wyd-body > .wyd-cell:nth-child(5) { grid-column: 1 / 5; grid-row: 2; }
.wyd-body > .wyd-cell:nth-child(6) { grid-column: 1 / 5; grid-row: 3; }
.wyd-body > .wyd-cell:nth-child(7) { grid-column: 5; grid-row: 3 / 5; }
.wyd-body > .wyd-cell:nth-child(8) { grid-column: 6; grid-row: 3 / 5; }
.wyd-body > .wyd-cell:nth-child(9) { grid-column: 1; grid-row: 4; }
.wyd-body > .wyd-cell:nth-child(10) { grid-column: 3; grid-row: 4; }
.wyd-body > .wyd-cell:nth-child(11) { grid-column: 4; grid-row: 4; }

/* ===== WYD Logo Grid ===== */
.wyd-logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  text-align: center;
}

.wyd-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.wyd-logo-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 15px;
}

.wyd-logo-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wyd-logo-item p {
  font-size: 14px;
  color: #666;
  margin: 0;
  min-height: 21px;
}

.wyd-logo-grid-center {
  justify-items: center;
  text-align: center;
}

.wyd-logo-grid-center.main .wyd-logo-item p {
  display: none;
}

/* News: vertical layout (photo on top, title and description below) - override base box_news */
a.box_news.box_news_vertical {
  padding-left: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
  margin-bottom: 30px;
}
a.box_news.box_news_vertical:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}
a.box_news.box_news_vertical figure {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 200px;
  margin: 0;
  overflow: hidden;
  flex-shrink: 0;
}
a.box_news.box_news_vertical figure img {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
  height: 200px !important;
  max-width: none !important;
  object-fit: cover;
}
a.box_news.box_news_vertical:hover figure img {
  transform: none !important;
}
a.box_news.box_news_vertical .box_news_content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
a.box_news.box_news_vertical .box_news_content h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}
a.box_news.box_news_vertical .box_news_content p {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.6;
}
a.box_news.box_news_vertical:hover .box_news_content h4 {
  color: #fc5b62;
}
.wyd-news-list .row {
  align-items: stretch;
}
.wyd-news-list .col-lg-4,
.wyd-news-list .col-md-6 {
  display: flex;
}
.wyd-news-list a.box_news.box_news_vertical {
  width: 100%;
}

/* Brochure section: cart_section style, text + button only */
.brochure_text {
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 24px;
}
.cart_section .brochure_text {
  color: #333;
}
/* Brochure download section: different from Seoul 2027 bottom (avoid same bg) */
.hero_in.cart_section.brochure_download_section {
  background: #0054a6 url(../img/pattern_1.svg) center bottom repeat-x;
  background-color: #004080;
}
.hero_in.cart_section.brochure_download_section .brochure_text {
  color: #fff;
}
.hero_in.cart_section.brochure_download_section .btn_1 {
  background: #FFC107;
  color: #333;
  border-color: #FFC107;
}
.hero_in.cart_section.brochure_download_section .btn_1:hover {
  background: #fff;
  color: #0054a6;
  border-color: #fff;
}

/* Seoul 2027: flag photo larger */
.wyd-flag-photo img {
  max-width: 100%;
  width: auto;
  height: auto;
}
@media (max-width: 769px) {
  .container, .container-sm {
      max-width: initial;
  }
}
/* ===== About page ===== */
.about-intro-text p {
  margin-bottom: 1em;
}
.about-intro-text p:last-child {
  margin-bottom: 0;
}
.our-logo-figure {
  margin-bottom: 1.5rem;
}
.our-logo-round {
  max-width: 280px;
  border-radius: 50%;
}
.our-logo-caption {
  font-size: 1rem;
  color: #555;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
.box_feat_wyd i {
  color: #1a365d !important;
}
.box_feat_wyd:hover i {
  color: #2c5282 !important;
}
.box_feat_iata {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  line-height: 0;
}
.box_feat_iata .iata-logo {
  display: inline-block;
  width: auto;
  max-height: 70px;
  height: 70px;
  object-fit: contain;
  vertical-align: middle;
}

/* Footer: IATA (iata_w — dark footer) */
footer .footer-iata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
}
footer .footer-iata-label {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
  line-height: 1.2;
}
footer .footer-iata-logo-wrap {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
footer .footer-iata-logo {
  display: block;
  height: auto;
  width: auto;
  max-height: 32px;
  max-width: min(140px, 100%);
  object-fit: contain;
  object-position: left center;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}
@media (min-width: 576px) {
  footer .footer-iata-logo {
    max-height: 36px;
  }
}
/* Why Choose: equal height */
.why-choose-row {
  align-items: stretch;
}
.why-choose-row .col-lg-4,
.why-choose-row .col-md-6 {
  display: flex;
}
.why-choose-row .box_feat {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.why-choose-row .box_feat p {
  flex: 1;
}

/* Programs page: hero background 6, filter hidden via d-none */
.hero_in.tours.hero_bg_6::before {
  background: url(../img/hero_in_bg_6.jpg) center center no-repeat;
  background-size: cover;
}

/* ===== Seoul 2027 page ===== */
/* .main_title_2 p 와 동일 타이포 (인트로 블록) */
.seoul-2027-intro p {
  font-size: 24px;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 1em;
}
.seoul-2027-intro p:last-of-type {
  margin-bottom: 0;
}
@media (max-width: 767px) {
  .seoul-2027-intro p {
    font-size: 18px;
    font-size: 1.125rem;
  }
}
.wyd-section-center {
  width: 100%;
}
.dioceses-map-container {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.dioceses-map-container .dioceses-map {
  min-width: 100%;
  max-width: 100%;
  height: auto;
}

/* ===== Dioceses Map ===== */
.dioceses-map-container {
  position: relative;
}

.dioceses-map {
  width: 100%;
  height: auto;
  display: block;
}

.arrow-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000;
}

.diocese-info {
  position: absolute;
  background: #fff;
  border: 2px solid #0054a6;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 350px;
  z-index: 10000;
  display: none;
  font-family: 'Poppins', sans-serif;
}

.diocese-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0054a6;
  margin-bottom: 15px;
  border-bottom: 2px solid #0054a6;
  padding-bottom: 8px;
}

.diocese-info p {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 10px;
}

.diocese-info p strong {
  color: #0054a6;
  font-weight: 600;
  display: inline-block;
  min-width: 120px;
}

.diocese-info-close {
  margin-top: 12px;
  margin-bottom: 0 !important;
}

/* Mobile: dioceses list grid (map hidden) */
.dioceses-mobile-list {
  display: none;
}

.diocese-mobile-btn {
  display: block;
  width: 100%;
  padding: 2px 0;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  background: transparent;
  border: none;
  border-bottom: 1px solid #333;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.diocese-mobile-btn:hover {
  color: #333;
  background: transparent;
  opacity: 0.8;
}

@media (min-width: 769px) {
  .diocese-info.diocese-info--mobile {
    position: absolute;
    top: 120px;
    transform: none;
    width: auto;
    max-width: 350px;
    max-height: none;
  }
}

/* ===== Responsive (desktop-first: 1200 → 1024 → 768 → 480) ===== */
@media (max-width: 1200px) {
  .wyd-logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
  
  .wyd-logo-item img {
    height: 100px;
  }
}

@media (max-width: 1024px) {
  .wyd-schedule {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .wyd-header,
  .wyd-body {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .wyd-body {
    padding: 15px;
    gap: 15px;
  }
  
  .wyd-header {
    grid-template-rows: repeat(2, auto);
  }
  
  .wyd-header div {
    font-size: 14px;
    padding: 18px 12px;
    letter-spacing: 0.3px;
  }
  
  .wyd-header div:nth-child(1) { grid-column: 1; grid-row: 1; }
  .wyd-header div:nth-child(2) { grid-column: 2; grid-row: 1; }
  .wyd-header div:nth-child(3) { grid-column: 3; grid-row: 1; }
  .wyd-header div:nth-child(4) { grid-column: 4; grid-row: 1; border-right: none; }
  .wyd-header div:nth-child(5) { grid-column: 1/3; grid-row: 2; }
  .wyd-header div:nth-child(6) { grid-column: 3/5; grid-row: 2; border-right: none; }
  
  .wyd-cell {
    min-height: 120px;
    padding: 14px;
    font-size: 15px;
    position: relative;
  }
  
  /* Divider line before cells 3 and 4 */
  .wyd-body > .wyd-cell:nth-child(3)::before,
  .wyd-body > .wyd-cell:nth-child(4)::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #e0e0e0 20%, #e0e0e0 80%, transparent 100%);
  }
  
  /* 4 columns layout */
  .wyd-body > .wyd-cell:nth-child(1) { grid-column: 1; grid-row: 1; }
  .wyd-body > .wyd-cell:nth-child(2) { grid-column: 2 / 5; grid-row: 1; }
  .wyd-body > .wyd-cell:nth-child(3) { grid-column: 1/3; grid-row: 5 / 6; margin-top: 20px;}
  .wyd-body > .wyd-cell:nth-child(4) { grid-column: 3/5; grid-row: 5 / 6; margin-top: 20px;}
  .wyd-body > .wyd-cell:nth-child(5) { grid-column: 1 / 5; grid-row: 2; }
  .wyd-body > .wyd-cell:nth-child(6) { grid-column: 1 / 5; grid-row: 3; }
  .wyd-body > .wyd-cell:nth-child(7) { grid-column: 1/3; grid-row: 6 / 7; }
  .wyd-body > .wyd-cell:nth-child(8) { grid-column: 3/5; grid-row: 6 / 7; }
  .wyd-body > .wyd-cell:nth-child(9) { grid-column: 1; grid-row: 4; }
  .wyd-body > .wyd-cell:nth-child(10) { grid-column: 3; grid-row: 4; }
  .wyd-body > .wyd-cell:nth-child(11) { grid-column: 4; grid-row: 4; }
}

@media (max-width: 768px) {
  /* Dioceses: map + list, layer center */
  .dioceses-map-container {
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dioceses-map-container .dioceses-map {
    display: none;
    min-width: 480px;
    width: 100%;
    order: 1;
  }
  .dioceses-map-container .arrow-overlay {
    display: none !important;
  }
  .dioceses-mobile-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 20px;
    margin-top: 24px;
    order: 2;
  }
  .diocese-info.diocese-info--mobile {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    right: auto;
    margin: 0;
    max-height: 85vh;
    overflow-y: auto;
    width: calc(100% - 32px);
    max-width: 380px;
    z-index: 10001;
    -webkit-overflow-scrolling: touch;
  }
  .diocese-info.diocese-info--mobile .diocese-info-close {
    margin-top: 16px;
  }
  /* WYD Schedule: same 4-column layout as 1024px, horizontal scroll */
  .wyd-schedule-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
  }
  .wyd-schedule-wrapper .wyd-schedule {
    /* min-width: 480px; */
  }
  .wyd-schedule {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    grid-template-columns: repeat(4, 1fr);
    min-width: 0;
  }
  .wyd-header,
  .wyd-body {
    grid-template-columns: repeat(4, 1fr);
  }
  .wyd-header {
    grid-template-rows: repeat(2, auto);
  }
  .wyd-header div {
    padding: 12px 8px;
    font-size: 10px;
  }
  .wyd-header div:nth-child(1) { grid-column: 1; grid-row: 1; }
  .wyd-header div:nth-child(2) { grid-column: 2; grid-row: 1; }
  .wyd-header div:nth-child(3) { grid-column: 3; grid-row: 1; }
  .wyd-header div:nth-child(4) { grid-column: 4; grid-row: 1; border-right: none; }
  .wyd-header div:nth-child(5) { grid-column: 1/3; grid-row: 2; }
  .wyd-header div:nth-child(6) { grid-column: 3/5; grid-row: 2; border-right: none; }
  .wyd-body {
    padding: 10px;
    gap: 10px;
  }
  .wyd-body > .wyd-cell:nth-child(1) { grid-column: 1; grid-row: 1; }
  .wyd-body > .wyd-cell:nth-child(2) { grid-column: 2 / 5; grid-row: 1; }
  .wyd-body > .wyd-cell:nth-child(3) { grid-column: 1/3; grid-row: 5 / 6; margin-top: 20px;}
  .wyd-body > .wyd-cell:nth-child(4) { grid-column: 3/5; grid-row: 5 / 6; margin-top: 20px;}
  .wyd-body > .wyd-cell:nth-child(5) { grid-column: 1 / 5; grid-row: 2; }
  .wyd-body > .wyd-cell:nth-child(6) { grid-column: 1 / 5; grid-row: 3; }
  .wyd-body > .wyd-cell:nth-child(7) { grid-column: 1/3; grid-row: 6 / 7; }
  .wyd-body > .wyd-cell:nth-child(8) { grid-column: 3/5; grid-row: 6 / 7; }
  .wyd-body > .wyd-cell:nth-child(9) { grid-column: 1; grid-row: 4; }
  .wyd-body > .wyd-cell:nth-child(10) { grid-column: 3; grid-row: 4; }
  .wyd-body > .wyd-cell:nth-child(11) { grid-column: 4; grid-row: 4; }
  .wyd-cell {
    min-height: 70px;
    padding: 10px 8px;
    margin: 3px;
    font-size: 13px;
  }
  .wyd-logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .wyd-logo-item img {
    height: 90px;
  }
  
  .wyd-logo-item h4 {
    font-size: 14px;
    min-height: 42px;
  }
  
  .wyd-logo-item p {
    font-size: 12px;
    min-height: 18px;
  }
}

@media (max-width: 480px) {
  .wyd-cell {
    padding: 10px;
    margin: 2px;
    font-size: 10px;
  }
  
  .wyd-logo-grid,
  .wyd-logo-grid.wyd-logo-grid-center {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .wyd-logo-item img {
    height: 80px;
  }
  
  .wyd-logo-item h4 {
    font-size: 13px;
    min-height: 40px;
  }
  
  .wyd-logo-item p {
    font-size: 11px;
  }
}
