/*
Theme Name: Solar Energy
Description: A modern, reusable WordPress theme for solar energy information and resources. Features Tailwind CSS styling, interactive calculators, and comprehensive solar content.
Author: Solar Guide Team
Version: 1.0.0
Tags: solar, energy, renewable, calculator, responsive, tailwind
Text Domain: solar-energy
*/

/* Solar Energy - Custom CSS */

/* Base styles and utilities */
:root {
  --primary-blue: #2563eb;
  --primary-green: #059669;
  --accent-yellow: #f59e0b;
  --text-gray: #374151;
  --light-gray: #f9fafb;
  --border-gray: #e5e7eb;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Custom gradient backgrounds */
.gradient-bg-1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Enhanced card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

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

/* Custom button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

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

/* Enhanced form styles */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 8px;
  font-size: 14px;
}

/* Calculator result animations */
.calculator-result {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.calculator-result.show {
  opacity: 1;
  transform: translateY(0);
}

/* Chart container styles */
.chart-container {
  position: relative;
  height: 400px;
  margin: 20px 0;
}

.chart-container canvas {
  max-height: 400px !important;
}

/* Progress bars */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-gray);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-blue) 100%);
  border-radius: 4px;
  transition: width 1s ease;
}

/* Notification styles */
.notification {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.notification i {
  margin-right: 12px;
  font-size: 18px;
}

.notification-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

.notification-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.notification-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.notification-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

/* Timeline styles */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-gray);
}

.timeline-item {
  position: relative;
  padding-bottom: 30px;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -22px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-blue);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-blue);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item.completed:before {
  background: var(--primary-green);
  box-shadow: 0 0 0 2px var(--primary-green);
}

/* Comparison table styles */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-gray);
}

.comparison-table th {
  background: var(--light-gray);
  font-weight: 600;
  color: var(--text-gray);
}

.comparison-table tr:hover {
  background: #f8fafc;
}

.comparison-table .best-value {
  background: #ecfdf5;
  color: var(--primary-green);
  font-weight: 600;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {

  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.2rem !important;
  }
  
  .grid-responsive {
    grid-template-columns: 1fr !important;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .comparison-table {
    font-size: 14px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 12px 8px;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  
  .shadow-lg,
  .shadow {
    box-shadow: none !important;
  }
  
  .bg-gradient-to-r,
  .bg-gradient-to-br {
    background: #f8f9fa !important;
    color: black !important;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
.focus\:outline-custom:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-blue-50 {
    background: #e0e7ff !important;
  }
  
  .bg-green-50 {
    background: #dcfce7 !important;
  }
  
  .text-gray-600 {
    color: #000000 !important;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--border-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-gray);
  border-top: 2px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Tooltip styles */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 8px;
}

.tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
  margin-bottom: 2px;
  z-index: 1000;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Image optimization */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-image.loaded {
  opacity: 1;
}

/* Price highlight */
.price-highlight {
  position: relative;
}

.price-highlight::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-yellow), transparent);
  z-index: -1;
}

/* Interactive elements */
.interactive-hover {
  transition: all 0.2s ease;
}

.interactive-hover:hover {
  transform: scale(1.02);
}

.interactive-hover:active {
  transform: scale(0.98);
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-gray: #f3f4f6;
    --light-gray: #1f2937;
    --border-gray: #374151;
  }
}

/* WordPress specific styles */
.alignleft {
  float: left;
  margin: 0 20px 20px 0;
}

.alignright {
  float: right;
  margin: 0 0 20px 20px;
}

.aligncenter {
  display: block;
  margin: 20px auto;
}

.alignwide {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Admin bar compatibility */
.admin-bar {
  margin-top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar {
    margin-top: 46px;
  }
}

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Navigation states */
.current_page_item a,
.current-menu-item a {
  color: var(--primary-blue) !important;
  font-weight: 600;
}