/* PowerCasa CL - Power Mesh Design System */

/* CSS Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #A7B0BD;
  background-color: #0B1220;
  overflow-x: hidden;
}

/* Power Mesh Background */
.power-mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0B1220 0%, #1A2230 100%);
}

.power-mesh-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(244, 197, 66, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 197, 66, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.energy-nodes {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.energy-node {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #F4C542;
  border-radius: 50%;
  box-shadow: 0 0 10px #F4C542, 0 0 20px rgba(244, 197, 66, 0.5);
  animation: pulse 3s ease-in-out infinite;
}

.energy-node:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.energy-node:nth-child(2) { top: 35%; left: 35%; animation-delay: 0.5s; }
.energy-node:nth-child(3) { top: 60%; left: 25%; animation-delay: 1s; }
.energy-node:nth-child(4) { top: 45%; left: 55%; animation-delay: 1.5s; }
.energy-node:nth-child(5) { top: 75%; left: 40%; animation-delay: 2s; }
.energy-node:nth-child(6) { top: 30%; left: 70%; animation-delay: 2.5s; }

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Typography Scale */
.text-xs { font-size: 1rem; }
.text-sm { font-size: 1.2rem; }
.text-base { font-size: 1.5rem; }
.text-lg { font-size: 2.25rem; }
.text-xl { font-size: 3.1rem; }

h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.3; margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.4; margin-bottom: 0.6rem; }
h4 { font-size: 1.5rem; line-height: 1.4; margin-bottom: 0.5rem; }

/* Layout Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: 24px;
}

.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)); }

/* Cards */
.card {
  background: #1A2230;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition: all 160ms ease;
  border: 1px solid rgba(244, 197, 66, 0.1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(244, 197, 66, 0.3);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(244, 197, 66, 0.1);
  transition: all 160ms ease;
}

.header.scrolled {
  background: rgba(11, 18, 32, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #F4C542;
  font-weight: 700;
  font-size: 1.5rem;
}

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

.nav-menu a {
  color: #A7B0BD;
  text-decoration: none;
  font-weight: 500;
  transition: color 160ms ease;
  position: relative;
}

.nav-menu a:hover {
  color: #F4C542;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #F4C542;
  transition: width 160ms ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #A7B0BD;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  background: linear-gradient(135deg, #F4C542 0%, #20C6B7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 160ms ease;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #F4C542 0%, #F4C542 100%);
  color: #0B1220;
  box-shadow: 0 8px 25px rgba(244, 197, 66, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(244, 197, 66, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #F4C542;
  border: 2px solid #F4C542;
}

.btn-secondary:hover {
  background: #F4C542;
  color: #0B1220;
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin: 60px 0;
}

.stat-item {
  text-align: center;
  padding: 24px;
  background: rgba(26, 34, 48, 0.5);
  border-radius: 16px;
  border: 1px solid rgba(244, 197, 66, 0.1);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #F4C542;
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.8;
}

/* Article Cards */
.article-card {
  background: #1A2230;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition: all 160ms ease;
  border: 1px solid rgba(244, 197, 66, 0.1);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(244, 197, 66, 0.3);
}

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

.article-content {
  padding: 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.article-badge {
  background: rgba(244, 197, 66, 0.2);
  color: #F4C542;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.article-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #F4C542;
}

.article-excerpt {
  color: #A7B0BD;
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-link {
  color: #20C6B7;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 160ms ease;
}

.article-link:hover {
  gap: 8px;
}

/* Icons */
.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Advantages Section */
.advantages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.advantage-item {
  text-align: center;
  padding: 32px 24px;
}

.advantage-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #F4C542 0%, #20C6B7 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(244, 197, 66, 0.3);
}

.advantage-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #F4C542;
}

.advantage-description {
  color: #A7B0BD;
  line-height: 1.6;
}

/* Reviews Section */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.review-card {
  background: rgba(26, 34, 48, 0.5);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(244, 197, 66, 0.1);
}

.review-content {
  font-style: italic;
  margin-bottom: 24px;
  line-height: 1.6;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F4C542 0%, #20C6B7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0B1220;
}

.review-info h4 {
  color: #F4C542;
  margin-bottom: 4px;
}

.review-location {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, rgba(244, 197, 66, 0.1) 0%, rgba(32, 198, 183, 0.1) 100%);
  border-radius: 20px;
  padding: 48px;
  text-align: center;
  border: 1px solid rgba(244, 197, 66, 0.2);
}

.newsletter-form {
  display: flex;
  gap: 16px;
  max-width: 400px;
  margin: 24px auto 0;
}

.newsletter-input {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid rgba(244, 197, 66, 0.3);
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.5);
  color: #A7B0BD;
  font-size: 1rem;
}

.newsletter-input:focus {
  outline: none;
  border-color: #F4C542;
  box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.1);
}

/* Footer */
.footer {
  background: #0A0F1A;
  border-top: 1px solid rgba(244, 197, 66, 0.1);
  padding: 60px 0 40px;
}

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

.footer-section h3 {
  color: #F4C542;
  margin-bottom: 24px;
}

.footer-section p, .footer-section a {
  color: #A7B0BD;
  text-decoration: none;
  line-height: 1.8;
}

.footer-section a:hover {
  color: #F4C542;
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(244, 197, 66, 0.1);
  opacity: 0.7;
}

/* Filter Chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-chip {
  padding: 8px 20px;
  background: rgba(26, 34, 48, 0.5);
  border: 1px solid rgba(244, 197, 66, 0.2);
  border-radius: 24px;
  color: #A7B0BD;
  text-decoration: none;
  transition: all 160ms ease;
  font-size: 0.9rem;
}

.filter-chip:hover, .filter-chip.active {
  background: rgba(244, 197, 66, 0.2);
  color: #F4C542;
  border-color: #F4C542;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #F4C542 0%, #20C6B7 100%);
  border: none;
  border-radius: 50%;
  color: #0B1220;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(244, 197, 66, 0.3);
  transition: all 160ms ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

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

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(244, 197, 66, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  
  .section {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 18, 32, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 32px;
    gap: 24px;
    border-top: 1px solid rgba(244, 197, 66, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 160ms ease;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero {
    min-height: 80vh;
    padding: 80px 0 60px;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 40px 0;
  }
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 600ms ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .power-mesh-grid {
    animation: none;
  }
  
  .energy-node {
    animation: none;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: #F4C542; }
.text-secondary { color: #20C6B7; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
