/* Import Google Fonts - Sarabun & Noto Sans Thai */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&family=Noto+Sans+Thai:wght@300;400;500;600;700;800&display=swap');

/* add font-family for Kart-Kean */
@font-face {
  font-family: 'Kart-Kean';
  src: url('../fonts/Kart-Kean-suaiDEMO.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


/* Root Variables */
:root {
  --font-primary: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Noto Sans Thai', 'Sarabun', sans-serif;
  --font-title: 'Kart-Kean';
}

/* Global Font Settings */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: #f6f7fb;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Navbar */
.top-navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  padding: 0.75rem 0;

}

.top-navbar.fixed-top {
  z-index: 1030; /* same as Bootstrap fixed elements */

}

.brand-logo {

  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #4a5568;
  margin-top: 1rem;
}

.brand-text-main {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  font-family: var(--font-heading);
}

.brand-text-sub {
  font-size: 0.75rem;
  color: #718096;
  font-weight: 400;
}

.nav-link {
  font-weight: 600;
  color: #4a5568;
  font-size: 1rem;
  font-family: var(--font-heading);
}

.nav-link:hover,
.nav-link.active {
  color: #ff4b5c;
}

.contact-phone {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.95rem;
}

.contact-phone i {
  color: #ff4b5c;
  margin-right: 0.35rem;
}

.social-icon {
  color: #a0aec0;
  margin-left: 0.4rem;
  font-size: 0.9rem;
}

.social-icon:hover {
  color: #ff4b5c;
}

.search-btn {
  border-radius: 999px;
  background-color: #ff4b5c;
  border-color: #ff4b5c;
  color: #fff;
  padding: 0.45rem 0.8rem;
  margin-left: 0.75rem;
}

.search-btn:hover {
  background-color: #ff3246;
  border-color: #ff3246;
  color: #fff;
}

/* Page header */
.page-header {
  background-color: #ffffff;
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #2d3748;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.95rem;
  color: #718096;
  font-weight: 400;
}

/* Cards */
.places-section {
  padding: 1.5rem 0 3rem;
}

.place-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.place-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.13);
}

.place-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.place-body {
  padding: 0.9rem 1.05rem 1rem;
}

.place-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  color: #2d3748;
  font-family: var(--font-heading);
  line-height: 1.4;
}

.view-badge {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  background-color: #00c7a5;
  color: #ffffff;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.view-badge i {
  font-size: 0.8rem;
}

/* Ensure navbar toggler icon is visible on the white navbar */
.top-navbar.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(74,85,104,0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 0.75rem;
  }

  .search-btn {
    margin-top: 0.5rem;
  }


}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.lang-btn {
  padding: 0.25rem 0.75rem;
  border: 2px solid #667eea;
  background: transparent;
  color: #667eea;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.lang-btn:hover {
  background: #667eea;
  color: white;
}

.lang-btn.active {
  background: #667eea;
  color: white;
}

/* Hero Title Base Styles - สำหรับ Desktop */
.hero-title {
  font-family: var(--font-title) !important;
  font-weight: normal;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  font-size: 7rem;
  margin-bottom: 0.5rem;
}

