/* ========================================
   ELEGANT & MINIMAL DESIGN SYSTEM
   ======================================== */

:root {
  /* Core Color Palette */
  --color-primary: #8FBC8F;
  --color-secondary: #F5F5DC;
  --color-background: #FAFAFA;
  --color-footer: #2F4F2F;
  --color-button: #8FBC8F;
  
  /* Section Background Colors */
  --color-section-white: #FFFFFF;
  --color-section-cream: #F5F5DC;
  --color-section-light-green: #E8F5E8;
  --color-section-light-gray: #FAFAFA;
  
  /* Text Colors */
  --color-text-primary: #2C2C2C;
  --color-text-secondary: #5A5A5A;
  --color-text-muted: #8A8A8A;
  --color-text-light: #FFFFFF;
  
  /* Typography Scale */
  --font-heading: 'Playfair Display', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing System */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  --space-section: 5rem;
  
  /* Border Radius */
  --radius-small: 8px;
  --radius-pill: 9999px;
  --radius-large: 16px;
  
  /* Shadows */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.12);
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  font-feature-settings: 'liga' 1, 'kern' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY SYSTEM
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: var(--space-sm);
}

h5 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

h6 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  max-width: 65ch;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
  transition: var(--transition-fast);
}

a:hover {
  color: #6B8E6B;
}

a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Underlined link style for elegant minimal approach */
a.link-underline {
  position: relative;
}

a.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-fast);
}

a.link-underline:hover::after {
  transform: scaleX(1);
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ========================================
   SECTION VARIATIONS
   ======================================== */

.section {
  padding: var(--space-section) 0;
}

.section-white {
  background-color: var(--color-section-white);
}

.section-cream {
  background-color: var(--color-section-cream);
}

.section-light-green {
  background-color: var(--color-section-light-green);
}

.section-light-gray {
  background-color: var(--color-section-light-gray);
}

.section-minimal {
  padding: var(--space-xxl) 0;
}

.section-spacious {
  padding: calc(var(--space-section) * 1.5) 0;
}

/* ========================================
   TYPOGRAPHY ENHANCEMENTS
   ======================================== */

.lead-text {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  font-weight: 300;
}

.small-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.text-light {
  color: var(--color-text-light);
}

.text-primary {
  color: var(--color-primary);
}

.text-secondary {
  color: var(--color-text-secondary);
}

/* ========================================
   BUTTON SYSTEM
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-button);
  color: white;
}

.btn-primary:hover {
  background-color: #6B8E6B;
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-subtle);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ========================================
   CARD COMPONENTS
   ======================================== */

.card {
  background-color: var(--color-section-white);
  border-radius: var(--radius-large);
  padding: var(--space-lg);
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
  border: 1px solid rgba(143, 188, 143, 0.1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.card-elevated {
  box-shadow: var(--shadow-medium);
}

.card-minimal {
  border: none;
  box-shadow: none;
  background-color: transparent;
}

.card-cream {
  background-color: var(--color-section-cream);
  border: none;
  box-shadow: var(--shadow-subtle);
}

.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-title {
  margin-bottom: var(--space-sm);
}

.card-body {
  flex: 1;
  margin-bottom: var(--space-md);
}

.card-footer {
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-section-white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-small);
  transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(143, 188, 143, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   UTILITY COMPONENTS
   ======================================== */

.spacer-sm {
  height: var(--space-sm);
}

.spacer-md {
  height: var(--space-md);
}

.spacer-lg {
  height: var(--space-lg);
}

.spacer-xl {
  height: var(--space-xl);
}

.divider {
  width: 100%;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: var(--space-lg) 0;
}

.divider-light {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   NAVIGATION COMPONENTS
   ======================================== */

.nav {
  display: flex;
  align-items: center;
  padding: var(--space-sm) 0;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text-primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin-left: auto;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 400;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link.active {
  color: var(--color-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

/* ========================================
   HEADER STYLES
   ======================================== */

.header {
  background-color: var(--color-section-white);
  box-shadow: var(--shadow-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-transparent {
  background-color: transparent;
  box-shadow: none;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.footer {
  background-color: var(--color-footer);
  color: var(--color-text-light);
  padding: var(--space-xxl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h5 {
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ========================================
   HERO SECTIONS
   ======================================== */

.hero {
  padding: var(--space-xxl) 0;
  text-align: center;
}

.hero-cream {
  background-color: var(--color-section-cream);
}

.hero-light-green {
  background-color: var(--color-section-light-green);
}

.hero-title {
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  margin-top: var(--space-lg);
}

/* ========================================
   GRID SYSTEMS
   ======================================== */

.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));
}

.grid-spacious {
  gap: var(--space-xl);
}

/* ========================================
   IMAGES & MEDIA
   ======================================== */

.img-responsive {
  width: 100%;
  height: auto;
  border-radius: var(--radius-small);
}

.img-rounded {
  border-radius: var(--radius-large);
}

.img-circle {
  border-radius: 50%;
}

/* ========================================
   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);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  :root {
    --space-section: 3rem;
    --space-xxl: 3rem;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: var(--space-xl) 0;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
}

@media (max-width: 480px) {
  .card {
    padding: var(--space-md);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
  }
}

/* ========================================
   FOCUS STATES FOR ACCESSIBILITY
   ======================================== */

*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus,
a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .btn,
  .nav,
  .footer {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
    background: white;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ========================================
   ALPENHINE.JS COMPATIBILITY
   ======================================== */

/* Ensure smooth transitions for Alpine.js state changes */
[x-cloak] {
  display: none !important;
}

[x-show],
[x-if] {
  transition: var(--transition-smooth);
}

/* Custom Alpine.js transition classes */
.fade-enter {
  opacity: 0;
}

.fade-enter-active {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.fade-leave {
  opacity: 1;
}

.fade-leave-active {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slide-enter {
  transform: translateY(-10px);
  opacity: 0;
}

.slide-enter-active {
  transform: translateY(0);
  opacity: 1;
  transition: all 0.3s ease;
}

/* ========================================
   CUSTOM COMPONENTS
   ======================================== */

/* Feature list with elegant styling */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding-left: var(--space-lg);
  position: relative;
  margin-bottom: var(--space-sm);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.1em;
}

/* Quote styling */
.quote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-text-secondary);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-primary);
  background-color: rgba(143, 188, 143, 0.05);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.quote-author {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  font-style: normal;
}

/* Stats component */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* 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;
    }
}