/* Solar Flow Design System - SolarCasa CL */

/* Color Palette */
:root {
  --solar-yellow: #F4C542;
  --terracotta: #C96B6B;
  --sky-blue: #7EC8FF;
  --graphite: #1A2230;
  --soft-gray: #A7B0BD;
  
  /* Extended Palette */
  --white: #FFFFFF;
  --light-gray: #F8F9FA;
  --medium-gray: #6C757D;
  --dark-gray: #343A40;
  --success: #28A745;
  --warning: #FFC107;
  --danger: #DC3545;
  
  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius-base: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-card: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --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);
  --shadow-card: 0 12px 28px rgba(0, 0, 0, 0.22);
  
  /* Motion */
  --transition-fast: 160ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 220ms ease;
  
  /* Layout */
  --container-max-width: 1200px;
  --grid-columns: 12;
  --grid-gap: 1.5rem;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--graphite);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Animated Solar Background */
.solar-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.03;
  background: linear-gradient(135deg, var(--solar-yellow) 0%, var(--sky-blue) 50%, var(--terracotta) 100%);
  background-size: 400% 400%;
  animation: solarFlow 15s ease-in-out infinite;
}

@keyframes solarFlow {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 50% 100%; }
  75% { background-position: 50% 0%; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--graphite);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--medium-gray);
}

a {
  color: var(--sky-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--terracotta);
}

/* Container and Grid System */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gap);
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.flex-1 { flex: 1; }

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-base);
  border-bottom: 1px solid rgba(26, 34, 48, 0.1);
}

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.logo {
  display: flex;
  align-items: center;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--graphite);
}

.logo-icon {
  width: 32px;
  height: 32px;
  margin-right: var(--space-3);
  fill: var(--solar-yellow);
}

/* Navigation */
.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-8);
}

.nav-link {
  color: var(--graphite);
  font-weight: 500;
  position: relative;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--solar-yellow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--solar-yellow);
  transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-menu-line {
  width: 24px;
  height: 2px;
  background: var(--graphite);
  margin: 2px 0;
  transition: var(--transition-fast);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}

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

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--solar-yellow) 0%, var(--sky-blue) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="200" r="100" fill="rgba(255,255,255,0.1)"/><circle cx="800" cy="300" r="150" fill="rgba(255,255,255,0.05)"/><circle cx="500" cy="700" r="120" fill="rgba(255,255,255,0.08)"/></svg>');
  animation: float 20s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
}

.hero-title {
  font-size: var(--text-6xl);
  margin-bottom: var(--space-6);
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-card);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-base);
  font-size: var(--text-base);
  min-height: 48px;
}

.btn-primary {
  background: var(--solar-yellow);
  color: var(--graphite);
}

.btn-primary:hover {
  background: #f0b73a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--graphite);
}

.btn-outline {
  background: transparent;
  color: var(--sky-blue);
  border: 2px solid var(--sky-blue);
}

.btn-outline:hover {
  background: var(--sky-blue);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition-base);
  border: 1px solid rgba(26, 34, 48, 0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--graphite);
}

.card-text {
  color: var(--medium-gray);
  margin-bottom: var(--space-4);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--soft-gray);
}

/* Sections */
.section {
  padding: var(--space-24) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  color: var(--graphite);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--medium-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Stats Section */
.stats {
  background: var(--graphite);
  color: var(--white);
}

.stat-item {
  text-align: center;
  padding: var(--space-6);
}

.stat-number {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--solar-yellow);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
  border: 1px solid rgba(26, 34, 48, 0.05);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  fill: var(--solar-yellow);
}

.category-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--graphite);
}

.category-description {
  color: var(--medium-gray);
  margin-bottom: var(--space-6);
}

/* Advantages Section */
.advantages {
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

.advantage-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.advantage-icon {
  width: 48px;
  height: 48px;
  fill: var(--terracotta);
  flex-shrink: 0;
}

.advantage-content h3 {
  color: var(--graphite);
  margin-bottom: var(--space-2);
}

.advantage-content p {
  color: var(--medium-gray);
}

/* Reviews Section */
.reviews {
  background: var(--sky-blue);
  color: var(--white);
}

.review-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.review-stars {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.review-star {
  width: 20px;
  height: 20px;
  fill: var(--solar-yellow);
}

.review-text {
  font-style: italic;
  margin-bottom: var(--space-6);
  color: rgba(255, 255, 255, 0.9);
}

.review-author {
  font-weight: 600;
  color: var(--white);
}

.review-location {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

/* Newsletter Section */
.newsletter {
  background: var(--graphite);
  color: var(--white);
  text-align: center;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: var(--space-4);
}

.newsletter-input {
  flex: 1;
  padding: var(--space-4);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
}

.newsletter-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.3);
}

/* Footer */
.footer {
  background: var(--graphite);
  color: var(--white);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-section h3 {
  color: var(--solar-yellow);
  margin-bottom: var(--space-4);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--space-2);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--solar-yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-8);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 50px;
  height: 50px;
  background: var(--solar-yellow);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #f0b73a;
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: var(--graphite);
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --container-max-width: 960px;
  }
  
  .hero-title {
    font-size: var(--text-5xl);
  }
}

@media (max-width: 768px) {
  :root {
    --grid-gap: 1rem;
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
  }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  .nav-list {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .section {
    padding: var(--space-16) 0;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .col-6, .col-8, .col-9 {
    grid-column: span 12;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
  
  .stat-number {
    font-size: var(--text-4xl);
  }
  
  .card-content {
    padding: var(--space-4);
  }
  
  .category-card {
    padding: var(--space-6);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-reveal {
    transition: none;
  }
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--solar-yellow);
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus {
  outline: 2px solid var(--solar-yellow);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .mobile-menu,
  .back-to-top,
  .newsletter {
    display: none !important;
  }
  
  .section {
    page-break-inside: avoid;
  }
}