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

body {
  font-family: 'Poppins', sans-serif;
  background: #f6f6f6;
  color: #333;
}


/* =========================
   HEADER
========================= */
.header-top {
  background: #8B0000;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 80px;
  position: relative;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  height: 100px;
  width: auto;
  transform: translateY(10px);
}

.header-title {
  font-family: 'Inria Serif', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.header-right {
  position: absolute;
  top: 15px;
  right: 40px;
  font-size: 14px;
  text-align: right;
}


/* =========================
   NAVIGATION
========================= */
nav {
  background: linear-gradient(90deg, #5c0000, #8B0000, #5c0000);
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 90px;
  flex-wrap: wrap;
}
nav ul li a {
    text-decoration: none; 
    color: white;          
}
nav ul li {
  color: white;
  cursor: pointer;
  position: relative;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 1px;
  transition: 0.3s ease;
  
}

nav ul li:hover {
  color: #ffe5e5;
}

nav ul li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0%;
  height: 2px;
  background: #ffffff;
  transition: 0.3s;
}

nav ul li:hover::after {
  width: 100%;
}

.dropdown-content {
    background-color: #ffffff;    
    min-width: 250px;            
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2); 
    border-radius: 8px;        
}


.dropdown-content a {
    color: #333333 !important;   
    padding: 12px 16px;
    text-decoration: none;        
    display: block;
    text-align: left;            
    font-size: 14px;             
    transition: 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;    
    color: #990000 !important;   
}

.dropdown-content {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 0;
  min-width: 260px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.dropdown-content div {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;          
  color: #111111;           
  letter-spacing: 0.3px;     
  transition: all 0.25s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.dropdown-content div:hover {
  background: #f3f3f3;
  border-left: 4px solid #8B0000;
  color: #000000;            
  padding-left: 28px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================
   DROPDOWN - TEXT DARKER
========================= */

.dropdown-content {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 0;
  min-width: 260px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.dropdown-content div {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;         
  color: #111111;            
  letter-spacing: 0.3px;    
  transition: all 0.25s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.dropdown-content div:hover {
  background: #f3f3f3;
  border-left: 4px solid #8B0000;
  color: #000000;            
  padding-left: 28px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ================= MAIN SECTION ================= */
.main {
    background: #ffffff;
    padding: 70px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    gap: 70px;
}

/* ฝั่งซ้าย */
.text {
    flex: 1;
    text-align: center;
}

/* หัวข้อ */
.text h2 {
    font-size: 29px;
    font-weight: 600;
    margin-bottom: 5px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}


/* เส้นบน */
.text hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}


/* subtitle */
.subtitle {
    color: #777;
    font-size: 16px;
    margin-bottom: 25px;
}


/* เส้นใต้ subtitle */
.line {
    border: none;
    border-top: 1px solid #ddd;
    width: 100%;
    margin: 0 auto 25px auto;
}

/* detail */
.detail {
    color: #444;
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 35px;
}

/* btn */

.discover-btn {
    background: #8B0000;
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
    text-decoration: none;   
}
.discover-btn:hover {
    background: #a30000;
}

/* รูป */
.image {
    flex: 1.1;
}

.image img {
    width: 100%;
    border-radius: 25px;
}


/* ================= CONTACT SECTION ================= */
.contact-section {
    background: #ffffff;
    padding: 40px 0 60px;  
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    gap: 40px;

    border-top: 1px solid #ddd;
    padding-top: 30px;
}

.contact-item {
    flex: 1;
    text-align: center;
}

.icon {
    font-size: 28px;
    margin-bottom: 15px;
}

.contact-item h4 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

/* ================= FOOTER ================= */
footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 20px;
}

/* ================= RESPONSIVE - TABLET ================= */
@media (max-width: 992px) {

  .main .container {
    flex-direction: column;
    text-align: center;
  }

  .image {
    margin-top: 30px;
  }

  .contact-container {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  nav {
    gap: 30px;
    flex-wrap: wrap;
  }

}


/* ================= RESPONSIVE - MOBILE ================= */
@media (max-width: 768px) {

  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    gap: 15px;
  }

  .header-left {
    flex-direction: column;
    gap: 15px;
  }

  .logo {
    height: 80px;
    transform: none;
  }

  .header-title h1 {
    font-size: 18px;
  }

  .header-right {
    position: static;
    margin-top: 10px;
    text-align: center;
  }

  nav {
    padding: 15px 0;
  }

  nav ul {
    flex-direction: column;
    gap: 18px;
  }

  nav ul li {
    font-size: 16px;
  }

  .hero {
    height: 220px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .container {
    width: 96%; 
    margin: 30px auto; 
    padding: 0 10px; 
  }

  .content-box {
    padding: 25px;
  }

  .footer-logo {
    width: 150px;
  }
   
  .image img {
    width: 100%; 
    height: auto;
    border-radius: 12px;
    }
  /* --- แก้ไขส่วน Dropdown --- */
  
  /* 1. จัดตำแหน่งกล่องให้อยู่ตรงกลาง ไม่ลอย และซ่อนไว้ก่อน */
  .dropdown-content {
    position: static !important;
    transform: none !important;
    width: 90%;
    margin: 10px auto 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: none;
    padding: 10px 0;
    
    /* บังคับซ่อน เพื่อให้ JS เป็นตัวสั่งเปิดแทน */
    display: none !important; 
    opacity: 1;
    visibility: visible;
  }

  /* 2. เมื่อมีคลาส .active (ที่ JS เติมให้ตอนกด) ค่อยแสดงกล่องออกมา */
  .dropdown.active .dropdown-content {
    display: block !important;
  }
    
  /* ซ่อน outline สีฟ้าๆ ที่อาจจะขึ้นมาตอนกดในบางเบราว์เซอร์ */
  .dropdown {
    outline: none;
  }

}


/* ================= RESPONSIVE - SMALL MOBILE ================= */
@media (max-width: 480px) {

  .hero h2 {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
    padding: 10px 18px;
  }

  .content-box {
    font-size: 14px;
    line-height: 1.6;
  }

}




.footer {
    background: url("myphoto/building.png") center/cover no-repeat;
    position: relative;
    color: white;
    margin-top: 20px;
}

/* overlay dark */
.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65); 
}

.footer-overlay {
    position: relative;
    z-index: 1;
    padding: 10px 10px 10px;
    text-align: center;
}

/* logo */
.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 80px;
    object-fit: contain;
}


/* copyright */
.footer p {
    font-size: 18px;
    opacity: 0.9;
}
