/* --- Variables --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-navy: #0f172a;
  --accent-orange: #f59e0b;
  --accent-orange-hover: #d97706;
  --bg-white: #ffffff;
  --text-grey: #475569;
}

/* --- Shared Component Styles --- */

/* Header */
/* Header - Floating Glass Pill */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  max-width: 95%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 40px;
  z-index: 1000;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 45px;
  transition: 0.3s;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  margin-right: 40px;
}

.logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.logo:hover img {
  transform: scale(1.05);
  transition: 0.3s;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 45px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-navy);
  border-radius: 3px;
  transition: 0.3s;
}

nav a {
  text-decoration: none;
  color: var(--primary-navy);
  font-weight: 400;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-orange);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.btn-cta {
  background: var(--accent-orange);
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.05);
  background: var(--accent-orange-hover);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.4);
}

/* Footer */
.main-footer {
  background: #0a0f1d;
  color: #94a3b8;
  padding: 40px 5% 20px;
  font-size: 0.95rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.main-footer .logo img {
  height: 80px;
  margin-left: 20px;
}

.footer-col h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 600;
  position: relative;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-orange);
}

.footer-col p {
  line-height: 1.8;
  margin-bottom: 15px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  color: #94a3b8;
  text-decoration: none;
  transition: 0.3s;
}

.footer-col ul a:hover {
  color: var(--accent-orange);
  padding-left: 5px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-list .icon {
  color: var(--accent-orange);
  font-size: 1.1rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal {
  display: flex;
  gap: 25px;
}

.footer-legal a {
  color: #64748b;
  text-decoration: none;
  transition: 0.3s;
}

.footer-legal a:hover {
  color: white;
}

@media (max-width: 768px) {
  #main-header .btn-cta {
    display: none;
  }

  /* Ultra-Specific Override to beat any local styles or Tailwind resets */
  html body #main-header {
    position: fixed !important;
    top: 20px !important;
    height: 67px !important; /* Exactly 67px */
    width: 335px !important; /* Exactly 335px */
    max-width: calc(100% - 40px) !important; /* Safety for very small screens */
    padding: 0 20px !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
    left: 50% !important;
    margin-left: 0 !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    border-radius: 50px !important;
    z-index: 10000 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
  }

  html body #main-header .logo img {
    height: 45px !important;
    width: auto !important;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1000;
    overflow: hidden;
  }

  nav.active {
    display: block;
    animation: slideDown 0.3s ease-out forwards;
  }

  nav ul {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    padding: 0;
  }

  .main-footer {
    padding: 30px 20px 20px !important;
    text-align: center;
  }

  .footer-container {
    gap: 30px;
  }

  .footer-col {
    text-align: center;
  }

  .main-footer .logo {
    justify-content: center;
    margin-right: 0;
  }

  .main-footer .logo img {
    margin-left: 0;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .contact-list li {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- FAQ Section --- */
.faq-section {
  padding: 60px 5%;
  background-color: var(--bg-white);
}

@media (max-width: 768px) {
  .faq-section {
    padding: 40px 15px !important;
  }

  .faq-item {
    margin-bottom: 15px !important;
  }

  .faq-item summary {
    padding: 15px 20px !important;
    font-size: 1rem !important;
  }

  .faq-item p {
    padding: 0 20px 20px !important;
  }
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.faq-item:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--accent-orange);
}

.faq-item summary {
  padding: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-navy);
  position: relative;
  list-style: none;
  /* Hide default triangle */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--accent-orange);
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 25px 25px;
  color: var(--text-grey);
  line-height: 1.6;
  margin: 0;
  border-top: 1px solid transparent;
}

.faq-item[open] p {
  border-top-color: #f1f5f9;
  padding-top: 20px;
}

/* --- Floating Contact --- */
.floating-contact {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99999 !important; /* Extremely high z-index */
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
  pointer-events: none; /* Container itself shouldn't block */
}

.contact-item {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 1.8rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  text-decoration: none;
  pointer-events: auto !important; /* But button MUST be clickable */
  cursor: pointer !important;
  overflow: hidden; /* Ensure images are cropped to circle */
}

/* --- Line Main Button (Green) --- */
.btn-line-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #06c755;
  box-shadow: 0 10px 25px rgba(6, 199, 85, 0.3);
  width: 100%;
  border-radius: 15px;
  padding: 15px;
  transition: 0.3s;
  text-decoration: none;
  color: white !important;
  margin-top: 15px;
}

