/* ThaiDateApp Website Styles */
* { 
  box-sizing: border-box; 
}

:root {
  --primary: #ff1744;
  --primary-dark: #c4001d;
  --secondary: #ffd54f;
  --accent: #ff6090;
  --bg: #fef5f7;
  --text: #2c2c2c;
  --text-light: #666;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(255,23,68,0.15);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Thai', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Navigation */
.main-nav {
  background: var(--white);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 2.2rem;
  height: 2.2rem;
  animation: pulse 2s infinite;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.app-cta {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.app-cta:hover {
  transform: translateY(-2px);
  color: white;
}

/* Page Content */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 60vh;
}

/* Hero Section */
.hero {
  padding: 4rem 1rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-content {
  text-align: left;
}

.hero-image {
  text-align: center;
}

.hero-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
  animation: float 6s ease-in-out infinite;
}

.launch-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--text);
  margin: 0 0 1.5rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* Content Headers */
.content-header {
  margin-bottom: 3rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 20px;
  animation: fadeInUp 0.6s ease-out;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}

.header-content {
  text-align: left;
}

.header-image {
  text-align: center;
}

.header-img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  border: 3px solid rgba(255,255,255,0.3);
}

.content-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0 0 1rem;
  font-weight: 900;
}

.content-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.article-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeInUp 0.8s ease-out both;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

.article-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.article-card:nth-child(odd) .article-icon {
  animation-delay: 0.5s;
}

.article-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  text-decoration: underline;
  transform: translateX(5px);
}

/* Article Content */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.6s ease-out;
}

.article-content h1 {
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-content h2 {
  font-size: 2rem;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.article-content h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 2rem 0 1rem;
}

.article-content h4 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

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

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #fff5f7;
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

/* Content Boxes */
.tip-box {
  background: #f0f9ff;
  border: 2px solid #0ea5e9;
  border-radius: 15px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.tip-box h4 {
  color: #0ea5e9;
  margin: 0 0 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-box {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: 15px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.warning-box h4 {
  color: #ef4444;
  margin: 0 0 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success-box {
  background: #f0fdf4;
  border: 2px solid #22c55e;
  border-radius: 15px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.success-box h4 {
  color: #22c55e;
  margin: 0 0 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Email Form */
.email-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 30px;
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 0 auto 3rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.form-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input[type="email"] {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 2px solid #f0f0f0;
  border-radius: 30px;
  outline: none;
  transition: all 0.3s ease;
}

input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,23,68,0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: white;
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

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

/* Sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin-top: 2rem;
}

.sidebar {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 120px;
}

.sidebar h3 {
  margin: 0 0 1rem;
  color: var(--primary);
  font-size: 1.3rem;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.sidebar-links li {
  margin-bottom: 0.75rem;
}

.sidebar-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: block;
  padding: 0.5rem 0;
}

.sidebar-links a:hover {
  color: var(--primary);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

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

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  font-weight: 700;
}

tbody tr:hover {
  background: #f9f9f9;
}

/* Ad Spaces */
.ad-space {
  background: #f5f5f5;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
  color: #666;
  font-weight: 600;
}

.ad-space-sidebar {
  background: #f5f5f5;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  margin: 2rem 0;
  color: #666;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.ad-space-small {
  background: #f5f5f5;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
  color: #666;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Success Stories */
.story-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.story-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.story-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.story-info h4 {
  margin: 0;
  color: var(--text);
  font-size: 1.3rem;
}

.story-meta {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Footer */
footer {
  background: var(--text);
  color: white;
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }
  
  .page-content {
    overflow-x: hidden;
    width: 100%;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
  
  .content-header {
    padding: 2rem 1rem;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .header-content {
    text-align: center;
    order: 2;
  }
  
  .header-image {
    order: 1;
  }
  
  .content-header h1 {
    font-size: 2rem;
  }
  
  .article-content {
    padding: 2rem 1rem;
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .btn-primary {
    width: 100%;
  }
  
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding: 2rem 1rem;
  }
  
  .hero-content {
    text-align: center;
    order: 2;
  }
  
  .hero-image {
    order: 1;
  }
  
  .hero-img {
    max-width: 100%;
    height: auto;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .article-card {
    padding: 1.5rem;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  * {
    max-width: 100vw;
  }
  
  .page-content {
    padding: 1rem 0.5rem;
  }
  
  .article-content {
    padding: 1.5rem 1rem;
  }
  
  .content-header {
    padding: 1.5rem 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  input[type="email"] {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .email-form {
    padding: 1.5rem;
    margin: 0 1rem 2rem;
  }
  
  .article-content h1 {
    font-size: 1.8rem;
  }
  
  .article-content h2 {
    font-size: 1.5rem;
  }
  
  .article-content h3 {
    font-size: 1.3rem;
  }
  
  .article-content p {
    font-size: 1rem;
  }
}

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  border-top: 3px solid var(--primary);
  z-index: 1000;
  animation: slideInUp 0.5s ease-out;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.cookie-text h4 {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.cookie-text p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.4;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  border-radius: 25px;
  font-weight: 600;
  white-space: nowrap;
}

.cookie-link {
  color: var(--primary);
  text-decoration: underline;
  font-size: 0.9rem;
  white-space: nowrap;
}

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

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Mobile Cookie Notice */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  .main-nav, .sidebar, .ad-space, .ad-space-sidebar, .ad-space-small, footer {
    display: none;
  }
  
  .page-content {
    max-width: none;
    padding: 0;
  }
  
  .article-content {
    box-shadow: none;
    padding: 0;
  }
}