/* ==========================================================================
   Multi-Tenant Modern CMS Theme Stylesheet
   โครงสร้าง: โลโก้ซ้ายสุด - เมนูขวาสุด - แยกไฟล์ CSS ชัดเจน 100%
   ========================================================================== */

:root {
    --font-main: 'IBM Plex Sans Thai', sans-serif;
      --bg-body: #f8fafc;
      --bg-card: #ffffff;
      --text-main: #1e293b;
      --text-muted: #64748b;
      --primary-color: #0072ff;
      --primary-hover: #0056b3;
      --gradient-start: #00c6ff;
      --gradient-end: #0072ff;
      --border-color: #e2e8f0;
      --radius-sm: 8px;
      --radius-md: 12px;
      --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
      background-color: var(--bg-body);
      color: var(--text-main);
      line-height: 1.6;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
}

/* ==========================================================================
   1. ส่วนหัวเว็บไซต์ (Header & Brand Logo & Navigation)
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-inner {
    
      width: 100%;
    padding: 0rem 3rem 0rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand-logo:hover {
      opacity: 0.9;
    }

    .brand-main {
      display: inline-flex;
      align-items: center;
      font-size: 1.85rem;
      font-weight: 700;
      letter-spacing: -0.5px;
      line-height: 0.85;
    }

    .logo-x {
     
          font-size: 3rem;
          font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
          font-weight: 800;
          margin: -5px 1px 0;
          color: #000;

    }
    .logo-x:hover  {
      color: #d00000;
    }
    /* เอฟเฟกต์แอนิเมชันกระพริบและเรืองแสงเล็กน้อยให้ตัวอินฟินิตี้ */
    
    .logo-infinity {
      background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block;
      margin: 0 -5px;
      transform: translateY(4px);
      filter: drop-shadow(0 4px 10px rgba(0, 114, 255, 0.2));
      font-size: 3.5rem;
      animation: infinityGlow 3s ease-in-out infinite;
      font-weight: 750;
    }
     .logo-infinity:hover{
       background: linear-gradient(135deg, #ff0000 0%, #d4000059 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
     }

    .logo-dev {
        
          font-weight: 600;
          opacity: 0.85;
          margin: 0px 8px -10px 3px;
          font-size: 1rem;
          letter-spacing: 3px;
          color: #00000059;

    }
    .logo-dev:hover{
        color: #1e293b; /* สีดำฝั่งซ้าย */
    }
    /* ข้อความ "ยินดีต้อนรับสู่ระบบ" ไว้ใต้โลโก้ ตัวเล็ก */
    .brand-subtitle {
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--text-muted);
      letter-spacing: 0.2px;
      margin-top: 0.1rem;
    }

/* 1.2 แถบเมนูนำทาง (ฝั่งขวาสุด) */
nav.site-nav,
nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-menu,
nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li,
nav ul li {
    position: relative;
    display: inline-block;
}

/* ลิงก์เมนู */
.nav-menu a,
nav ul li a,
nav > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #334155;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

/* ขีดเส้นใต้สีแดงแบบเคลื่อนไหว */
.nav-menu a::after,
nav ul li a::after,
nav > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--accent-red);
    border-radius: 2px;
    transition: width 0.25s cubic-bezier(0.25, 1, 0.5, 1), left 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* จังหวะ Hover */
.nav-menu a:hover,
nav ul li a:hover,
nav > a:hover {
    color: var(--accent-red-hover);
    transform: translateY(-2px);
}

.nav-menu a:hover::after,
nav ul li a:hover::after,
nav > a:hover::after {
    width: 75%;
    left: 12.5%;
}

/* สถานะ Active ของเมนู */
.nav-menu li.active a,
nav ul li.active a {
    color: var(--accent-red);
    font-weight: 600;
}

.nav-menu li.active a::after,
nav ul li.active a::after {
    width: 75%;
    left: 12.5%;
}

/* ==========================================================================
   2. พื้นที่เนื้อหาหลัก (Container & Content)
   ========================================================================== */
.container {
    width: 100%;
    margin: 0 auto;
}

.main-content {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    min-height: 500px;
}

/* ==========================================================================
   3. ฟอร์มค้นหาด่วน (Quick Search Form)
   ========================================================================== */
.search-form-class {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    max-width: 440px;
}

