:root {
  /* Color Palette */
  --primary-color: #00AEEF;
  /* Solar Blue */
  --secondary-color: #FFC107;
  /* Sun Yellow */
  --accent-color: #FF9800;
  /* Orange */
  --text-dark: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --light-bg: #f5f9fc;
  --dark-bg: #1a202c;

  /* Typography */
  --font-main: 'Inter', sans-serif;

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
  height: auto;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Flex Utilities */
.flex {
  display: flex;
}

.flex-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--dark-bg);
  margin-bottom: var(--spacing-md);
}

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

/* Header */
.header {
  background-color: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo h2 {
  margin-bottom: 0;
  font-size: 1.8rem;
}

.nav a {
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s;
}

.nav a:hover {
  color: var(--primary-color);
}

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* Cards & Grid */
.product-card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.testimonial {
  transition: transform 0.3s;
}

.testimonial:hover {
  transform: translateY(-5px);
}

/* Utilities */
.text-center {
  text-align: center;
}

/* Authentication Pages */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.auth-card {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-header h2 {
  margin-bottom: 10px;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: var(--font-main);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.auth-form input.error {
  border-color: #e74c3c;
}

.error-message {
  display: block;
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
  min-height: 20px;
}

.checkbox-group {
  margin-top: 10px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
}

.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  display: none;
}

.form-message.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.auth-submit {
  margin-top: 10px;
  font-size: 1.1rem;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-benefits {
  padding: 30px;
}

.auth-benefits h3 {
  color: var(--dark-bg);
}

.auth-benefits li strong {
  display: block;
  margin-bottom: 3px;
}

/* User Menu in Navigation */
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.user-avatar {
  width: 35px;
  height: 35px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Dashboard Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.welcome-card {
  grid-column: span 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), #0099d3);
  color: white;
}

.welcome-card h2 {
  color: white;
  margin-bottom: 10px;
}

.welcome-card p {
  opacity: 0.9;
  margin-bottom: 0;
}

.welcome-icon {
  font-size: 5rem;
}

.stat-card {
  text-align: center;
}

.stat-card h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

.action-card {
  grid-column: span 1;
}

.action-buttons {
  display: flex;
  flex-direction: column;
}

.profile-card {
  grid-column: span 2;
}

.profile-info {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
}

.profile-field {
  padding: 10px;
  background: var(--light-bg);
  border-radius: 8px;
}

.profile-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 5px;
}

.profile-field span {
  font-weight: 500;
  color: var(--text-dark);
}

.activity-card {
  grid-column: span 2;
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

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

.activity-content {
  flex: 1;
}

.activity-content p {
  margin-bottom: 3px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: #0099d3;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--dark-bg);
}

.btn-secondary:hover {
  background-color: #e0ac06;
}

/* Responsive Design */

/* Tablet & Smaller (Max width 768px) */
@media (max-width: 768px) {

  /* Typography Scale Down */
  h1 {
    font-size: 2.5rem !important;
  }

  h2 {
    font-size: 2rem !important;
  }

  h3 {
    font-size: 1.5rem !important;
  }

  /* Navigation */
  .mobile-menu-btn {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    flex-direction: column;
  }

  .nav.show {
    max-height: 400px;
    /* Adjust based on content */
  }

  .nav ul {
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }

  .nav ul li {
    margin: 10px 0;
  }

  .nav ul li a {
    margin-left: 0 !important;
    /* Override inline styles */
    display: block;
    padding: 10px;
  }

  /* CTA in Header - Show on mobile but smaller */
  .header .cta {
    display: block;
    margin-left: auto;
    /* Push to right */
    margin-right: 15px;
  }

  .header .cta .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  /* Flex Layouts to Column */
  .flex-between {
    flex-direction: column;
  }

  .flex-between>div,
  .about-text,
  .about-image {
    width: 100%;
    margin-bottom: 20px;
  }

  /* Reset some specific overrides */
  .container.flex.flex-between.align-center {
    /* Keep header row horizontal */
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .header .logo h2 {
    font-size: 1.5rem;
  }

  .header .flex-between {
    flex-direction: row;
    /* Keep header items in row */
  }

  /* About Section Specifics */
  #about .container {
    flex-direction: column;
  }

  /* Services/Grid - Fix minmax for small screens */
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  }

  /* For very small devices, allow smaller grid items */
  @media (max-width: 350px) {
    .grid {
      grid-template-columns: 1fr !important;
    }
  }

  /* Why Solar */
  .flex-between {
    gap: 30px;
  }
}

/* Mobile (Max width 480px) */
@media (max-width: 480px) {
  h1 {
    font-size: 2rem !important;
  }

  .hero {
    padding: 80px 0 !important;
  }

  .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .hero-btns .btn {
    margin-right: 0 !important;
    width: 100%;
    text-align: center;
  }

  .container {
    width: 95%;
  }

  /* Service Items on Services Page */
  .service-item,
  .service-item.flex-reverse {
    flex-direction: column !important;
  }

  .service-img {
    height: 200px !important;
  }

  /* Fix Hero Padding */
  .section,
  .hero {
    padding: 60px 0 !important;
  }

  h1 {
    font-size: 2.2rem !important;
  }
}

/* Auth Pages Responsive */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
  }

  .auth-benefits {
    order: -1;
    text-align: center;
  }

  .auth-benefits ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .auth-benefits li {
    flex: 0 0 calc(50% - 10px);
  }

  .welcome-card {
    grid-column: span 1;
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .welcome-icon {
    font-size: 3rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .welcome-card,
  .profile-card,
  .activity-card {
    grid-column: span 1;
  }

  .profile-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-details {
    grid-template-columns: 1fr;
  }
}

/* Footer Styles */
.footer-distributed {
  background-color: var(--dark-bg);
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  width: 100%;
  text-align: left;
  font: bold 16px sans-serif;
  padding: 55px 50px;
  color: white;
  margin-top: auto;
}

.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right {
  display: inline-block;
  vertical-align: top;
}

/* Footer Left */
.footer-distributed .footer-left {
  width: 30%;
}

.footer-distributed h3 {
  color: #ffffff;
  font: normal 36px 'Inter', cursive;
  margin: 0;
}

.footer-distributed h3 span {
  color: var(--primary-color);
}

.footer-distributed .footer-links {
  color: #ffffff;
  margin: 20px 0 12px;
  padding: 0;
}

.footer-distributed .footer-links a {
  display: inline-block;
  line-height: 1.8;
  text-decoration: none;
  color: inherit;
  font-weight: 400;
  margin-right: 15px;
}

.footer-distributed .footer-company-name {
  color: #8f9296;
  font-size: 14px;
  font-weight: normal;
  margin: 0;
}

/* Footer Center */
.footer-distributed .footer-center {
  width: 35%;
}

.footer-distributed .footer-center i {
  background-color: #33383b;
  color: #ffffff;
  font-size: 25px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  text-align: center;
  line-height: 42px;
  margin: 10px 15px;
  vertical-align: middle;
}

.footer-distributed .footer-center i.fa-envelope {
  font-size: 17px;
  line-height: 38px;
}

.footer-distributed .footer-center p {
  display: inline-block;
  color: #ffffff;
  vertical-align: middle;
  margin: 0;
}

.footer-distributed .footer-center p span {
  display: block;
  font-weight: normal;
  font-size: 14px;
  line-height: 2;
}

.footer-distributed .footer-center p a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 400;
}

/* Footer Right */
.footer-distributed .footer-right {
  width: 30%;
}

.footer-distributed .footer-company-about {
  line-height: 20px;
  color: #92998e;
  font-size: 13px;
  font-weight: normal;
  margin: 0;
}

.footer-distributed .footer-company-about span {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-distributed .footer-icons {
  margin-top: 25px;
}

.footer-distributed .footer-icons a {
  display: inline-block;
  width: 35px;
  height: 35px;
  cursor: pointer;
  background-color: #33383b;
  border-radius: 2px;
  font-size: 20px;
  color: #ffffff;
  text-align: center;
  line-height: 35px;
  margin-right: 3px;
  margin-bottom: 5px;
}

/* Responsive Footer */
@media (max-width: 880px) {

  .footer-distributed {
    font: bold 14px sans-serif;
  }

  .footer-distributed .footer-left,
  .footer-distributed .footer-center,
  .footer-distributed .footer-right {
    display: block;
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
  }

  .footer-distributed .footer-center i {
    margin-left: 0;
  }

}