/* ========================================
   YOKSENG — ชุดนักเรียนสำเร็จรูป
   ธีมน้ำเงิน-ฟ้า สอดคล้องกับโลโก้ YS
   ======================================== */

:root {
  /* Primary Palette - Blue/Navy from OG.jpg */
  --navy-dark: #001a33;
  --navy: #003366;
  --navy-mid: #004080;
  --blue: #005691;
  --blue-accent: #1a6ba0;
  --blue-light: #4A90C7;
  --cyan: #4DC8D9;
  --cyan-light: #7ED9E5;

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f0f5fa;
  --gray-light: #e8edf2;
  --gray: #8a9bb0;
  --gray-dark: #4a5568;
  --text: #1a2a3a;

  /* Accents */
  --line-green: #06C755;
  --gold: #f0c040;
  --shadow: rgba(0, 20, 50, 0.12);
  --shadow-lg: rgba(0, 20, 50, 0.2);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.15rem;
  text-align: center;
  color: var(--gray-dark);
  margin-bottom: 56px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px var(--shadow);
  transition: all 0.3s ease;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-eagle {
  height: 44px;
  width: auto;
}

.logo-text {
  height: 22px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
}

.nav-links li a {
  padding: 8px 16px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-links li a:hover {
  background: var(--off-white);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--text);
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/OG.jpg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  z-index: 0;
  transform: scale(1.05);
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0, 26, 51, 0.75) 0%,
    rgba(0, 51, 102, 0.65) 30%,
    rgba(0, 86, 145, 0.45) 60%,
    rgba(0, 26, 51, 0.85) 100%
  );
  z-index: 1;
}

.hero-nav-fix {
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 24px 60px;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3.8rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  letter-spacing: -0.03em;
}

.hero-sub {
  font-size: 1.8rem;
  font-weight: 400;
  display: block;
  margin-top: 4px;
  opacity: 0.9;
}

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 36px;
  line-height: 1.7;
  text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--cyan);
  color: var(--navy-dark);
  box-shadow: 0 4px 14px rgba(77, 200, 217, 0.35);
}

.btn-primary:hover {
  background: #5dd4e3;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(77, 200, 217, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-line {
  background: var(--line-green);
  color: var(--white);
  padding: 12px 28px;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.3);
}

.btn-line:hover {
  background: #05b84d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.4);
}

.btn-lg {
  padding: 18px 44px;
  font-size: 1.15rem;
}

/* ========== PRODUCTS ========== */
.products {
  background: var(--off-white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all 0.3s ease;
  text-align: center;
  padding-bottom: 20px;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px var(--shadow-lg);
}

.product-img {
  background: linear-gradient(135deg, var(--off-white), #e0e8f0);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 16px 0 4px;
  padding: 0 16px;
}

.product-card p {
  color: var(--gray);
  font-size: 0.9rem;
  padding: 0 16px;
}

/* ========== WHY US ========== */
.why {
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--off-white);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--gray-light);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--blue-light);
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========== TIPS ========== */
.tips {
  background: var(--off-white);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tip-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all 0.3s ease;
  border-left: 4px solid var(--blue-light);
}

.tip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-lg);
}

.tip-number {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(0, 86, 145, 0.08);
  position: absolute;
  top: 12px;
  right: 20px;
  line-height: 1;
  user-select: none;
}

.tip-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.tip-card p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========== HOW TO ORDER ========== */
.howto {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
}

.howto .section-title {
  color: var(--white);
}

.howto .section-sub {
  color: rgba(255,255,255,0.8);
}

.steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  transition: all 0.3s ease;
}

.step:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-4px);
}

.step-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 16px;
}

.step-content h3 {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

.step-arrow {
  color: var(--cyan);
  font-size: 2rem;
  font-weight: 300;
  padding-bottom: 32px;
}

/* ========== MAP ========== */
.map {
  background: var(--white);
}

.map-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.map-embed {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.map-embed iframe {
  display: block;
}

.map-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.map-svg {
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow);
  width: 100%;
}

/* ========== CONTACT ========== */
.contact {
  background: var(--off-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.contact-card {
  background: var(--white);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-lg);
}

.contact-icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--gray);
  margin-bottom: 16px;
}

.contact-phone {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue);
  padding: 6px 0;
  transition: color 0.2s;
}

.contact-phone:hover {
  color: var(--cyan);
}

.address {
  color: var(--gray-dark) !important;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ========== CTA ========== */
.cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  text-align: center;
}

.cta h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.cta p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: 32px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 4px;
  opacity: 0.8;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--cyan);
}

.footer-contact a {
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .map-content {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-sub {
    font-size: 1rem;
    margin-bottom: 36px;
  }

  /* Mobile nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    padding: 8px;
    box-shadow: 0 8px 24px var(--shadow);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 14px 20px;
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero */
  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-sub {
    font-size: 1.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-bg {
    background-position: center 30%;
  }

  /* Grids */
  .product-grid,
  .features-grid,
  .tips-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .steps {
    flex-direction: column;
  }

  .step {
    max-width: 100%;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cta h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 10px 16px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .container {
    padding: 0 16px;
  }
}
