/* --- Global Brand Color --- */
:root {
  --brand-color-primary: #ff5f6d;
  --brand-color-secondary: #ffc371;
  --brand-color-accent: #2c3e50;

  /* New brand gradient vars used in layout */
  --brand1: var(--brand-color-primary);
  --brand2: var(--brand-color-secondary);
}

/* --- Utility Classes --- */
.glow-hover:hover {
  box-shadow: 0 0 10px rgba(255, 95, 109, 0.3);
}

.btn {
  background: var(--brand-color-accent);
}

.btn.brand {
  background: linear-gradient(to right, var(--brand1), var(--brand2));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* --- Tabs --- */
.tabs button.active {
  background: linear-gradient(to right, var(--brand1), var(--brand2));
}

/* --- Global Reset & Styling --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  background: linear-gradient(to right, #fdfbfb, #ebedee);
  color: #333;
  flex: 1;
}

main {
  flex: 1;
  text-align: center;
}

/* --- Header Accent --- */
.hea-header {
  border-top: 4px solid var(--brand-color-primary);
}

/* --- Intro Sections --- */
.intro-header {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.intro-text {
  color: white;
  flex: 1;
}

.intro-text h1 {
  font-size: 2.5rem;
  margin: 0 0 12px 0;
}

.intro-text p {
  font-size: 1.2rem;
  margin: 0;
}

.logo-large {
  height: 160px;
  width: auto;
}

.logo-small {
  height: 120px;
  width: auto;
}

.hea-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

main h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  text-align: center;
}

main h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  text-align: center;
}

main h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #333;
}

main p {
  text-align: center;
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

main ul {
  list-style-position: inside;
  padding-left: 40px;
  margin-bottom: 12px;
  margin-top: 12px;
}

main ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0.5em 0;
  font-size: 1.05em;
  text-align: left;
}

main ul li::marker {
  color: #666;
  font-weight: bold;
}

main ol {
  counter-reset: step;
  list-style: none;
  padding-left: 40px;
  margin-bottom: 12px;
  margin-top: 12px;
}

main ol li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  margin: 0.75em 0;
  font-size: 1.1em;
}

main ol li::before {
  content: counter(step) ".";
  font-weight: bold;
  margin-right: 12px;
  color: #2b2b2b;
  min-width: 1.5em;
  text-align: right;
}

/* --- Footer --- */
footer.hea-footer {
  padding: 2rem 1rem;
  text-align: center;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  color: white;
  border-radius: 20px;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

footer.hea-footer a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}

footer.hea-footer a:hover {
  opacity: 0.8;
}

/* --- Hero Intro Banner --- */
.hea_intro_banner {
  background: linear-gradient(120deg, var(--brand1), var(--brand2));
  color: white;
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
  border-radius: 0 0 16px 16px;
}

.hea_intro_banner h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hea_intro_banner p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
  .hea_intro_banner h1 {
    font-size: 2rem;
  }
}

.intro h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.intro p {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.intro a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}

.intro a:hover {
  opacity: 0.8;
}

/* --- Privacy Terms --- */

.PrivacyTerrms a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}

.PrivacyTerrms a:hover {
  opacity: 0.8;
}


/* --- HEA Cards Layout --- */
.hea-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.hea-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  width: 300px;
  text-align: left;
  transition: transform 0.2s ease-in-out;
}

.hea-card:hover {
  transform: translateY(-5px);
}

.hea-card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: var(--brand-color-primary);
}

.hea-card p {
  font-size: 0.95rem;
  color: #444;
  margin: 10px 0;
}

.hea-meta {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.4;
  margin-top: 8px;
}

.hea-actions {
  margin-top: 15px;
}

