/* ===================================================
   ACHAT SOCIAL - Main Stylesheet
   Using Bootstrap 5 + Custom CSS
   =================================================== */

/* ---- CSS Variables ---- */
:root {
  --achat-red: #243490;
  --achat-red-dark: #172363;
  --achat-blue: #c0bc08;
  --achat-blue-btn: #d9df15;
  --achat-gold: #c0bc08;
  --navbar-dark: rgba(255, 255, 255, 0.95);
  --navbar-scrolled: rgba(255, 255, 255, 0.98);
  --text-light: rgba(255,255,255,0.9);
  --text-muted-light: rgba(255,255,255,0.65);
  --section-bg-light: #f8fbff;
  --section-bg-dark: #eef7ff;
  --footer-bg: #f8fbff;
  --font-th: 'Sarabun', 'Inter', sans-serif;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-th);
  font-size: 16px;
  color: #333;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===================================================
   NAVBAR
   =================================================== */
#mainNavbar {
  background: var(--navbar-dark);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

#mainNavbar.scrolled {
  background: var(--navbar-scrolled);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 6px;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--achat-red);
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
}

#mainNavbar .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%2813, 110, 253, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#mainNavbar .nav-link {
  color: #555 !important;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.4rem 0.5rem !important;
  transition: color 0.25s ease;
  font-family: var(--font-th);
}

#mainNavbar .nav-link:hover,
#mainNavbar .nav-link.active {
  color: var(--achat-red) !important;
}

#mainNavbar .nav-link.active {
  border-bottom: 2px solid var(--achat-red);
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: url('../img/hero-bg.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
}

.hero-feature {
  background-image: url('../img/hero-feature-bg.jpg');
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(36, 52, 144, 0.8) 0%,
    rgba(23, 35, 99, 0.6) 60%,
    rgba(255, 255, 255, 0.4) 100%
  );
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeSlideUp 1s ease both;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  margin-bottom: 0;
}

/* ===================================================
   PROMO SECTION
   =================================================== */
.promo-section {
  position: relative;
  min-height: 90vh;
  background: url('../img/hero-feature-bg.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
}

.promo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,15,25,0.72);
  z-index: 0;
}

.promo-section .container {
  z-index: 1;
}

.promo-title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: #fff;
  font-weight: 300;
  line-height: 1.6;
}

.promo-title .text-highlight {
  color: var(--achat-blue-btn);
  font-weight: 600;
}

.mockup-laptop-img {
  max-width: 90%;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  animation: floatAnim 4s ease-in-out infinite;
}

/* ===================================================
   FEATURE DETAIL SECTION (White BG)
   =================================================== */
.feature-detail-section {
  background: #fff;
}

.feature-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.feature-heading {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.feature-desc {
  font-size: 1rem;
  color: #666;
  line-height: 1.8;
}

.feature-phone-img {
  max-height: 500px;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15));
}

/* ===================================================
   THREE COLUMN SECTION
   =================================================== */
.three-col-section {
  background: var(--section-bg-light);
}

.section-main-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 400;
  color: #444;
}

.feature-icon-box {
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease;
}

.feature-icon-box:hover {
  transform: translateY(-8px);
}

.icon-wrap {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--achat-red), var(--achat-blue-btn));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(36, 52, 144, 0.3);
}

.feature-icon {
  font-size: 2rem;
  color: #fff;
}

.feature-col-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #333;
  margin-bottom: 0.25rem;
}

.feature-col-subtitle {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1rem;
}

.feature-col-desc {
  font-size: 0.92rem;
  color: #666;
  line-height: 1.8;
}

/* ===================================================
   DOWNLOAD SECTION
   =================================================== */
.download-section {
  position: relative;
  background: url('../img/hero-bg.jpg') center bottom / cover no-repeat;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.download-overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 52, 144, 0.85);
  z-index: 0;
}

.download-section .container {
  z-index: 1;
}

.download-title {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.download-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-top: 1rem;
}

.download-device-img {
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.6));
  animation: floatAnim 5s ease-in-out infinite;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  background: #111;
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  gap: 0.6rem;
}

.btn-store i {
  font-size: 1.6rem;
}

.btn-store:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn-store small {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--footer-bg);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-brand { align-items: flex-start; }
}

.footer-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
}

.footer-logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: #333;
  margin-bottom: 0.25rem;
  font-family: 'Inter', sans-serif;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #888;
}

.footer-divider {
  border-left: 1px solid #ccc;
}

.footer-col-title {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: #555;
  margin-bottom: 0.5rem;
}

.footer-col-text {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.7;
}

