@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth; /* เปิดใช้งานการเลื่อนเนียน */
    scroll-padding: 
    var(--scroll-padding, 5rem);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

:root {
    --primary-color: #1a237e;
    --secondary-color: #0d47a1;
    --accent-color: #2196f3;
    --text-light: #ffffff;
    --header-height: 80px;
    --container-width: 1200px;
    --border-radius: 5px;
}

/* Loading Screen */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader {
    width: 120px;
    height: 120px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite, scale 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes scale {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

body {
    background-color: #f5f5f5;
}

.navbar {
  background: linear-gradient(135deg, #1a237e, #0d47a1);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.logo {
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo i {
    font-size: 2rem;
    color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
/* Link Styles */
.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  display: block;
  transition: background-color 0.3s;
}

.nav-links a:hover {
  background-color: #2196f3;
}

/* Primary Navigation Links */
.nav-links > a,
.nav-links .dropdown > a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
  .nav-links a i, 
  .nav-links .dropdown > a i {
      margin-right: 0.5rem;
      font-size: 1.1rem;
      width: 20px;
      text-align: center;
  }

.nav-links a:hover,
.nav-links .dropdown > a:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.hero {
    margin-top: 80px;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/api/placeholder/1200/400') center/cover;
    opacity: 0.1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.content-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.weather-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.weather-card:hover {
    transform: translateY(-10px);
}

.weather-card:hover::before {
    transform: scaleX(1);
}

.weather-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section {
    padding: 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.map-container {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
/* Dropdown Containers */
.dropdown {
  position: relative;
}

/* Dropdown Indicators */
.dropdown > a::after {
  content: '▼';
  font-size: 0.8em;
  margin-left: 0.5rem;
  transition: transform 0.3s;
}

/* Dropdown Menus */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a237e;
  min-width: 220px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.dropdown-content a {
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
}

/* Nested Dropdowns */
.dropdown .dropdown {
  position: relative;
}
.dropdown .dropdown .dropdown-content {
  position: absolute;
  top: 0;
  left: 100%; /* เปลี่ยนจาก left: 0 เป็น left: 100% */
  margin-left: 1px; /* เพิ่มระยะห่างเล็กน้อย */
  transform: translateX(-10px);
}
.nested-dropdown-content {
  position: absolute;
  top: 0;
  left: 100%;
  background-color: #1a237e;
  min-width: 220px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

/* Show Dropdowns on Hover */
.dropdown:hover > .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translate(0);
}
/* Hover Effects */
.nav-links a:hover,
.dropdown-content a:hover,
.nested-dropdown-content a:hover {
  background-color: var(--accent-color);
}

.nav-links .dropdown > a::after {
    content: ' ▼';
    font-size: 0.8em;
    vertical-align: middle;
}

/* ปรับปรุง Mobile Navigation */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a237e;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links > a,
  .nav-links .dropdown > a {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
.hero {
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 2rem;
}

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .dropdown {
        width: 100%;
    }

    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .dropdown-content,
    .nested-dropdown-content {
      position: static;
      display: none;
      opacity: 1;
      visibility: visible;
      transform: none;
      box-shadow: none;
      background-color: rgba(0,0,0,0.2);
      padding-left: 1rem;
    }

    .dropdown.active > .dropdown-content,
  .nested-dropdown.active > .nested-dropdown-content {
    display: block;
  }

  .dropdown > a::after {
    margin-left: auto;
  }

.dropdown-content.show {
  display: block;
}

.nested-dropdown-content.show {
  display: block;
}

    .dropdown-content.show {
        display: block;
    }

    .dropdown-content a {
        padding: 1rem 1rem 1rem 2rem;
        margin: 0;
    }

    /* ปรับปรุง Toggle Button */
    .menu-btn {
        display: block;
        width: 40px;
        height: 40px;
        padding: 0.5rem;
        font-size: 1.5rem;
        border-radius: 5px;
        background: rgba(255,255,255,0.1);
        transition: background-color 0.3s;
    }

    .menu-btn:hover {
        background: rgba(255,255,255,0.2);
    }

    /* ปรับปรุง Dropdown Arrow */
    .nav-links .dropdown > a::after {
        content: '▼';
        font-size: 0.8em;
        margin-left: 0.5rem;
        transition: transform 0.3s;
    }

    .nav-links .dropdown.active > a::after {
        transform: rotate(180deg);
    }

    .dropdown .dropdown .dropdown-content {
      position: static;
      left: 0;
      transform: none;
      margin-left: 1rem;
      box-shadow: none;
      background-color: rgba(0,0,0,0.2);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav-content {
    padding: 0 1rem;
  }
  
  .nav-links > a,
  .nav-links .dropdown > a {
    padding: 0.6rem 1rem;
  }
}
@media (max-width: 480px) {
  .navbar {
    padding: 0.8rem 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }
}

/* color SOSMART */
.styled-hS{
color: #c45711;
font-weight: bold;
}
.styled-hO{
color: #2d74b5;
font-weight: bold;
}
.styled-hS1{
color: #00ae50;
font-weight: bold;
}
.styled-hM{
color: #bd8f00;
font-weight: bold;
}
.styled-hA{
color: #c00000;
font-weight: bold;
}
.styled-hR{
color: #73bcff;
font-weight: bold;
}
.styled-hT{
color: #6e2e9f;
font-weight: bold;
}
.styled-S::first-letter {
color: #c45711;
font-weight: bold;
}
.styled-O::first-letter {
color: #2d74b5;
font-weight: bold;
}
.styled-S1::first-letter {
color: #00ae50;
font-weight: bold;
}
.styled-M::first-letter {
color: #bd8f00;
font-weight: bold;
}
.styled-A::first-letter {
color: #c00000;
font-weight: bold;
}
.styled-R::first-letter {
color: #73bcff;
font-weight: bold;
}
.styled-T::first-letter {
color: #6e2e9f;
font-weight: bold;
}

  #pdf-viewer { width: 100%; height: 600px; border: 1px solid #ccc; }

  .bor{ border:thin; border:dotted; border-radius: 50px; text-align: center; font-family: "Poppins", sans-serif;
    font-weight: bold; font-size: 1em; background-color: whitesmoke;
  }
  .bor2{border:thin; border:solid; border-radius: 25px; --border-size: 0.3rem;
    border: var(--border-size) solid transparent;
  
    /* Paint an image in the border */
    border-image: conic-gradient(
        from var(--angle),
        #d53e33 0deg 90deg,
        #fbb300 90deg 180deg,
        #377af5 180deg 270deg,
        #399953 270deg 360deg
      )
      1 stretch;
    background: rgb(255 255 255 / var(--opacity)); 
    animation: rotate 4s linear infinite, opacityChange 3s infinite alternate;
  }
    @property --opacity {
      syntax: "<number>";
      initial-value: 0.5;
      inherits: false;
    }
    
    @property --angle {
      syntax: "<angle>";
      initial-value: 0deg;
      inherits: false;
    }    
  .style12 {font-family: "Poppins", sans-serif; font-size: 12px; font-weight: bold; }
    /* กำหนดรูปแบบพื้นฐานให้ปุ่ม */
    button, input[type="button"], input[type="submit"] {
      font-family: "Poppins", sans-serif;
      font-size: 16px;
      padding: 10px 20px;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
  
    /* ปุ่ม Browse */
    input[name="Submit4"] {
      background-color: #007BFF;
      color: #fff;
      width: 100px;
    }
    input[name="Submit4"]:hover {
      background-color: #0056b3;
    }
    input[name="Submit"] {
      background-color: #007BFF;
      color: #fff;
      width: 100px;
    }
    input[name="Submit"]:hover {
      background-color: #0056b3;
    }
  
    /* ปุ่ม All Data */
    input[name="Submit5"] {
      background-color: #28a745;
      color: #fff;
    }
    input[name="Submit5"]:hover {
      background-color: #1e7e34;
    }
    /* ปุ่ม All Data */
    input[name="Submit6"] {
      background-color: #28a745;
      color: #fff;
    }
    input[name="Submit6"]:hover {
      background-color: #1e7e34;
    }
  
    /* ปุ่ม Reset */
    input[name="Submit2"] {
      background-color: #dc3545;
      color: #fff;
    }
    input[name="Submit2"]:hover {
      background-color: #a71d2a;
    }
    input[name="Submit3"] {
      background-color: #dc3545;
      color: #fff;
    }
    input[name="Submit3"]:hover {
      background-color: #a71d2a;
    }
  
    /* รูปแบบสำหรับปุ่มทั้งหมดเมื่อคลิก */
    button:active, input:active {
      transform: scale(0.98);
    }
  
  
    /* ปรับขนาดของ input */
    #datepicker {
      font-family: "Poppins", sans-serif;
      width: 200px; /* กำหนดความกว้าง */
      height: 25px; /* กำหนดความสูง */
      padding: 8px; /* ระยะห่างภายใน */
      font-size: 16px; /* ขนาดตัวอักษร */
      border: 1px solid #ccc; /* เส้นขอบ */
      border-radius: 5px; /* มุมโค้ง */
    }
    #datepicker2 {
      font-family: "Poppins", sans-serif;
      width: 200px; /* กำหนดความกว้าง */
      height: 25px; /* กำหนดความสูง */
      padding: 8px; /* ระยะห่างภายใน */
      font-size: 16px; /* ขนาดตัวอักษร */
      border: 1px solid #ccc; /* เส้นขอบ */
      border-radius: 5px; /* มุมโค้ง */
    }
  
    /* ปรับลักษณะของปุ่มไอคอน Datepicker */
    .ui-datepicker-trigger {
      width: 24px; /* กำหนดความกว้างของไอคอน */
      height: 24px; /* กำหนดความสูงของไอคอน */
    }
  
  
    /* สไตล์สำหรับกล่องทั้งหมด */
    .radio-group {
      font-family: "Poppins", sans-serif;
      font-weight: bold;
      display: flex;
      flex-wrap: wrap;
      gap: 15px; /* ระยะห่างระหว่างปุ่ม */
      padding: 10px;
      /* background-color: white;
      border: 1px solid white; */
      border-radius: 5px;
      max-width: 400px;
      margin: 20px auto; /* จัดให้อยู่ตรงกลาง */
      margin-left: 20px;
      margin-right: 20px;
    }
  
    /* ปรับลักษณะของปุ่ม radio */
    .radio-group label {
      display: flex;
      align-items: center;
      font-size: 14px;
      color: black;
      cursor: pointer;
      gap: 8px; /* ระยะห่างระหว่างปุ่มและข้อความ */
    }
  
    /* สไตล์เพิ่มเติมสำหรับ input radio */
    .radio-group input[type="radio"] {
      accent-color: #007bff; /* สีของปุ่ม radio */
      width: 16px;
      height: 16px;
    }
  
    /* สไตล์เมื่อวางเมาส์หรือเลือกปุ่ม */
    .radio-group label:hover {
      color: #007bff;
    }
  
    /* ตั้งค่ากล่อง dropdown */
    .dropdown-container {
      text-align: center; /* จัดข้อความให้อยู่กลาง */
      max-width: 400px; /* ความกว้างสูงสุด */
      width: 100%; /* ปรับให้รองรับหน้าจอทุกขนาด */
    }
  
    /* สไตล์ข้อความหัวข้อ */
    .dropdown-container strong {
      font-size: 18px; /* ขนาดตัวอักษร */
      color: black; /* สีข้อความ */
    }
  
    /* สไตล์ของ select (Dropdown) */
    select {
      width: 80%; /* ความกว้างเต็ม */
      padding: 10px 15px; /* ระยะห่างภายใน */
      margin-top: 10px; /* ระยะห่างด้านบน */
      font-size: 16px; /* ขนาดตัวอักษร */
      color: #333; /* สีข้อความ */
      border: 1px solid #ccc; /* ขอบสีเทาอ่อน */
      border-radius: 6px; /* มุมโค้งมน */
      background: #fff; /* พื้นหลังสีขาว */
      outline: none; /* ลบเส้นขอบเมื่อคลิก */
      transition: border-color 0.3s, box-shadow 0.3s; /* เพิ่มแอนิเมชัน */
    }
  
    /* เมื่อ dropdown ถูกเลือก */
    select:focus {
      border-color: #007bff; /* สีขอบเปลี่ยนเป็นสีน้ำเงิน */
      box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* เพิ่มเงาสีน้ำเงิน */
    }
  
    /* สไตล์ของตัวเลือกใน dropdown */
    select option {
      padding: 5px; /* ระยะห่างภายใน */
      font-size: 14px; /* ขนาดตัวอักษร */
    }
  
    /* เส้นคั่น */
    .separator {
      margin: 20px 0; /* ระยะห่างบน-ล่าง */
      color: black; /* สีเทาอ่อน */
      font-size: 16px; /* ขนาดตัวอักษรเล็ก */
      text-align: center; /* จัดให้อยู่กลาง */
    }
  
  /* coming soon */
  .rainbow {
    text-align: center;
    text-decoration: underline;
    font-size: 17px;
    font-family: "Poppins", sans-serif;
    letter-spacing: 5px;
    animation: colorRotate 6s linear 0s infinite;
  }
  
  .center1 {
    margin-left: auto;
    margin-right: auto;
  }
.bgcolor{
    background: linear-gradient(135deg, #999bfa 25%, #a37ef8 100%);
}

  .group1 {
    width: 300px;
    height: 300px;
    border-radius: 10px;
    padding: 3rem;
    margin: auto;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    
    display: grid ;
    place-content: center;
    text-align: center;
    
    font-size: 1.2em;
    
    --border-size: 0.3rem;
    border: var(--border-size) dotted transparent;
    background-image: linear-gradient(
        to right,
        rgb(255 255 255 / var(--opacity)),
        rgb(255 255 255 / var(--opacity))
      ),
      conic-gradient(
        from var(--angle),
        #d53e33 0deg 90deg,
        #fbb300 90deg 180deg,
        #377af5 180deg 270deg,
        #399953 270deg 360deg
      );
    background-origin: border-box;
    background-clip: padding-box, border-box;
    }
    
    @property --opacity {
    syntax: "<number>";
    initial-value: 0.5;
    inherits: false;
    }
    
    @property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
    }
    
    @keyframes opacityChange {
    to {
      --opacity: 1;
    }
    }
    
    @keyframes rotate {
    to {
      --angle: 360deg;
    }
    }
    .ponit{width:150px;}
    #Layer2 {
        position:absolute;
        left:204px;
        top:278px;
        width:359px;
        height:29px;
        z-index:1;
        background-color: #FFFFFF;
    }
    #Layer3 {
        position:absolute;
        left:688px;
        top:100px;
        width:84px;
        height:36px;
        z-index:1;
    }
    #Layer4 {
        position:absolute;
        left:700px;
        top:81px;
        width:83px;
        height:41px;
        z-index:1;
    }
  
    .group1 {
    animation: rotate 4s linear infinite, opacityChange 3s infinite alternate;
    }


    #ggg {
        width: 100%;
        max-width: 700px;
        height: 50px;
        background-color: #007BFF;
        color: white;
        display: flex;
        align-items: center;
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .style5 {
        font-size: 1.5em;
        font-weight: bold;
    }
    
    input[type="text"] {
        padding: 8px;
        border-radius: 5px;
        border: 1px solid #ccc;
        font-size: 16px;
        width: 200px;
    }
    
    #full {
        width: 100px;
        height: 30px;
        background-color: #28a745;
        color: white;
        text-align: center;
        line-height: 30px;
        border-radius: 5px;
        cursor: pointer;
        margin-top: 10px;
        transition: background-color 0.3s;
    }
    
    #full:hover {
        background-color: #218838;
    }
    
    #mt {
        background: white;
        padding: 15px;
        border-radius: 10px;
        max-height: 406px;
    }
    #mt1 {
      background: white;
      padding: 15px;
      border-radius: 10px;
      max-height: 406px;
  }


/* สไตล์พื้นฐาน */
#myLink {
  display: inline-block; /* ให้เป็นปุ่ม */
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  background: linear-gradient(45deg, #1a237e, #0d47a1);
  border-radius: 25px;
  transition: 0.3s ease-in-out;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

/* เอฟเฟกต์ hover */
#myLink:hover {
  background: linear-gradient(45deg, #1a237e, #0d47a1);
  transform: scale(1.1);
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
}

/* เอฟเฟกต์เมื่อคลิก */
#myLink:active {
  transform: scale(0.95);
}


/* imges slide */
.slider-container {
  width: 80%;
  max-width: 2000px;
  height: 400px;
  margin: auto;
  overflow: hidden;
  position: relative;
  background: white;
  border-radius: 25px;
}
.slide {
  width: 100%;
  height: 100%;
  display: none;
  object-fit: contain;
}
.active {
  display: block;
}
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.prev { left: 10px; }
.next { right: 10px; }