.hea-actions a {
  display: inline-block;
  margin-right: 10px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.hea-actions a:hover {
  text-decoration: underline;
  color: #004999;
}

/* --- Page Header --- */
.page-header {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(120deg, #4b6cb7, #182848);
  color: white;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Features Section --- */
.features {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 auto 40px auto;
  max-width: 960px;
}

.features .card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  padding: 20px;
  width: 280px;
  text-align: center;
}

.features .card h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #333;
}

/* --- CTA Buttons --- */
.cta {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 60px;
}

.catalog-btn {
  background-color: var(--brand-color-primary);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  margin: 10px;
  display: inline-block;
  transition: background-color 0.2s ease-in-out;
}

.catalog-btn:hover {
  background-color: #b42a57;
}

/* --- Comparison Table --- */
.hea-compare-table {
  margin-top: 2rem;
  overflow-x: auto;
}

.hea-compare-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.hea-compare-table th,
.hea-compare-table td {
  border: 1px solid #eee;
  padding: 14px 18px;
  text-align: left;
}

.hea-compare-table th {
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  color: white;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hea-compare-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* --- HEA World Landing Page Styles --- */
html {
  scroll-behavior: smooth;
}

/* Section container */
.hea-section {
  text-align: center;
  max-width: 720px;
  margin: 2rem auto;
}

/* Section heading */
.hea-section h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #333;
}

/* Value card layout */
.hea-value-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Individual value cards */
.hea-card {
  background: white;
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 280px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}

.hea-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* CTA Buttons (reuse .catalog-btn if you want consistent style) */
.hea-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hea-buttons a {
  background: var(--brand-color-primary);
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hea-buttons a:hover {
  background-color: #b42a57;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.get-it-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: #f18f01;
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.get-it-button:hover {
  background-color: #d7263d;
}

.share-it-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: #f18f01;
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.share-it-button:hover {
  background-color: #d7263d;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .hea-list {
    flex-direction: column;
    align-items: center;
  }

  .hea-card {
    width: 90%;
  }
}

/* --- HEA Catalog View Toggle --- */
.view-toggle-icons {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}

.hidden {
  display: none !important;
}

.toggle-icon {
  width: 28px;
  height: 28px;
  cursor: pointer;
  opacity: 0.75;
  transform: scale(1.05);
  transition: opacity 0.2s ease;
}

.toggle-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .toggle-icon {
    width: 22px;
    height: 22px;
  }

  .view-toggle-icons {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.3rem;
  }
}

/* --- HEA Catalog Grid View --- */
.hea-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}

.hea-catalog-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  background: white;
  padding: 1rem;
  width: 220px;
  min-height: 320px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease;
}

.hea-catalog-card p {
  max-height: 7.3em; /* ≈ 5 lines at 0.85rem */
  font-size: 0.85rem;
  color: #444;
  margin: 0 0 0.5rem;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5; 
  -webkit-box-orient: vertical;
}

.hea-catalog-card:hover {
  transform: translateY(-5px);
}

.hea-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.hea-catalog-card h3 {
  margin: 0.3rem 0 0.2rem;
  font-size: 1.05rem;
  color: var(--brand-color-primary);
  font-weight: 700;
}

.hea-catalog-chat-btn {
  background: linear-gradient(135deg, var(--brand-color-secondary), var(--brand-color-primary));
  color: white;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  margin-top: auto;
  align-self: center;
}

.hea-catalog-chat-btn:hover {
  background: linear-gradient(135deg, #c21500, #ffc500);
}

/* --- Tooltip Styles --- */
.hea-info {
  cursor: help;
  position: relative;
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1;
  vertical-align: middle;
}

.hea-info {
  position: relative;
  display: inline-block;
  cursor: help;
}

.hea-info:hover {
  visibility: visible;
  opacity: 1;
}

.hea-icon {
  font-size: 1rem;
  line-height: 1;
}

.hea-tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: help;
}

.hea-tooltip-wrapper .hea-icon {
  font-size: 1rem;
  line-height: 1;
}

.hea-tooltip-wrapper .hea-tooltip {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 1;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  transition: opacity 0.2s;
  pointer-events: none;
}

.hea-tooltip-wrapper:hover .hea-tooltip {
  visibility: visible;
  opacity: 1;
}

/* --- HEA Catalog CTA Card --- */
.cta-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 2px dashed #ccc;
  text-align: center;
  padding: 1rem;
  width: 300px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cta-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.cta-card p {
  margin-bottom: 1rem;
  color: #555;
}

.cta-button {
  background: linear-gradient(135deg, var(--brand-color-primary), var(--brand-color-secondary));
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.cta-button:hover {
  background: linear-gradient(135deg, #c21500, #ffc500);
}

/* --- List View Layout --- */
.hea-list-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  width: 100%;
  min-height: 80px;
  max-width: 850px;
  margin: 0 auto;
  margin-bottom: 0.8rem;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  background: white;
  gap: 0.5rem;
}

.hea-list-left .hea-list-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  margin: 0;
}