.search-form-class input[type="text"] {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form-class input[type="text"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-submit-green {
    background-color: #059669;
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit-green:hover {
    background-color: #047857;
}

/* ==========================================================================
   4. ส่วนท้ายเว็บไซต์ (Footer - Dark Modern Theme)
   ========================================================================== */
/* ==========================================================================
     Footer 4 Columns - Clean & Lightweight CSS
     ========================================================================== */
  .site-footer {
    background-color: #121826; /* โทนสีเข้มพรีเมียม */
    color: #94a3b8;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    padding: 50px 0 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

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

  /* แบ่งคอลัมน์อัตโนมัติ 4 คอลัมน์ด้วย CSS Grid */
  .footer-inner {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
  }

  .footer-col h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
  }

  .footer-col .footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
  }

  .footer-col p {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.6;
  }

  /* รายการลิงก์เมนู */
  .footer-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .footer-nav-menu li {
    margin-bottom: 10px;
  }

  .footer-nav-menu a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
  }

  .footer-nav-menu a:hover {
    color: #38bdf8; /* เปลี่ยนเป็นสีฟ้าสว่างเมื่อเอาเมาส์ชี้ */
    padding-left: 4px; /* ขยับขวาเล็กน้อยเพิ่มลูกเล่น */
  }

  /* แถบด้านล่างสุด */
  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.82rem;
  }

  .footer-bottom strong {
    color: #cbd5e1;
    font-weight: 600;
  }

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

  .footer-bottom-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
  }

  .footer-bottom-links a:hover {
    color: #38bdf8;
  }

  /* Responsive Design สำหรับแท็บเล็ตและมือถือ */
  @media (max-width: 900px) {
    .footer-inner {
      grid-template-columns: repeat(2, 1fr); /* ปรับเป็น 2x2 บนแท็บเล็ต */
      gap: 28px;
    }
  }

  @media (max-width: 600px) {
    .footer-inner {
      grid-template-columns: 1fr; /* ปรับเป็น 1 คอลัมน์เรียงลงมาบนมือถือ */
      gap: 24px;
    }
    .footer-bottom {
      flex-direction: column;
      gap: 10px;
      text-align: center;
    }
    .footer-bottom-links {
      justify-content: center;
    }
  }

/* ==========================================================================
   5. Responsive Design (การแสดงผลบนหน้าจอมือถือ)
   ========================================================================== */
@media (max-width: 640px) {
    .header-inner {
        padding: 10px 16px;
    }

    /* ซ่อนคำอธิบายบนจอมือถือเพื่อไม่ให้เบียดเมนู */
    .brand-logo .site-desc {
        display: none;
    }

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

    .main-content {
        padding: 20px;
    }
}
/* ==========================================================================
   1.1 กล่อง Brand Logo (ฝั่งซ้ายสุด)
   ========================================================================== */
 /* --- Brand Logo & Subtitle Stack --- */
    .brand-logo {
      display: flex;
      flex-direction: column; /* เรียงข้อความโลโก้กับซับไตเติลเป็นแนวตั้ง */
      text-decoration: none;
      transition: var(--transition-smooth);
    }

    .brand-logo:hover {
      opacity: 0.9;
    }

/* จุดสถานะสีแดง จัดให้อยู่กึ่งกลางแนวตั้ง */
.brand-logo .status-dot {
    width: 9px;
    height: 9px;
    background-color: var(--accent-red);
    border-radius: 50%;
    flex-shrink: 0;
}

/* กล่องจัดกลุ่มชื่อเว็บและคำอธิบายแบบแนวตั้ง */
.brand-logo .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

/* กรณีมีไฟล์รูปภาพโลโก้ */
.brand-logo .site-logo-img {
    max-height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
    margin-bottom: 2px;
}

/* ตัวอักษรโลโก้ข้อความ TOXTOI.COM (เน้นความนุ่มนวล มินิมอล สบายตา) */
.brand-logo .site-name {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Inter", sans-serif;
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #1e293b;
    white-space: nowrap;
}

/* คำอธิบายเว็บไซต์ตัวเล็กด้านล่าง */
.brand-logo .site-desc {
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #64748b;
    margin: 2px 0 0 0;
    padding: 0;
    border: none;
    line-height: 1.2;
    white-space: nowrap;
}
/* ==========================================================================
   6. Hero Section & Dashboard Mockup (เพิ่มใหม่ต่อจากเดิม)
   ========================================================================== */
