/* ==========================================================================
   Modern, Clean & Organized Portfolio UI Design System
   ========================================================================== */

:root {
  --color-primary: #059669 !important;
  --color-primary-rgb: 5, 150, 105;
  --color-primary-hover: #047857 !important;
  --color-primary-light: #ecfdf5;
  --color-primary-dark: #064e3b;
  --color-accent: #10b981;
  --color-accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  
  --bg: #ffffff !important;
  --bg-elevated: #f8fafc !important;
  --bg-card: #ffffff !important;
  --bg-alt: #f1f5f9;
  
  --border: #e2e8f0 !important;
  --border-subtle: #f1f5f9;
  --border-focus: #10b981;
  
  --text: #0f172a !important;
  --text-muted: #64748b !important;
  --text-light: #94a3b8 !important;
  
  --font-family: 'Plus Jakarta Sans', 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif !important;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 35px -5px rgba(5, 150, 105, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 25px 50px -12px rgba(5, 150, 105, 0.18);
  
  --max-width: 1240px !important;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset & Base */
html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background: #fafcfa;
  color: var(--text);
  font-family: var(--font-family);
  line-height: 1.65;
  background-image: 
    radial-gradient(at 0% 0%, rgba(5, 150, 105, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.04) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(241, 245, 249, 0.8) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: #0f241a;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #064e3b;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: var(--transition-smooth);
}

.brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-name {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.main-nav a {
  color: #475569;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-primary);
  background: rgba(5, 150, 105, 0.07);
}

.main-nav a.active {
  color: var(--color-primary);
  background: rgba(5, 150, 105, 0.1);
}

.main-nav .nav-cta {
  background: var(--color-accent-gradient) !important;
  color: #ffffff !important;
  padding: 10px 22px;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  font-weight: 600;
}

.main-nav .nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.main-nav .admin-login-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.main-nav .admin-login-link:hover {
  color: #064e3b;
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.main-nav .admin-login-link i {
  color: var(--color-primary);
  font-size: 0.85rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 90px 0 80px;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.5) 0%, #fafcfa 100%);
  overflow: hidden;
}

.hero:before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  top: -150px;
  left: -150px;
  pointer-events: none;
}

.hero:after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: 0;
  right: -100px;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.08);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: #0f172a;
  margin: 0 0 24px;
}

.hero h1::first-line {
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  line-height: 1.85;
  color: #475569;
  margin: 0 0 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  color: #ffffff !important;
  background: var(--color-accent-gradient);
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -5px rgba(5, 150, 105, 0.45);
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.btn-primary span {
  transition: transform 0.2s ease;
}

.btn-primary:hover span {
  transform: translateX(4px);
}

.btn-ghost {
  color: #334155 !important;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  color: var(--color-primary) !important;
  border-color: #a7f3d0;
  background: #f0fdf4;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust span::first-letter {
  color: var(--color-primary);
  font-weight: 800;
}

/* Hero Visual & Glass Floating Badges */
.hero-visual {
  position: relative;
}

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: var(--shadow-xl);
  transition: var(--transition-smooth);
}

.hero-image-frame:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.hero-image-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1.38 / 1;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.hero-image-frame:hover img {
  transform: scale(1.02);
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(209, 250, 229, 0.9);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  animation: float 4s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

.floating-card-security {
  left: -20px;
  bottom: 24px;
  animation-delay: 0.5s;
}

.floating-card-support {
  right: -20px;
  top: 24px;
}

.floating-card b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #065f46;
  font-weight: 700;
}

.floating-card small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
}

/* Trust Strip / Stats */
.trust-strip {
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
  color: #ffffff;
  padding: 36px 0;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.trust-grid > div {
  padding: 8px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.trust-grid > div:last-child {
  border-right: none;
}

.trust-grid strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.trust-grid span {
  display: block;
  font-size: 0.88rem;
  color: #a7f3d0;
  margin-top: 4px;
  font-weight: 500;
}

/* Client Logos Section */
.client-logos {
  padding: 80px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.client-logos-heading {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.client-logos-heading .eyebrow {
  margin-bottom: 12px;
}

.client-logos-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  color: #0f172a;
  margin: 0 0 10px;
}

.client-logos-heading p:last-child {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.client-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.client-logo-card {
  min-height: 140px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.client-logo-card:hover {
  transform: translateY(-4px);
  border-color: #a7f3d0;
  background: #f8fafc;
  box-shadow: var(--shadow-lg);
}

.client-logo-card img {
  width: 100%;
  max-width: 120px;
  height: 64px;
  object-fit: contain;
  filter: grayscale(20%);
  transition: var(--transition-smooth);
}

.client-logo-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.client-logo-card span {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

/* General Sections */
.section {
  padding: 96px 0;
  position: relative;
}

.section-alt {
  background: #f8fafc;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 36px;
}

.section-eyebrow {
  display: inline-block;
  color: #059669;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  color: #0f172a;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-header h2:after,
.section h2:after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-accent-gradient);
  margin-top: 12px;
  margin-bottom: 16px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: 32px;
}

.about-rich-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.9;
  border-left: 6px solid var(--color-primary);
}

/* Skills Badges / Chips */
.skill-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-chip,
.tag-list li {
  background: #ffffff;
  color: #065f46;
  border: 1px solid #d1fae5;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  cursor: default;
}

.skill-chip:hover,
.tag-list li:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.12);
}

/* Modern Cards (Services & Projects) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  border-color: #a7f3d0;
  box-shadow: var(--shadow-hover);
}

.card h3 {
  font-size: 1.35rem;
  color: #0f172a;
  margin: 0 0 12px;
}

.card p {
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 16px;
  flex-grow: 1;
}

.card-featured {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px solid #10b981;
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.14);
}

.card-featured::before {
  content: "แนะนำ";
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-accent-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  border: 1px solid #f1f5f9;
  transition: transform 0.4s ease;
}

.card:hover .card-image {
  transform: scale(1.03);
}

.price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 14px;
}

/* Contact Links */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.contact-links a i {
  color: var(--color-primary);
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.contact-links a:hover {
  color: var(--color-primary);
  border-color: #a7f3d0;
  background: #f0fdf4;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-links a:hover i {
  transform: scale(1.15);
}

/* Footer */
.site-footer {
  background: #064e3b;
  color: #ffffff;
  padding: 48px 0;
  border-top: 1px solid #047857;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer p {
  margin: 0;
  color: #a7f3d0;
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

/* PDPA Banner */
.pdpa-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: var(--max-width);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: 16px 24px;
}

.pdpa-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
}

.pdpa-banner-text {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
}

.pdpa-banner-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .hero-visual {
    max-width: 680px;
    margin: 0 auto;
  }
  
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .trust-grid > div:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .site-header {
    background: rgba(255, 255, 255, 0.98);
  }
  
  .header-inner {
    height: 70px;
  }
  
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }
  
  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
    transition: var(--transition-smooth);
  }
  
  .main-nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
    display: none;
  }
  
  .main-nav.active {
    display: flex;
  }
  
  .hero {
    padding: 60px 0 50px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .floating-card {
    display: none;
  }
  
  .section {
    padding: 64px 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .site-footer .container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .pdpa-banner-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .trust-grid {
    grid-template-columns: 1fr;
  }
  
  .trust-grid > div {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 16px;
  }
  
  .trust-grid > div:last-child {
    border-bottom: none;
  }
}