.btn-line-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(6, 199, 85, 0.4);
  background: #05b54d;
}

/* --- CTA Banner (Dark Blue) --- */
.cta-banner-section {
  background: #0f172a; /* Dark Blue */
  padding: 80px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: -1px; /* Fix potential gap */
}

.cta-banner-content h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.cta-banner-content p {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 40px;
  font-weight: 300;
}

.btn-cta-orange {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
  transition: 0.3s;
  text-decoration: none;
}

.btn-cta-orange:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4);
  filter: brightness(1.1);
}

.contact-item.tel {
  background: #2563eb;
}

.contact-item.line {
  background: #06c755;
}

.contact-item:hover {
  transform: scale(1.1);
}

.pulse-anim {
  animation: pulse-phone 2s infinite;
}

.pulse-anim-line {
  animation: pulse-line 2s infinite;
}

@keyframes pulse-phone {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes pulse-line {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(6, 199, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(6, 199, 85, 0);
  }
}

@media (max-width: 768px) {
  .floating-contact {
    bottom: 25px;
    right: 20px;
  }
  .contact-item {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .mobile-break {
    display: block;
  }

  /* Force horizontal layout for contact buttons on mobile */
  .btn-line-main,
  .btn-phone-main {
    flex-direction: row !important;
    white-space: nowrap !important;
    padding: 12px 15px !important;
  }

  .btn-line-main span:first-child,
  .btn-phone-main span:first-child {
    margin-right: 10px !important;
    font-size: 1.5rem !important; /* Slightly smaller icon */
  }

  .btn-line-main span:last-child,
  .btn-phone-main span:last-child {
    font-size: 1.2rem !important; /* Adjust text size */
  }
}

@media (min-width: 769px) {
  .mobile-break {
    display: inline;
  }
}

/* --- Contact Section (Restored Design) --- */
.contact-form-section {
    padding: 60px 20px;
    background-color: #f8fafc; /* Light background behind the card */
    font-family: 'Kanit', sans-serif;
    display: flex;
    justify-content: center;
}

.contact-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); /* Soft shadow */
    padding: 40px;
    max-width: 500px; /* Card width limit */
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden; /* Ensure rounded corners clip content */
}

/* Header inside the card */
.contact-header {
    margin-bottom: 30px;
}

.contact-header h2 {
    font-size: 1.8rem;
    color: var(--primary-navy);
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-header p {
    color: var(--text-grey);
    font-size: 1rem;
}

/* Map specific override */
.contact-map-container {
    margin-top: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    height: 250px; /* Fixed height for consistency */
}

.address-text {
    text-align: left;
    color: var(--text-grey);
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.contact-label {
    text-align: left;
    font-size: 1.2rem; 
    color: var(--primary-navy); 
    margin-bottom: 10px; 
    font-weight: 600;
    margin-top: 30px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

/* Button Styles - Matching the Mockup */
.btn-phone-main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb; /* Blue */
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  width: 100%;
  border-radius: 15px;
  padding: 15px;
  transition: 0.3s;
  text-decoration: none;
  color: white;
  margin-bottom: 15px;
}

.btn-phone-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
  background: #1d4ed8;
}

.btn-line-main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #06c755; /* Green */
  box-shadow: 0 10px 25px rgba(6, 199, 85, 0.3);
  width: 100%;
  border-radius: 15px;
  padding: 15px;
  transition: 0.3s;
  text-decoration: none;
  color: white;
  margin-top: 0; /* Override previous margin */
}

.btn-line-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(6, 199, 85, 0.4);
  background: #05b54d;
}

/* Button Internal Spans ( Icons & Text ) */
.btn-phone-main span:first-child, 
.btn-line-main span:first-child {
  font-size: 1.8rem;
  margin-right: 15px;
}

.btn-phone-main span:last-child, 
.btn-line-main span:last-child {
  font-size: 1.8rem;
  font-weight: 700;
}

/* Floating Contact Widget Refinements */
.floating-contact {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
  pointer-events: none;
}

.contact-item {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 1.8rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  text-decoration: none;
  pointer-events: auto !important;
  cursor: pointer !important;
  overflow: hidden;
  position: relative;
  background-color: white;
  border: 2px solid white;
}

.contact-item.tel {
  background: #2563eb;
}

.contact-item.line {
  background: #06c755;
  padding: 0;
  border: 2px solid white; /* Essential for the halo */
  overflow: hidden; /* Clips the square image to circle */
}

.contact-item.line img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image fills the circle */
  display: block;
}
