/* ==========================================================================
   TropicTreasures Capital - Design System & Modern Stylesheet
   Theme: Vibrant Tropic Coral & Sunset Dark Emerald Teal
   Color Palette:
   - Primary BG: #042f2e (Deep Tropic Teal)
   - Accent Coral: #f97316 (Sunset Coral / Vibrant Orange)
   - Accent Coral Light: #fb923c
   - Accent Teal Glow: #2dd4bf / #0f766e
   - Glass Cards: rgba(6, 78, 59, 0.4) & rgba(15, 118, 110, 0.25)
   - Border Glass: rgba(45, 212, 191, 0.15)
   - Text Primary: #f8fafc
   - Text Muted: #94a3b8
   Font: 'Outfit', sans-serif
   ========================================================================== */

:root {
  --bg-primary: #042f2e;
  --bg-surface: #064e3b;
  --bg-card: rgba(15, 118, 110, 0.18);
  --bg-card-hover: rgba(15, 118, 110, 0.32);
  --bg-glass-nav: rgba(4, 47, 46, 0.85);

  --accent-coral: #f97316;
  --accent-coral-hover: #ea580c;
  --accent-coral-light: #fb923c;
  --accent-teal: #2dd4bf;
  --accent-teal-dark: #0d9488;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  --border-glass: rgba(45, 212, 191, 0.18);
  --border-highlight: rgba(249, 115, 22, 0.4);

  --shadow-glow: 0 10px 30px -10px rgba(249, 115, 22, 0.3);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.4);

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(15, 118, 110, 0.25) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(249, 115, 22, 0.12) 0%, transparent 40%),
              var(--bg-primary);
}

/* Typography Fluid Scaling */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

p {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  color: #cbd5e1;
}

/* Helper Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-gradient-coral {
  background: linear-gradient(135deg, #fdba74 0%, #f97316 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-teal {
  background: linear-gradient(135deg, #99f6e4 0%, #2dd4bf 50%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-full);
  color: var(--accent-coral-light);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-4px);
}

/* Buttons (48px+ Touch Target for Mobile) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  min-width: 48px;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(249, 115, 22, 0.45);
}

.btn-outline {
  background: rgba(15, 118, 110, 0.15);
  border: 1.5px solid var(--accent-teal);
  color: var(--accent-teal);
}

.btn-outline:hover {
  background: rgba(45, 212, 191, 0.2);
  color: #ffffff;
  border-color: var(--accent-teal);
  transform: translateY(-2px);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-glass-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.75rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  min-height: 48px;
  min-width: 48px;
  touch-action: manipulation;
}

.brand-logo svg {
  color: var(--accent-coral);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.975rem;
  transition: var(--transition-fast);
  padding: 0.5rem 0;
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-coral);
}

/* Mobile Burger Menu Button (Min 48px target) */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 10px;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
}

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 5rem;
  position: relative;
}

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

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-title {
  color: #ffffff;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-glass);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-wrapper:hover img {
  transform: scale(1.03);
}

/* Features Grid */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-coral);
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card-title {
  margin-bottom: 0.75rem;
  color: #ffffff;
}

/* Longread Content Styles */
.article-section {
  padding: 5rem 0;
  background: rgba(6, 78, 59, 0.2);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.article-content {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(4, 47, 46, 0.6);
  backdrop-filter: blur(12px);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.article-content h2 {
  color: var(--accent-coral-light);
  margin: 2.5rem 0 1rem 0;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  color: var(--accent-teal);
  margin: 1.75rem 0 0.75rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
}

.article-content li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.highlight-box {
  background: rgba(15, 118, 110, 0.25);
  border-left: 4px solid var(--accent-coral);
  padding: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2rem 0;
  font-style: italic;
  color: #f1f5f9;
}

/* Interactive Savings Calculator Widget */
.calculator-card {
  background: rgba(6, 78, 59, 0.5);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 900px;
  margin: 3rem auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  min-height: 48px;
  min-width: 48px;
  padding: 0.75rem 1rem;
  background: rgba(4, 47, 46, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.calc-result-box {
  background: rgba(4, 47, 46, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.calc-result-value {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent-coral);
}

/* Accordion FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  min-height: 52px;
  min-width: 48px;
  touch-action: manipulation;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--accent-coral);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Contact Details & Legal Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 850px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-item svg {
  width: 24px;
  height: 24px;
  color: var(--accent-coral);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* Footer */
.footer {
  background: #021a19;
  border-top: 1px solid var(--border-glass);
  padding: 4rem 0 2rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}

.footer-links a:hover {
  color: var(--accent-coral);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* Responsive Mobile Navigation Drawer (<991px) */
@media (max-width: 991px) {
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    margin-left: auto;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 70px);
    background: #042f2e;
    border-left: 1px solid var(--border-glass);
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 0.75rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    min-height: 48px;
    min-width: 48px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }
}

/* Header Requirement for Mobile (<768px): ONLY Logo left and Hamburger right */
@media (max-width: 767px) {
  .nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .brand-logo {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    min-height: 48px;
    min-width: 48px;
  }

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }
}

/* 375px+ Screen Optimization for Tropic Cards, Hero & Form Layout */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
    width: 100%;
  }

  .hero {
    padding-top: 7.5rem;
    padding-bottom: 3.5rem;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
    min-height: 50px;
  }

  /* Tropic Cards Adaptation for 375px */
  .glass-card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .cards-grid {
    gap: 1.25rem;
  }

  .card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
  }

  .calculator-card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    margin: 1.5rem auto;
    width: 100%;
    box-sizing: border-box;
  }

  .calc-grid {
    gap: 1.25rem;
  }

  .calc-result-box {
    padding: 1.25rem 0.75rem;
    width: 100%;
  }

  .calc-result-value {
    font-size: clamp(1.8rem, 7.5vw, 2.5rem);
    word-break: break-word;
  }

  .article-content {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    width: 100%;
  }

  .article-content h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .article-content h2 {
    font-size: clamp(1.25rem, 5vw, 1.6rem);
  }

  .article-content p, .article-content li {
    font-size: 1rem;
    line-height: 1.7;
  }

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

  .footer {
    padding: 3rem 0 1.5rem 0;
    margin-top: 3rem;
  }

  .footer-grid {
    gap: 2rem;
  }
}
