/* CSS Variables for Tetrad Color Scheme */
:root {
  /* Tetrad Color Palette */
  --primary-color: #3B82F6; /* Blue */
  --secondary-color: #F59E0B; /* Amber */
  --tertiary-color: #10B981; /* Emerald */
  --quaternary-color: #EF4444; /* Red */
  
  /* Supporting Colors */
  --primary-dark: #1E40AF;
  --secondary-dark: #D97706;
  --tertiary-dark: #059669;
  --quaternary-dark: #DC2626;
  
  /* Neutral Colors */
  --text-dark: #1F2937;
  --text-light: #6B7280;
  --text-white: #FFFFFF;
  --background-light: #F9FAFB;
  --background-dark: #111827;
  --border-color: #E5E7EB;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--quaternary-color));
  --gradient-overlay: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4));
  
  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Merriweather', serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: var(--spacing-sm);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Buttons */
.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::before, .button::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-normal);
}

.btn:hover::before, .button:hover::before {
  left: 100%;
}

.btn:hover, .button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn.is-primary, .button.is-primary {
  background: var(--gradient-primary);
  color: var(--text-white);
}

.btn.is-secondary, .button.is-secondary {
  background: var(--gradient-secondary);
  color: var(--text-white);
}

.btn.is-light, .button.is-light {
  background: var(--text-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn.is-light:hover, .button.is-light:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  z-index: 1000;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.navbar-item {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-dark);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.navbar-item:hover::after {
  width: 100%;
}

.navbar-item:hover {
  color: var(--primary-color);
}

.navbar-burger {
  color: var(--text-dark);
}

/* Hero Section */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.parallax-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .title {
  color: var(--text-white) !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  animation: fadeInUp 1s ease-out;
}

.hero .subtitle {
  color: var(--text-white) !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero p {
  color: var(--text-white) !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero .buttons {
  animation: fadeInUp 1s ease-out 0.9s both;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Fade In Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Sections */
.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section.has-background-light {
  background: var(--background-light);
}

/* Cards */
.card {
  background: var(--text-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.card-image {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card-content .title {
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.card-content p {
  color: var(--text-light);
  flex: 1;
}

/* Service Cards */
.service-card {
  border-top: 4px solid var(--primary-color);
}

.service-card:nth-child(2) {
  border-top-color: var(--secondary-color);
}

.service-card:nth-child(3) {
  border-top-color: var(--tertiary-color);
}

/* Testimonial Cards */
.testimonial-card {
  border-left: 4px solid var(--primary-color);
}

.testimonial-card .media {
  margin-top: var(--spacing-sm);
  justify-content: center;
}

/* Statistics Widgets */
.stat-widget {
  background: var(--text-white);
  padding: var(--spacing-md);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.stat-widget:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Progress Indicators */
.progress-section {
  background: var(--text-white);
  padding: var(--spacing-md);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
}

.progress-item {
  margin-bottom: var(--spacing-md);
}

.progress {
  height: 10px;
  border-radius: 5px;
  background: #E5E7EB;
  overflow: hidden;
}

.progress::-webkit-progress-bar {
  background: #E5E7EB;
  border-radius: 5px;
}

.progress::-webkit-progress-value {
  border-radius: 5px;
}

.progress.is-primary::-webkit-progress-value {
  background: var(--gradient-primary);
}

.progress.is-info::-webkit-progress-value {
  background: var(--gradient-secondary);
}

.progress.is-success::-webkit-progress-value {
  background: linear-gradient(90deg, var(--tertiary-color), var(--primary-color));
}

/* Accordion */
.accordion {
  background: var(--text-white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-item {
  border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: var(--spacing-md);
  cursor: pointer;
  background: var(--background-light);
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-header:hover {
  background: #F3F4F6;
}

.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: transform var(--transition-normal);
}

.accordion-item.is-active .accordion-header::after {
  transform: rotate(45deg);
}

.accordion-content {
  padding: 0 var(--spacing-md);
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.accordion-item.is-active .accordion-content {
  padding: var(--spacing-md);
  max-height: 500px;
}

.accordion-content ul {
  list-style: none;
  padding: 0;
}

.accordion-content li {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--border-color);
}

.accordion-content li:last-child {
  border-bottom: none;
}

.accordion-content a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.accordion-content a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: var(--text-white);
  text-align: center;
}

/* Contact Form */
.contact-form {
  background: var(--text-white);
  padding: var(--spacing-lg);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.field {
  margin-bottom: var(--spacing-md);
}

.label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  display: block;
}

.input, .textarea, .select select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-normal);
  background: var(--text-white);
}

.input:focus, .textarea:focus, .select select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--background-dark);
  color: var(--text-white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.footer .title {
  color: var(--text-white);
  margin-bottom: var(--spacing-sm);
}

.footer p {
  color: #9CA3AF;
  line-height: 1.6;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: var(--spacing-xs);
}

.footer a {
  color: #9CA3AF;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--text-white);
}

.social-links a {
  display: inline-block;
  padding: var(--spacing-xs);
  margin-right: var(--spacing-sm);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* Success Page */
.success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--text-white);
}

.success-content {
  text-align: center;
  max-width: 600px;
  padding: var(--spacing-lg);
}

.success-content .title {
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
}

.success-content p {
  color: var(--text-white);
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

/* Privacy and Terms Pages */
.legal-content {
  padding-top: 100px;
  min-height: calc(100vh - 100px);
}

.legal-content .container {
  max-width: 800px;
}

.legal-content h1 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.legal-content h2 {
  color: var(--primary-color);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.legal-content p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.legal-content ul {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.legal-content li {
  margin-bottom: var(--spacing-xs);
}

/* Image Containers */
.image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

/* Parallax Effects */
.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Read More Links */
.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-normal);
  position: relative;
}

.read-more::after {
  content: '→';
  margin-left: var(--spacing-xs);
  transition: transform var(--transition-normal);
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
  
  .parallax-bg {
    background-attachment: scroll;
  }
  
  .navbar-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .contact-form {
    padding: var(--spacing-md);
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .columns.is-multiline .column {
    margin-bottom: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .hero .title {
    font-size: 2rem;
  }
  
  .hero .subtitle {
    font-size: 1.25rem;
  }
  
  .buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .btn, .button {
    width: 100%;
  }
  
  .card-content {
    padding: var(--spacing-sm);
  }
  
  .contact-form {
    padding: var(--spacing-sm);
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* Focus States */
.btn:focus, .button:focus,
.input:focus, .textarea:focus,
.select select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --text-light: var(--text-dark);
    --border-color: var(--text-dark);
  }
  
  .card {
    border: 2px solid var(--text-dark);
  }
}