@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import './variables.css';

/* ─── Reset & Typography ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-inter);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.25;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
ul { list-style: none; }

/* ─── Utilities ─── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-title {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.section-title span {
  color: var(--yellow);
}
.section-subtitle {
  color: var(--gray-500);
  font-size: var(--text-base);
  margin-bottom: 3rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(47,128,193,0.10);
  color: var(--primary-light);
  border: 1px solid rgba(47,128,193,0.25);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.85rem;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 1rem;
}
.badge-yellow {
  background: rgba(245, 158, 11, 0.08);
  color: var(--yellow-dark);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-full); /* Pills for Greenaro look */
  font-family: var(--font-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
  border: 2px solid transparent;
  transition: var(--transition);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-accent {
  background: var(--yellow);
  color: var(--gray-900);
  border-color: var(--yellow);
}
.btn-accent:hover {
  background: var(--yellow-light);
  border-color: var(--yellow-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary-dark);
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-whatsapp {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  font-size: var(--text-base);
  padding: 0.9rem 2rem;
  border-radius: var(--radius-full);
}
.btn-whatsapp:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-sm { padding: 0.55rem 1.25rem; font-size: var(--text-xs); }
.btn-lg { padding: 0.95rem 2.25rem; font-size: var(--text-base); }

/* ─── Top Bar ─── */
#top-bar {
  background: var(--gray-900);
  color: var(--white);
  font-size: var(--text-xs);
  height: var(--top-bar-h);
  line-height: var(--top-bar-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}
.top-bar-contact {
  display: flex;
  gap: 1rem;
}
.top-bar-contact a {
  transition: var(--transition);
}
.top-bar-contact a:hover {
  color: var(--white);
}
.top-bar-contact .separator {
  color: rgba(255, 255, 255, 0.15);
}
.top-bar-hours {
  font-weight: 400;
}
@media (max-width: 768px) {
  #top-bar { display: none; }
}

/* ─── Navigation ─── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
}
.nav-logo img {
  height: 88px; /* Significantly larger logo */
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}
.nav-logo-text {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.nav-logo-text span { color: var(--yellow); }

/* Header Actions & Search Toggle */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-search-btn {
  background: rgba(31, 78, 121, 0.06);
  border: 1px solid rgba(31, 78, 121, 0.12);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: var(--transition);
}
.nav-search-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: scale(1.05);
}
.nav-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: rgba(241, 245, 249, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 0;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}
.nav-search-dropdown.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.nav-search-dropdown-form {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.5rem;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  transition: var(--transition);
}
.nav-search-dropdown-form:focus-within {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.nav-search-dropdown-form input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-inter);
  font-size: var(--text-base);
  color: var(--gray-800);
  width: 100%;
}
.nav-search-dropdown-form input::placeholder { color: var(--gray-400); }
.nav-search-dropdown-form button {
  border: none;
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  padding-left: 0.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.nav-search-dropdown-form button:hover {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  margin-right: 3.5rem;
}
.nav-links a {
  padding: 0.5rem 0;
  font-family: var(--font-secondary);
  font-weight: 700;
  color: var(--gray-700);
  transition: var(--transition);
  font-size: var(--text-sm);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}
.nav-links a.active::after {
  width: 100%;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

#navbar.nav-scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--gray-200);
}

/* ─── Mobile Nav ─── */
@media (max-width: 768px) {
  .nav-links, .nav-cta, .nav-search-form { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    margin: 0;
  }
  .nav-links.open a { padding: 0.75rem 1rem; }
  .nav-links.open a::after { display: none; }
}

/* ─── Footer ─── */
footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 5rem 0 2.5rem;
  border-top: 1px solid var(--gray-800);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-logo {
  display: inline-block;
  margin-bottom: 1.25rem;
}
.footer-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}
.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--white);
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--font-secondary);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a {
  font-size: var(--text-sm);
  transition: var(--transition);
  color: var(--white);
}
.footer-col ul li a:hover { color: var(--yellow-light); }
.footer-contact-item {
  display: block;
  font-size: var(--text-sm);
  margin-bottom: 1.25rem;
  color: var(--white);
  line-height: 1.6;
}
.footer-contact-item strong {
  display: block;
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
}
.footer-bottom a:hover { color: var(--yellow); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Toast Notifications ─── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: slideInRight 0.3s ease;
  max-width: 320px;
}
.toast-success { background: var(--green-dark); color: var(--white); }
.toast-error   { background: #dc2626; color: var(--white); }
.toast-info    { background: var(--primary); color: var(--white); }
@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(8, 24, 40, 0.95) 0%, rgba(16, 46, 76, 0.88) 60%, rgba(23, 65, 100, 0.82) 100%),
    url('../assets/images/solar_panels_bg.png') center center / cover no-repeat;
  background-attachment: fixed;
  color: var(--white);
  padding: 5.5rem 0 4.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(31, 78, 121, 0.4);
  position: relative;
  overflow: hidden;
}

/* Animated solar grid pattern overlay */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
  pointer-events: none;
}
/* Radial glow accent */
.page-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 160%;
  background: radial-gradient(ellipse at center top, rgba(245, 158, 11, 0.12) 0%, transparent 65%);
  pointer-events: none;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}

.page-hero > .container { position: relative; z-index: 2; }

/* Badge above title */
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--yellow-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 0.875rem;
  letter-spacing: -0.025em;
  color: var(--white);
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}
.page-hero h1 span {
  background: linear-gradient(135deg, var(--yellow) 0%, #fcd34d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero p {
  font-size: var(--text-lg);
  opacity: 0.85;
  font-weight: 400;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Glassmorphism breadcrumb */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: rgba(203, 213, 225, 0.9);
  margin-top: 1.25rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.4rem 1.25rem;
}
.breadcrumb a {
  color: rgba(203, 213, 225, 0.9);
  transition: var(--transition);
}
.breadcrumb a:hover { color: var(--yellow-light); }
.breadcrumb span {
  color: var(--white);
  font-weight: 600;
}

/* ─── Page Loading Overlay ─── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 24, 40, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.4s ease;
}
#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loader-text {
  color: rgba(255,255,255,0.85);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ─── Global Responsive ─── */
@media (max-width: 1024px) {
  .container { padding: 0 1.25rem; }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }

  /* Nav */
  .nav-links.open { z-index: 999; }

  /* Buttons */
  .btn-lg { padding: 0.875rem 1.5rem; font-size: var(--text-base); }

  /* Page hero */
  .page-hero { padding: 2.5rem 0 2rem; }
  .page-hero h1 { font-size: var(--text-3xl); }
  .page-hero p  { font-size: var(--text-base); }

  /* Section layout */
  .section-title { font-size: var(--text-3xl); }
  .section-subtitle { margin-left: 0; margin-right: 0; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  footer { padding: 3rem 0 1.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 0.875rem; }

  /* Buttons */
  .btn-lg { padding: 0.75rem 1.25rem; font-size: var(--text-sm); }

  /* Page hero */
  .page-hero h1 { font-size: var(--text-2xl); }

  /* Section */
  .section-title { font-size: var(--text-2xl); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; gap: 0.4rem; text-align: center; font-size: var(--text-xs); }
}
