/* ========================================
   TP Wallet Official Website
   CSS Stylesheet
   ======================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #1f2937;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --text-dark: #111827;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border-light: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   Typography
   ======================================== */

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

h2 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* ========================================
   Container
   ======================================== */

.container {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}

/* ========================================
   Images
   ======================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-visual img,
.showcase-image img,
.ecosystem-card img,
.trading-image img,
.download-visual img,
.gallery-image-main {
  object-fit: contain;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-large {
  padding: 16px 48px;
  font-size: 1.125rem;
}

/* ========================================
   Header Navigation
   ======================================== */

.header {
  position: sticky;
  top: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.header-actions {
  flex-shrink: 0;
}

.btn-download {
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-download:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.nav-scroll-indicator {
  height: 2px;
  background: transparent;
  width: 0%;
  transition: width 0.3s ease;
}

.nav-scroll-indicator.active {
  background: var(--primary);
}

/* ========================================
   Hero Section
   ======================================== */

.section-hero {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #f3e8ff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

.hero-text > p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.hero-visual {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-visual img {
  width: 100%;
  height: auto;
}

/* ========================================
   Section Header
   ======================================== */

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   Section Styling
   ======================================== */

.section-features,
.section-showcase,
.section-security,
.section-chains,
.section-ecosystem,
.section-trading,
.section-gallery,
.section-testimonials,
.section-download,
.section-faq,
.section-cta {
  padding: 4rem 0;
}

.section-features,
.section-security,
.section-chains,
.section-gallery,
.section-faq {
  background: var(--bg-light);
}

/* ========================================
   Features Grid
   ======================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.8rem;
}

.feature-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* ========================================
   Showcase Section
   ======================================== */

.showcase-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.showcase-text h2 {
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 2rem;
}

.item-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.item-content h4 {
  margin-bottom: 0.5rem;
}

.item-content p {
  margin: 0;
  font-size: 0.95rem;
}

.showcase-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ========================================
   Security Grid
   ======================================== */

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.security-card {
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.security-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.security-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* ========================================
   Chains Section
   ======================================== */

.chains-showcase {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 12px;
}

.chains-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chain-item {
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.3s ease;
}

.chain-item:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.chains-note {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

/* ========================================
   Ecosystem Section
   ======================================== */

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.ecosystem-card {
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
}

.ecosystem-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.ecosystem-card > div:nth-child(1) {
  padding: 2rem;
}

.eco-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.ecosystem-card h3 {
  margin-bottom: 0.8rem;
}

.ecosystem-card > p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.ecosystem-card img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  padding: 1rem;
}

/* ========================================
   Trading Section
   ======================================== */

.trading-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.trading-text h2 {
  margin-bottom: 1.5rem;
}

.trading-features {
  list-style: none;
  margin-top: 2rem;
}

.trading-features li {
  padding: 0.8rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-secondary);
}

.trading-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
  font-size: 1.2rem;
}

/* ========================================
   Gallery Section
   ======================================== */

.gallery-viewer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.gallery-main {
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.gallery-image-main {
  width: 100%;
  height: auto;
  max-height: 500px;
}

.gallery-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100px;
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  border: 2px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  background: white;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumb:hover {
  border-color: var(--primary);
}

.gallery-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ========================================
   Testimonials Section
   ======================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.testimonial-card {
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.star-rating {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.testimonial-card p {
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

/* ========================================
   Download Section
   ======================================== */

.section-download {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 4rem 0;
}

.download-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.download-content h2,
.download-content p {
  color: white;
}

.download-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn-download-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-download-large:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}

.download-icon {
  font-size: 2rem;
}

.download-text {
  text-align: center;
}

.download-label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.download-desc {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ========================================
   FAQ Section
   ======================================== */

.faq-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.faq-group {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-white);
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-group.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.5rem;
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.3s ease;
}

.faq-group.active .faq-answer {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-answer p {
  margin: 0;
  font-size: 0.95rem;
}

/* ========================================
   CTA Section
   ======================================== */

.section-cta {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, #f0f9ff 0%, #f3e8ff 100%);
}

.section-cta h2 {
  margin-bottom: 0.5rem;
}

.section-cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--secondary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: #d1d5db;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: white;
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ========================================
   Back to Top
   ======================================== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.5rem;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

.back-to-top.show {
  display: flex;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1200px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .hero-grid,
  .showcase-wrapper,
  .trading-wrapper,
  .download-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual,
  .showcase-image,
  .trading-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .features-grid,
  .security-grid,
  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chains-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-viewer {
    grid-template-columns: 1fr;
  }

  .gallery-thumbnails {
    flex-direction: row;
    width: 100%;
  }

  .gallery-thumb {
    width: 100px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .container {
    padding: 0 16px;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-menu {
    display: none;
    order: 3;
    flex-basis: 100%;
  }

  .nav-menu.active {
    display: flex;
    flex-direction: column;
  }

  .section-hero,
  .section-features,
  .section-showcase,
  .section-security,
  .section-chains,
  .section-ecosystem,
  .section-trading,
  .section-gallery,
  .section-testimonials,
  .section-download,
  .section-faq,
  .section-cta {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header h2 {
    margin-bottom: 0.5rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .features-grid,
  .security-grid,
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }

  .chains-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .chain-item {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .feature-item {
    grid-template-columns: 40px 1fr;
    gap: 1rem;
  }

  .item-number {
    font-size: 1.5rem;
  }

  .download-buttons {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .gallery-main {
    min-height: 300px;
  }

  .gallery-image-main {
    max-height: 400px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .hero-buttons {
    gap: 0.5rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .btn-large {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

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

  .chains-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .chain-item {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .download-wrapper {
    gap: 2rem;
  }

  .download-buttons {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .faq-container {
    max-width: 100%;
  }

  .faq-question {
    padding: 1.25rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1.25rem 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-thumbnails {
    gap: 0.5rem;
  }

  .gallery-thumb {
    width: 80px;
  }
}