.footer-col-text a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col-text a:hover { color: var(--achat-red); }

.footer-bottom {
  background: #d8d8d8;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: #777;
}

/* ===================================================
   FEATURE PAGE - ALT SECTIONS
   =================================================== */
.feature-alt-section {
  background: var(--section-bg-light);
}

.feature-list-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.4rem;
}
.feature-list-title i { color: var(--achat-blue); }

.feature-list-desc {
  font-size: 0.92rem;
  color: #777;
  line-height: 1.7;
}

.member-callout {
  background: linear-gradient(135deg, var(--achat-red), var(--achat-red-dark));
}

.chat-section { background: #fff; }

/* Dark Navy Section */
.teal-section {
  background: linear-gradient(135deg, #172363 0%, #0c143c 100%);
}

.teal-device-img {
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

/* Browser Mockup */
.mockup-browser-box {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  background: #f1f1f1;
}

.browser-bar {
  background: #e8e8e8;
  gap: 0;
}

.browser-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.browser-content {
  background: #fff;
}

/* ===================================================
   PAGE HEADER (Terms / Delete)
   =================================================== */
.page-header {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--achat-red) 0%, var(--achat-red-dark) 100%);
  text-align: center;
}

.page-header-danger {
  background: linear-gradient(135deg, var(--achat-red-dark) 0%, #0c143c 100%);
}

.page-header-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-header-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
  letter-spacing: 1px;
  font-family: 'Inter', sans-serif;
}

/* ===================================================
   TERMS PAGE
   =================================================== */
.terms-section { background: var(--section-bg-light); }

.terms-card {
  background: #fff;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.terms-main-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.25rem;
}

.terms-date {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.terms-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--achat-red);
}

.terms-sub-title {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  margin-top: 1.5rem;
}

.terms-card p, .terms-card li {
  color: #666;
  line-height: 1.85;
  font-size: 0.95rem;
}

.terms-card a { color: var(--achat-red); text-decoration: none; }
.terms-card a:hover { text-decoration: underline; }

/* ===================================================
   DELETE TERMS PAGE
   =================================================== */
.delete-step-card {
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.step-number {
  display: inline-block;
  background: var(--achat-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.delete-item-box {
  background: var(--section-bg-light);
  border: 1px solid #e8e8e8;
  height: 100%;
}

.delete-item-box p { color: #888; margin: 0; }

.timeline-badge {
  min-width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--achat-red), var(--achat-red-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.alert-box {
  background: #eef7ff;
  border: 1px solid #bee3f8;
  border-radius: 8px;
  padding: 0.85rem 1.2rem;
  font-size: 0.9rem;
  color: #2b6cb0;
}

.alert-box-warning {
  background: #fff8e1;
  border-color: #ffc107;
  color: #7d5a00;
}

.contact-card {
  background: linear-gradient(135deg, #f8fbff, #eef7ff);
  color: #333;
  border: 1px solid #cce5ff;
}

.contact-card h3 { color: var(--achat-red); }
.contact-card p { color: #555; }

.btn-contact {
  display: inline-flex;
  align-items: center;
  background: var(--achat-red);
  color: #fff !important;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-contact:hover {
  background: var(--achat-red-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

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

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

/* ===================================================
   UTILITY
   =================================================== */
.z-1 { position: relative; z-index: 1; }
.min-vh-50 { min-height: 50vh; }
.opacity-80 { opacity: 0.8; }

/* ===================================================
   RESPONSIVE TWEAKS
   =================================================== */
@media (max-width: 991.98px) {
  .hero-section,
  .promo-section,
  .download-section { min-height: 70vh; }

  .footer-divider { border-left: none; border-top: 1px solid #ccc; padding-top: 1.5rem; }

  .terms-card { padding: 2rem 1.5rem; }
}

@media (max-width: 767.98px) {
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
  .promo-title { font-size: 1.2rem; }
  .feature-heading { font-size: 1.4rem; }
  .download-title { font-size: 1.5rem; }

  .hero-section,
  .promo-section,
  .download-section { min-height: 60vh; }

  .feature-icon-box { padding: 1.5rem 1rem; }

  .timeline-item { flex-direction: column; align-items: flex-start; }
  .timeline-badge { margin-bottom: 0.5rem; }

  #mainNavbar .nav-link.active { border-bottom: none; }

  .hero-content.text-end { text-align: left !important; }
}

/* ===================================================
   SCROLL REVEAL ANIMATION
   =================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in row */
.feature-icon-box.reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.feature-icon-box.reveal-on-scroll:nth-child(3) { transition-delay: 0.2s; }