.hero-title2 {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}



 /* Welcome Popup Modal */
    #welcomeModal .modal-dialog {
      max-width: 900px; /* เพิ่มขนาดจาก 600px เป็น 900px */
    }
    
    #welcomeModal .modal-content {
      border: none;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }
    
    #welcomeModal .modal-body {
      padding: 0;
      position: relative;
    }
    
    #welcomeModal .popup-image {
      width: 100%;
      height: auto;
      max-height: 80vh; /* จำกัดความสูงไม่ให้เกินหน้าจอ */
      object-fit: contain;
      display: block;
    }
    
    #welcomeModal .popup-close {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(0,0,0,0.5);
      border: none;
      color: white;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 10;
    }
    
    #welcomeModal .popup-close:hover {
      background: rgba(0,0,0,0.8);
      transform: rotate(90deg);
    }
    
    #welcomeModal .popup-content {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
      color: white;
      padding: 2rem;
      text-align: center;
    }
    
    #welcomeModal .popup-title {
      font-size: 1.5rem;
      font-weight: bold;
      margin-bottom: 0.5rem;
      text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    
    #welcomeModal .popup-description {
      font-size: 1rem;
      margin-bottom: 1rem;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
    
    #welcomeModal .popup-btn {
      background: white;
      color: #667eea;
      border: none;
      padding: 0.75rem 2rem;
      border-radius: 50px;
      font-weight: 600;
      transition: all 0.3s ease;
    }
    
    #welcomeModal .popup-btn:hover {
      background: #667eea;
      color: white;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    .dont-show-again {
      position: absolute;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.85rem;
      color: rgba(255,255,255,0.8);
      background: rgba(0,0,0,0.3);
      padding: 0.25rem 0.75rem;
      border-radius: 50px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .dont-show-again:hover {
      background: rgba(0,0,0,0.5);
      color: white;
    }
    
    .dont-show-again input[type="checkbox"] {
      margin-right: 0.25rem;
    }
    
    /* Responsive สำหรับหน้าจอเล็ก */
    @media (max-width: 991.98px) {
      #welcomeModal .modal-dialog {
        max-width: 90%;
        margin: 1rem auto;
      }
    }
    
    @media (max-width: 575.98px) {
      #welcomeModal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
      }
      
      #welcomeModal .popup-image {
        max-height: 70vh;
      }
    }

    /* Language Switcher */
    .lang-switcher {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-left: 1rem;
    }
    
    .lang-btn {
      padding: 0.25rem 0.75rem;
      border: 2px solid #667eea;
      background: transparent;
      color: #667eea;
      border-radius: 20px;
      font-size: 0.875rem;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
    }
    
    .lang-btn:hover {
      background: #667eea;
      color: white;
    }
    
    .lang-btn.active {
      background: #667eea;
      color: white;
    }

    /* Carousel Responsive Styles */
    .carousel {
      border-radius: 12px;
      overflow: hidden;
    }
    
    .carousel-inner {
      height: 550px;
    }
    
    /* Carousel Responsive Heights */
    @media (max-width: 991.98px) {
      .carousel-inner {
        height: 400px;
      }
      
      .hero-title {
        font-size: 3.5rem;
      }
      
      .hero-title2 {
        font-size: 2.5rem;
      }
    }
    
    @media (max-width: 767.98px) {
      .carousel-inner {
        height: 300px;
      }
      
      .hero-title {
        font-size: 2rem;
      }
      
      .hero-title2 {
        font-size: 1.75rem;
      }
      
      .carousel-caption p {
        font-size: 0.85rem;
      }
    }
    
    @media (max-width: 575.98px) {
      .carousel-inner {
        height: 250px;
      }
      
      .hero-title {
        font-size: 1.5rem;
        letter-spacing: 0.01em;
      }
      
      .hero-title2 {
        font-size: 1.25rem;
      }
      
      .carousel-caption {
        padding: 0.75rem;
        bottom: 15px;
        width: 95%;
      }
      
      .carousel-caption p {
        font-size: 0.75rem;
        display: block;
        line-height: 1.3;
        margin-top: 0.25rem;
      }
    }
    
    @media (max-width: 375.98px) {
      .carousel-inner {
        height: 200px;
      }
      
      .hero-title {
        font-size: 1.25rem;
      }
      
      .hero-title2 {
        font-size: 1rem;
      }
      
      .carousel-caption p {
        font-size: 0.7rem;
      }
    }

    /* Kart-Kean Font for Hero Titles */
    .carousel-caption .hero-title,
    .carousel-caption .hero-title2 {
      text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
      margin-bottom: 0.5rem;
      
    }
    
    /* ปรับตำแหน่ง caption ให้ดูดีบนมือถือ */
    .carousel-caption {
      top: 50%;
      left: 50%;
      right: auto;
      transform: translate(-50%, -50%);
      width: 90%;
      background: rgba(0,0,0,0.6);
      border-radius: 10px;
      padding: 1rem;
      text-align: center;
    }
    
    @media (min-width: 768px) {
      .carousel-caption {
        bottom: auto;
        top: 1.6rem;
        background: transparent;
        border-radius: 0;
        padding: 0;
        width: auto;
        transform: translateX(-50%);
        text-align: center;
      }
    }
    
    /* ให้ข้อความอยู่กลางทุกขนาดจอ */
    .carousel-caption h2,
    .carousel-caption p {
      text-align: center;
      margin: 0 auto;
    }
    
    .carousel-caption h2 {
      margin-bottom: 0.5rem;
    }
    
    /* ปรับให้ข้อความชัดขึ้นบนมือถือ */
    @media (max-width: 767.98px) {
      .carousel-caption {
        background: rgba(0,0,0,0.7);
        padding: 1rem 0.5rem;
      }
      
      .hero-title,
      .hero-title2 {
        text-shadow: 3px 3px 10px rgba(0,0,0,0.9);
      }
      
      .carousel-caption p {
        text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
        font-size: 0.85rem;
        margin-top: 0.5rem;
      }
    }
    
    @media (max-width: 575.98px) {
      .carousel-caption {
        width: 92%;
        padding: 0.75rem 0.5rem;
      }
      
      .hero-title {
        margin-bottom: 0.25rem;
      }
      
      .carousel-caption p {
        margin-top: 0.25rem;
      }
    }