/* คลาสแม่: ขยายเต็มจอ 100% พร้อมใส่พื้นหลังสีดำและ Gradients */
.hero-section-modern {
    width: 100%;
    background: radial-gradient(900px 520px at 88% -8%, rgba(37, 99, 235, .55), transparent 62%),
                radial-gradient(720px 420px at -12% 112%, rgba(14, 165, 233, .22), transparent 60%),
                var(--navy, #070d1d); /* กำหนดสีสำรองกรณีไม่มีตัวแปร --navy */
}
/* คลาสลูก: ควบคุมความกว้างเนื้อหาให้อยู่ตรงกลาง (Max-width 1200px) */
.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px clamp(16px, 3vw, 36px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 16px;
    }
}

/* ฝั่งซ้าย: ข้อความและฟอร์มค้นหา */
.hero-content-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    width: fit-content;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    background-color: #059669;
    border-radius: 50%;
    box-shadow: 0 0 8px #059669;
}

.hero-main-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.hero-main-title span {
    color: #2563eb;
}

.hero-main-desc {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 520px;
}

/* ช่องค้นหาโดเมนเพิ่มเติมจากระบบเดิม */
.hero-search-box {
    display: flex;
    background: var(--bg-card);
    padding: 6px;
    border-radius: var(--radius-sm);
    max-width: 480px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.hero-search-box input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    color: var(--text-main);
    background: transparent;
}

.hero-btn-search {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.hero-btn-search:hover {
    background-color: #1d4ed8;
}

/* ป้ายราคาโดเมนย่อย */
.hero-domain-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.hero-domain-pill {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.hero-domain-pill strong {
    color: var(--text-main);
    margin-left: 4px;
}

/* ==========================================================================
   6.1 Dashboard Mockup Card (ฝั่งขวา)
   ========================================================================== */
.hero-mockup-container {
    position: relative;
    display: flex;
    justify-content: center;
}

/* ป้ายลอย SSL แจ้งเตือนด้านบนขวา */
.hero-floating-ssl {
    position: absolute;
    top: -18px;
    right: 20px;
    background: #ffffff;
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    z-index: 10;
    animation: floatBadge 3s ease-in-out infinite;
}

.hero-floating-ssl svg {
    color: #059669;
    flex-shrink: 0;
}

.hero-ssl-text strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-ssl-text span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ตัวการ์ดแดชบอร์ดจำลอง */
.hero-dashboard-card {
    background: #ffffff;
    color: var(--text-main);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.hero-window-header {
    background: #f1f5f9;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.hero-window-dots {
    display: flex;
    gap: 6px;
}

.hero-window-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.hero-window-dots span:nth-child(1) { background: #ef4444; }
.hero-window-dots span:nth-child(2) { background: #f59e0b; }
.hero-window-dots span:nth-child(3) { background: #10b981; }

.hero-window-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-dashboard-body {
    padding: 20px;
}

.hero-dashboard-top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-dashboard-top-info strong {
    color: var(--text-main);
}

/* รายการเว็บไซต์ในการ์ด */
.hero-site-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.hero-site-url {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.hero-site-info-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-site-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.hero-tag-ssl {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.hero-tag-status {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* สถิติด้านล่าง */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
    background: var(--bg-page);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.hero-stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-stat-item .stat-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 2px 0 6px 0;
}

.hero-progress-bar {
    width: 100%;
    height: 5px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.hero-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
}

/* ==========================================================================
   6.2 Keyframe Animations & Responsive Media Queries
   ========================================================================== */
@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (max-width: 900px) {
    .hero-section-modern {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 20px auto;
    }
    .hero-content-left {
        align-items: center;
        text-align: center;
    }
    .hero-main-desc {
        max-width: 100%;
    }
    .hero-search-box {
        width: 100%;
        max-width: 100%;
    }
    .hero-domain-pills {
        justify-content: center;
    }
    .hero-floating-ssl {
        right: 10px;
        top: -12px;
    }
}

/* ==========================================================================
   กลุมสี Icon
   ========================================================================== */
.iconGreenBringsmoney {
    /* กำหนดการไล่เฉดสีจากสีเขียว ไปยัง สีน้ำเงิน */
    background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
    
    /* ตัดพื้นหลังให้อยู่ภายในตัวอักษรหรือไอคอน */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    
    /* เอฟเฟกต์การเปลี่ยนแปลงอย่างนุ่มนวล */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

/* เอฟเฟกต์เมื่อเอาเมาส์ชี้ (Hover) ให้ขยับและเรืองแสงเบาๆ */
.iconGreenBringsmoney:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3));
}