/* ===================================
   ELEGANT TECH-FUTURISM THEME
   Phuket/Thailand Minimalist Approach
   ================================== */

/* CSS Variables - Color System */
:root {
  /* Core Colors */
  --primary: #1e40af;
  --secondary: #0d9488;
  --background: #f8fafc;
  --footer-bg: #1e3a8a;
  --button: #f59e0b;
  
  /* Section Backgrounds */
  --section-1: #ffffff;
  --section-2: #f1f5f9;
  --section-3: #e0f2fe;
  
  /* Typography */
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', 'Helvetica Neue', sans-serif;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ===================================
   BASE STYLES
   ================================== */

/* HTML & Body Reset */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: #334155;
  line-height: 1.7;
  font-size: 16px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #1e293b;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: #475569;
  margin-bottom: var(--space-sm);
}

h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Paragraphs */
p {
  margin-bottom: var(--space-md);
  color: #64748b;
  font-size: 1.1rem;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

a:hover {
  color: var(--secondary);
}

a:not(.btn):not(.nav-link):after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--secondary);
  transition: width var(--transition-normal);
}

a:not(.btn):not(.nav-link):hover:after {
  width: 100%;
}

/* Lists */
ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
  color: #64748b;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* ===================================
   LAYOUT COMPONENTS
   ================================== */

/* Container System */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ===================================
   SECTION STYLES
   ================================== */

/* Section Base */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-alt {
  background-color: var(--section-2);
}

.section-accent {
  background: linear-gradient(135deg, var(--section-3) 0%, var(--section-1) 100%);
  position: relative;
}

.section-accent:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--section-1) 0%, var(--section-3) 100%);
  position: relative;
  overflow: hidden;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, transparent 30%, rgba(30, 64, 175, 0.03) 50%, transparent 70%),
    linear-gradient(-45deg, transparent 30%, rgba(13, 148, 136, 0.03) 50%, transparent 70%);
  animation: hero-pattern 20s ease-in-out infinite;
}

@keyframes hero-pattern {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(20px) translateY(-20px); }
}

/* ===================================
   NAVIGATION
   ================================== */

.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30, 64, 175, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-link {
  color: #64748b;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background-color: rgba(30, 64, 175, 0.1);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* ===================================
   BUTTONS
   ================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
}

.btn:hover:before {
  left: 100%;
}

.btn-primary {
  background-color: var(--button);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: #d97706;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.btn-ghost:hover {
  background-color: rgba(30, 64, 175, 0.1);
  border-color: var(--primary);
}

/* ===================================
   CARDS
   ================================== */

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(30, 64, 175, 0.05);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(30, 64, 175, 0.1);
}

.card:hover:before {
  transform: scaleX(1);
}

.card-elevated {
  box-shadow: var(--shadow-lg);
}

.card-elevated:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
}

.card-minimal {
  background: transparent;
  border: 1px solid rgba(30, 64, 175, 0.1);
  box-shadow: none;
}

.card-minimal:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: white;
}

/* Card Components */
.card-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.card-text {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

/* ===================================
   FORMS
   ================================== */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  background-color: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-checkbox,
.form-radio {
  margin-right: var(--space-xs);
}

/* ===================================
   UTILITIES
   ================================== */

/* Spacing */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.p-0 { padding: 0; }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: #64748b; }
.text-white { color: white; }

/* Background Colors */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-light { background-color: var(--section-1); }
.bg-alt { background-color: var(--section-2); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Border Radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-pill { border-radius: var(--radius-pill); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ===================================
   SPECIAL COMPONENTS
   ================================== */

/* Hero Text Effect */
.hero-title {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(10deg); }
}

/* Tech Accent Lines */
.tech-line {
  position: relative;
  padding-left: var(--space-lg);
}

.tech-line:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* Stats Counter */
.stat-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

/* Floating Elements */
.floating {
  animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.floating-delayed {
  animation: floating 6s ease-in-out infinite;
  animation-delay: -3s;
}

/* ===================================
   FOOTER
   ================================== */

.footer {
  background-color: var(--footer-bg);
  color: white;
  padding: var(--space-3xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}

.footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: white;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: white;
}

.footer-text {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* ===================================
   RESPONSIVE DESIGN
   ================================== */

@media (max-width: 768px) {
  /* Typography Adjustments */
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  /* Spacing Adjustments */
  .section { padding: var(--space-2xl) 0; }
  
  /* Container Adjustments */
  .container,
  .container-wide,
  .container-narrow {
    padding: 0 var(--space-sm);
  }
  
  /* Grid Adjustments */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  /* Navigation */
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(30, 64, 175, 0.1);
    flex-direction: column;
    padding: var(--space-md);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  /* Card Adjustments */
  .card {
    padding: var(--space-md);
  }
  
  /* Button Adjustments */
  .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  /* Further mobile optimizations */
  :root {
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
  }
  
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .container,
  .container-wide,
  .container-narrow {
    padding: 0 var(--space-xs);
  }
}

/* ===================================
   ANIMATIONS & INTERACTIONS
   ================================== */

/* Scroll Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Hover States Enhancement */
.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===================================
   ACCESSIBILITY
   ================================== */

/* Focus Styles */
*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating,
  .floating-delayed {
    animation: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary: #000080;
    --secondary: #006400;
    --background: #ffffff;
  }
  
  .card {
    border: 2px solid #000;
  }
}

/* ===================================
   THAILAND/PHUKET SPECIFIC ELEMENTS
   ================================== */

/* Tropical Accent Elements */
.tropical-accent {
  position: relative;
}

.tropical-accent:after {
  content: '🌴';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.5rem;
  opacity: 0.3;
  animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* Ocean-inspired Gradients */
.ocean-gradient {
  background: linear-gradient(135deg, #0ea5e9 0%, #0d9488 50%, #1e40af 100%);
}

.ocean-gradient-subtle {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(13, 148, 136, 0.1) 50%, rgba(30, 64, 175, 0.1) 100%);
}

/* Thai Color Accent (Elephant Gray) */
.thai-accent {
  color: #6b7280;
  border-left: 4px solid #6b7280;
  padding-left: var(--space-md);
}

/* ===================================
   PRINT STYLES
   ================================== */

@media print {
  .nav,
  .btn,
  .mobile-menu-toggle {
    display: none;
  }
  
  .section {
    padding: var(--space-md) 0;
    break-inside: avoid;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  body {
    background: white;
    color: black;
  }
}


/* Cookie Banner Additional Styles for Tailwind */
.cookie-banner-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner-hover-effect:hover {
        transform: none;
    }
}