/* ========================================
   DESIGN SYSTEM - GolfSpaEscapes
   Luxury Golf & Spa Travel Blog
   ======================================== */

/* CSS Variables - Color System */
:root {
  /* Modern Luxury Color Palette */
  --background: 40 33% 98%;          /* Ivory white */
  --foreground: 220 20% 15%;         /* Rich charcoal */
  --card: 0 0% 100%;                 /* Pure white */
  --card-foreground: 220 20% 15%;
  --primary: 160 45% 35%;            /* Deep forest teal */
  --primary-foreground: 40 33% 98%;
  --secondary: 42 75% 55%;           /* Refined gold */
  --secondary-foreground: 220 20% 15%;
  --muted: 45 30% 90%;               /* Warm sand */
  --muted-foreground: 220 10% 45%;
  --accent: 43 50% 94%;              /* Champagne cream */
  --accent-foreground: 220 20% 15%;
  --border: 40 20% 88%;
  --radius: 1rem;
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
}

/* Form Input Placeholder Contrast */
input::placeholder,
textarea::placeholder {
  color: hsl(220 10% 50%);
  opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: hsl(220 10% 50%);
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: hsl(220 10% 50%);
  opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: hsl(220 10% 50%);
}

/* Ensure input text is dark for readability */
input,
textarea {
  color: hsl(220 20% 15%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Custom Utility Classes */
.hero-gradient {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.glass-effect {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid hsl(var(--border));
}

.text-gradient {
  background: linear-gradient(135deg, hsl(158, 64%, 52%), hsl(45, 93%, 47%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   HEADER - Sticky Glass Navigation
   ======================================== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.main-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.main-nav .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, hsl(160 45% 30%), hsl(42 75% 50%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav .logo i {
  font-size: 1.75rem;
  background: linear-gradient(135deg, hsl(160 45% 30%), hsl(42 75% 50%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-menu a {
  color: hsl(var(--foreground));
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.nav-menu a:hover {
  color: hsl(var(--secondary));
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background: linear-gradient(160deg, hsl(160 30% 97%) 0%, hsl(43 40% 95%) 50%, hsl(160 20% 96%) 100%);
  padding: 6rem 0 7rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(26, 77, 46, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 1.75rem;
  line-height: 1.15;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .text-gradient {
  display: inline-block;
  background: linear-gradient(135deg, hsl(160 45% 30%) 0%, hsl(42 75% 50%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.35rem;
  color: hsl(var(--muted-foreground));
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0 5rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
}

/* ========================================
   FEATURES SECTION (What You'll Find)
   ======================================== */
.features-section {
  padding: 4rem 0;
  background: white;
}

/* ========================================
   LATEST POSTS SECTION
   ======================================== */
.latest-posts {
  padding: 4rem 0;
  background: hsl(var(--card));
}

.latest-posts h2 {
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}

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

.post-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.post-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
  transform: translateY(-8px);
  border-color: hsl(42 75% 55% / 0.4);
}

.post-image-link {
  display: block;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--accent)) 100%);
  position: relative;
}

.post-image-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.post-card:hover .post-image-link::after {
  opacity: 1;
}

.post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-thumbnail {
  transform: scale(1.08);
}

.post-card h3 {
  margin: 1.75rem 1.75rem 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
}

.post-card h3 a {
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-card h3 a:hover {
  color: hsl(var(--primary));
}

.post-card p {
  color: hsl(var(--muted-foreground));
  margin: 0 1.75rem 1.75rem;
  line-height: 1.75;
  font-size: 0.95rem;
}

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

.read-more:hover {
  color: hsl(var(--secondary));
  gap: 0.75rem;
}

/* View All Destinations Link */
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 2.75rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, hsl(160 45% 30%) 0%, hsl(160 45% 38%) 100%);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(26, 77, 46, 0.2);
}

.view-all-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26, 77, 46, 0.25);
  background: linear-gradient(135deg, hsl(160 45% 35%) 0%, hsl(42 75% 50%) 100%);
}

.view-all-link:active {
  transform: translateY(-1px);
}

.view-all-link i:last-child {
  transition: transform 0.3s ease;
}

.view-all-link:hover i:last-child {
  transform: translateX(4px);
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.newsletter-section {
  background: linear-gradient(160deg, hsl(43 50% 96%) 0%, hsl(160 25% 95%) 100%);
  padding: 6rem 0;
  text-align: center;
  position: relative;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(42 75% 55% / 0.3), transparent);
}

.newsletter-container {
  max-width: 900px;
}

.newsletter-title {
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

.newsletter-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: hsl(var(--muted-foreground));
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.newsletter-embed {
  max-width: 100%;
  margin: 0 auto 2rem;
  background: white;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem;
  min-height: auto;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
}

.newsletter-embed iframe {
  width: 100% !important;
  max-width: 100%;
  margin: 0 auto;
  display: block;
  overflow: hidden !important;
}

.newsletter-image {
  max-width: 100%;
  margin: 0;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.newsletter-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: hsl(220 20% 12%);
  color: hsl(40 33% 95%);
  padding: 3.5rem 0;
  text-align: center;
  margin-top: 0;
}

footer p {
  margin-bottom: 0.75rem;
  opacity: 0.85;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

footer a {
  color: hsl(42 75% 60%);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: hsl(42 75% 75%);
}

/* ========================================
   ARTICLE / POST CONTENT STYLES
   ======================================== */
article {
  max-width: 850px;
  margin: 3rem auto;
  padding: 3rem 2rem;
  background: hsl(var(--card));
  border-radius: calc(var(--radius) + 4px);
}

article h1 {
  font-size: 2.8rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground)) !important;
  line-height: 1.3;
}

article h2 {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin: 3rem 0 1.5rem;
  color: hsl(var(--foreground)) !important;
}

article h3 {
  font-size: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: hsl(var(--primary)) !important;
}

article p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: hsl(var(--foreground)) !important;
}

article strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Force readable text colors - override any inline white text */
article h2[style*="color"],
article h2[style*="white"],
article p[style*="color"],
article p[style*="white"],
article span[style*="color"],
article span[style*="white"],
article div[style*="color: white"],
article div[style*="color:white"] {
  color: hsl(var(--foreground)) !important;
}

article *[style*="color: white"],
article *[style*="color:white"],
article *[style*="color: #fff"],
article *[style*="color:#fff"],
article *[style*="color: rgb(255"],
article *[style*="color:rgb(255"] {
  color: hsl(var(--foreground)) !important;
}

article ul, article ol {
  margin: 1.5rem 0 1.5rem 2rem;
}

article li {
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
}

article figcaption {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* Post Newsletter CTA */
.post-newsletter {
  background-color: hsl(160 45% 30%);
  background: linear-gradient(135deg, hsl(160 45% 30%) 0%, hsl(160 40% 35%) 100%);
  color: hsl(40 33% 98%);
  padding: 3rem;
  border-radius: var(--radius);
  margin: 3rem 0;
  text-align: center;
}

.post-newsletter h2 {
  color: hsl(40 33% 98%);
  margin-bottom: 1rem;
}

.post-newsletter p {
  margin-bottom: 2rem;
  opacity: 0.95;
  color: hsl(40 33% 98%);
}

/* ========================================
   TRENDING SIDEBAR WIDGET
   ======================================== */
.trending-widget {
  position: fixed;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 240px;
  max-height: 92vh;
  z-index: 40;
  display: none;
}

.trending-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  padding: 0.875rem;
  box-shadow: 0 10px 40px rgba(5, 150, 105, 0.15);
  max-height: 90vh;
  overflow-y: auto;
}

.trending-section {
  margin-bottom: 0.75rem;
}

.trending-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  color: hsl(var(--foreground));
}

.trending-title i {
  color: hsl(var(--secondary));
  margin-right: 0.5rem;
}

.trending-posts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  animation: fadeIn 0.5s ease-in;
}

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

.trending-item:hover {
  background: hsl(var(--accent));
}

.trending-badge {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.trending-badge.first {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.trending-badge.second {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.trending-badge.third {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.trending-info {
  flex: 1;
  min-width: 0;
}

.trending-info h4 {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  color: hsl(var(--foreground));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.trending-info p {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin: 0.25rem 0 0;
}

.ad-section {
  border-top: 1px solid hsl(var(--border));
  padding-top: 1rem;
  min-height: 100px;
}

/* Show on large screens only */
@media (min-width: 1280px) {
  .trending-widget {
    display: block;
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: hsl(var(--foreground));
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

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

  .hero p {
    font-size: 1.1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1002;
  }

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

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid hsl(40 20% 92%);
  }

  .nav-menu a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 500;
  }

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

  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
  }

  .features-section {
    padding: 1.5rem 0;
  }

  .latest-posts {
    padding: 1.5rem 0;
  }

  .latest-posts h2 {
    margin-bottom: 0.75rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  article {
    padding: 2rem 1.5rem;
  }

  article h1 {
    font-size: 2rem;
  }

  article h2 {
    font-size: 1.6rem;
  }

  .newsletter-title,
  .latest-posts h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .main-nav .logo {
    font-size: 1.1rem;
  }

  .main-nav .logo img {
    height: 2rem !important;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .newsletter-section {
    padding: 2rem 0;
  }

  .newsletter-container {
    padding: 0;
    max-width: 100%;
  }

  .newsletter-embed {
    padding: 1rem 0.25rem 0.25rem 0.25rem;
    margin: 0;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
  }
  
  .newsletter-embed iframe {
    height: 750px !important;
    border-radius: 0;
    width: 100% !important;
  }
  
  .newsletter-image {
    border-radius: 0;
  }
}