.hea-list-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.hea-list-center {
  flex-grow: 1;
  text-align: left;
}

.hea-list-center h3 {
  font-size: 0.9rem;
  margin: 0 0 2px;
}

.hea-list-center p {
  font-size: 0.7rem;
  color: #666;
  margin: 0;
}

.hea-list-right {
  flex-shrink: 0;
}

.hea-list-right .hea-chat-btn {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
}

/* --- HEA Chat Page Layout --- */


/* --- Wrapper with brand background --- */
.hea-colored-wrapper {
  background: linear-gradient(to right, var(--brand1), var(--brand2));
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 1rem;
  margin: 0.5rem auto 2rem auto;
  max-width: 1200px;
  color: #333;
}

/* --- Section Title --- */
.hea-section-title {
  text-align: center;
  font-size: 2rem;
  color: white;
  margin-bottom: 2rem;
}

/* --- Main wrapper for HEA section --- */
/* --- Flex layout --- */
.hea-main-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.hea-info-panel {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  max-width: 480px;
  text-align: center;
  flex: 1;
  min-width: 300px;
  background: #fff;
  border: 1px solid rgba(0, 0, 50, 0.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}

.hea-info-panel img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 1rem auto;
}

.hea-avatar-hea-page {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}

.hea-summary {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

.hea-subtitle {
  font-size: 1rem;
  color: #555;
}

/* --- Chat Panel (right) --- */
.chat-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  max-width: 600px;
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
}

.chat-section-bis {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.06);
  padding: 0 rem;
  max-width: 600px;
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
}

.chat-popup {
  max-width: 600px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  padding: 1rem;
}

.chatbox {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  height: 400px;
  overflow-y: auto;
  background: #f9f9f9;
  margin-bottom: 1rem;
  text-align: left;
}

#chatbox p {
  margin: 0.25rem 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.user-message, .bot-message {
  margin: 0.3rem 0;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  max-width: 90%;
  white-space: pre-wrap;
}

.user-message {
  background: #e6f7ff;
  align-self: flex-end;
}

.bot-message {
  background: #f5f5f5;
  align-self: flex-start;
}

.chat-input-row {
  display: flex;
  align-items: center;
}

#user-input {
  width: 70%;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.3s;
}

#user-input:focus {
  border-color: var(--brand1);
  outline: none;
}

#send-button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  margin-left: 0.5rem;
  background: linear-gradient(to right, var(--brand1), var(--brand2));
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

#send-button:hover {
  opacity: 0.95;
}

/* --- Mobile Stacking --- */
@media (max-width: 768px) {
  .hea-main-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .hea-info-panel,
  .chat-section {
    max-width: 100%;
    width: 100%;
  }
}


/* --- HEA Integration Guide Styles --- */
.integration-demo {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.mock-site-box {
  border: 2px dashed #ccc;
  padding: 2rem;
  text-align: center;
  font-size: 1.5rem;
  color: #555;
  margin-bottom: 2rem;
  background: #fafafa;
  border-radius: 12px;
}

.integration-guide {
  background: #fff6e6;
  border-left: 4px solid var(--brand-color-secondary);
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.integration-guide h3 {
  margin-top: 0;
  color: var(--brand-color-primary);
}

.integration-guide code {
  display: block;
  background: #fff;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #333;
  border: 1px solid #eee;
  border-radius: 6px;
  white-space: pre-line;
}

.integration-demo iframe {
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 100%;
  height: 400px;
  margin-top: 1rem;
}

/* ---- Login ---- */
.button-login {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  background: linear-gradient(to right, var(--brand1), var(--brand2));
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.button-login:hover {
  background: linear-gradient(to right, var(--brand1), var(--brand2));
}

.error {
  color: red;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* hea chat windows */ 

chat-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  color: var(--brand1);
  font-size: 1rem;
  animation: fadeIn 0.3s ease-in;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--brand1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* widget chat */ 

#chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.6rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  background: white;
}

.hea-chat-title {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1rem;
  color: white;
}