/* 
  Modern Design System for Pornpetch Air
  - Google Fonts: 'Prompt' (for Thai) and 'Inter'
  - Color Palette: Corporate Blue, Cool Gray, Vibrant Accents
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary-color: #0b6bc4; /* Strong corporate blue */
  --primary-light: #4ba3ff;
  --primary-dark: #074785;
  --secondary-color: #f7b731; /* Vibrant accent for warnings/highlights */
  --background-color: #f4f7fa; /* Light, airy background */
  --surface-color: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* Gradients */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  /* Typography */
  --font-heading: 'Prompt', sans-serif;
  --font-body: 'Inter', 'Prompt', sans-serif;

  /* Transitions & Radii */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Glassmorphism Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
}

/* ================= Navbar ================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.5rem 5%;
}

.nav-brand h1 {
  font-size: 2.2rem;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links li a {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-smooth);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  transition: var(--transition-fast);
}

/* ================= Hero Section ================= */
.hero {
  margin-top: 80px;
  min-height: 400px;
  height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0.15;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.2rem; margin-bottom: 10px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(11, 107, 196, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 107, 196, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ================= Main Content Sections ================= */
.section {
  padding: 5rem 5%;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-brands {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-products {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Brand Card */
.brand-card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-smooth);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}
.brand-card img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  transition: transform var(--transition-smooth);
  
}
.brand-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.brand-card:hover img {
  
  transform: scale(1.05);
}

/* Feature/Product Card */
.feature-card {
  padding: 2rem;
  border-radius: var(--radius-md);
  background: var(--surface-color);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}
.feature-card p {
  color: var(--text-muted);
}
.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* ================= Footer ================= */
.footer {
  background-color: var(--text-main);
  color: white;
  padding: 4rem 5% 2rem;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}
.footer p, .footer li {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.footer-links {
  list-style: none;
}
.footer-links li a {
  color: #cbd5e1;
}
.footer-links li a:hover {
  color: var(--primary-light);
  padding-left: 5px;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ================= Animations ================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path var(--transition-smooth);
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 3rem 5%;
  }
  .section-title {
    font-size: 2rem;
  }
}

/* Helper Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}
.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(15px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top.show:hover {
    transform: translateY(-5px);
}


/* ================= Dropdown Menu Styles ================= */
.nav-links li.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-color);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  list-style: none;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid var(--border-color);
}
.nav-links li.dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li {
  position: relative;
  padding: 0;
}
.dropdown-menu li a {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.7rem 1.5rem !important;
  color: var(--text-main) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  white-space: normal;
  line-height: 1.4;
}
.dropdown-menu li a:hover {
  background: var(--bg-color);
  color: var(--primary-color) !important;
}
.dropdown-menu li a::after {
  display: none !important;
}

/* Sub-Dropdown Menu Styles (Level 2) */
.dropdown-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  background: var(--surface-color);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  list-style: none;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  z-index: 1001;
}
.dropdown-menu li.dropdown:hover > .dropdown-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Caret icon for submenu indicators */
.caret-right {
  border: solid var(--text-muted);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(-45deg);
  margin-left: 10px;
}

/* Mobile Adjustments for Dropdown */
@media (max-width: 768px) {
  .dropdown-menu, .dropdown-submenu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: transparent;
    padding-left: 1rem;
    min-width: 100%;
    border: none;
  }
  .nav-links li.dropdown:hover > .dropdown-menu,
  .dropdown-menu li.dropdown:hover > .dropdown-submenu {
    display: block;
  }
  .caret-right {
    transform: rotate(45deg);
  }
}
/* ======================================================== */
