/* ============================================================
   9PLC — Custom Styles
   ============================================================ */

:root {
  --primary: #0a4fa3;
  --primary-dark: #073a7a;
  --accent: #f59e0b;
  --gray-light: #f4f6f9;
}

body {
  font-family: 'Sarabun', 'Segoe UI', sans-serif;
  color: #333;
  padding-top: 70px;
}

/* Navbar */
.navbar { background-color: #fff !important; border-bottom: 1px solid #e5e7eb; }
.navbar-brand { padding: 4px 0; }
.navbar-logo { height: 60px; width: auto; object-fit: contain; }
.nav-link { font-size: 0.9rem; color: #1f2937 !important; }
.nav-link:hover { color: var(--primary) !important; }
.navbar-toggler { border-color: #ccc; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(31,41,55,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

/* ปุ่มสมัครอบรมในเมนู */
.navbar .btn-warning {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.navbar .btn-warning:hover {
  background-color: #d97706 !important;
  border-color: #d97706 !important;
  color: #000 !important;
}

@media (max-width: 991px) {
  .navbar-logo { height: 48px; }
  .navbar-collapse { border-top: 1px solid #e5e7eb; padding-top: .5rem; margin-top: .25rem; }
}

/* Hero Slider */
.hero-slide-img {
  width: 100%; height: 360px; object-fit: cover; display: block;
}

@media (max-width: 768px) {
  .hero-slide-img { height: 200px; }
}

/* Section headings */
.section-title {
  position: relative; font-weight: 700; margin-bottom: 2rem;
  padding-bottom: 0.75rem; display: table;
}
.section-title::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 3px; background: var(--accent);
}
.section-title.text-center { margin-left: auto; margin-right: auto; }
.section-title.text-center::after { left: 0; transform: none; }

/* Cards */
.card { border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.07); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.card-img-top { height: 200px; object-fit: cover; }

/* Course card */
.course-badge { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 4px; }
.course-days  { color: #666; font-size: .85rem; }

/* Product image placeholder */
.product-placeholder {
  background: var(--gray-light); height: 200px;
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 3rem;
}

/* Schedule table */
.table-schedule thead th { background: var(--primary); color: #fff; }
.badge-pending   { background: #f59e0b; }
.badge-confirmed { background: #10b981; }

/* Contact */
.contact-info-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.2rem; }
.contact-icon { width: 40px; height: 40px; background: var(--primary); color: #fff;
                border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Register form */
.register-wrap { background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); padding: 2rem; }

/* Gallery */
.gallery-img { width: 100%; height: 220px; object-fit: cover; border-radius: 6px;
               transition: transform .25s; cursor: pointer; }
.gallery-img:hover { transform: scale(1.03); }

/* Breadcrumb */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 2.5rem 0;
}
.page-banner h1 { font-size: 1.8rem; font-weight: 700; margin: 0; }
.breadcrumb-item a  { color: rgba(255,255,255,.7); text-decoration: none; }
.breadcrumb-item.active { color: var(--accent); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* Topic list */
.topic-item { padding: .5rem 0; border-bottom: 1px solid #f0f0f0; display: flex; gap: .75rem; }
.topic-item:last-child { border-bottom: none; }
.topic-num { color: var(--primary); font-weight: 700; min-width: 1.8rem; }

/* Footer links */
.footer-link:hover { color: var(--accent) !important; }

/* Footer QR Code */
.footer-qr-img {
  width: 140px; height: 140px; object-fit: cover;
  border-radius: 8px; border: 3px solid var(--accent);
}

/* Utility */
.bg-light-blue { background: var(--gray-light); }
.text-primary-custom { color: var(--primary) !important; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-warning  { color: #fff; }

/* Responsive */
@media (max-width: 768px) {
  .hero-caption h1 { font-size: 1.5rem; }
  .hero-section .carousel-item img { height: 300px; }
  .hero-section { min-height: 300px; }
}
