/* =========================================================
   MESAR ENERGY — Modern Website
   ========================================================= */

:root {
  /* Brand colors (from original site) */
  --primary: #0081ff;
  --secondary: #82d10c;
  --accent-green: #61d60e;
  --dark: #0d1b2a;
  --dark-2: #16283f;
  --text: #4a5568;
  --heading: #1a202c;
  --light: #f7fafc;
  --white: #ffffff;
  --border: #e2e8f0;

  /* Typography */
  --font-body: 'Open Sans', system-ui, sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-alt: 'Poppins', sans-serif;

  /* Layout */
  --container: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.12);

  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: .5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-alt);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(0,129,255,.3);
}
.btn-primary:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(130,209,12,.35);
}

.btn-light {
  background: var(--white);
  color: var(--dark);
}
.btn-light:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-2px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--primary);
}
.link-arrow i { transition: transform var(--transition); }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- Eyebrow / Labels ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-alt);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: .75rem;
}
.eyebrow.green { color: var(--accent-green); }

.text-green { color: var(--accent-green); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.site-header.scrolled {
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo { display: flex; align-items: center; background: #33333382; padding: 8px; border-radius: 16px;}
.logo img { max-height: 52px; width: auto; }
.logo-fallback {
  display: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--dark);
}
.logo-fallback span { color: var(--secondary); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.main-nav a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-alt);
  font-weight: 500;
  font-size: .92rem;
  color: var(--heading);
  border-radius: var(--radius-sm);
  position: relative;
}
.main-nav a:hover,
.main-nav a.active { color: var(--primary); }

.has-dropdown { position: relative; }
.has-dropdown > a i { font-size: .7rem; margin-left: 4px; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  flex-direction: column !important;
  gap: 0 !important;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  padding: 10px 14px;
  font-size: .88rem;
  font-weight: 400;
}
.dropdown a:hover {
  background: var(--light);
  color: var(--primary);
}

.btn-nav {
  background: var(--primary);
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: var(--radius-pill) !important;
}
.btn-nav:hover { background: var(--secondary); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  margin-top: 0;
}

.hero-slider { position: relative; width: 100%; height: 100%; }

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--dark);
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 6s ease;
  display: flex;
  align-items: center;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(13,27,42,.85) 0%, rgba(13,27,42,.5) 55%, rgba(0,129,255,.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-alt);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1rem;
  padding: 6px 16px;
  border: 1px solid rgba(130,209,12,.5);
  border-radius: var(--radius-pill);
  background: rgba(130,209,12,.08);
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 4px 30px rgba(0,0,0,.3);
}
.hero-content p {
  font-size: 1.15rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 2rem;
  max-width: 560px;
}

/* Animation on active slide */
.hero-slide.active .hero-eyebrow,
.hero-slide.active h1,
.hero-slide.active p,
.hero-slide.active .btn {
  animation: heroIn .8s ease backwards;
}
.hero-slide.active h1 { animation-delay: .15s; }
.hero-slide.active p  { animation-delay: .3s; }
.hero-slide.active .btn { animation-delay: .45s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 5;
}
.dot {
  width: 42px;
  height: 4px;
  border: none;
  background: rgba(255,255,255,.4);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
}
.dot.active { background: var(--secondary); width: 60px; }

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: var(--light); }

.services-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  align-items: start;
}

.services-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(130,209,12,.3);
}

.service-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,129,255,.1), rgba(130,209,12,.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.75rem;
  color: var(--primary);
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
}
.service-icon img { max-width: 40px; }

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: .75rem;
  min-height: 2.4em;
}
.service-card p { font-size: .9rem; flex-grow: 1; }

.services-intro h2 { margin-bottom: 1rem; }
.services-intro p { margin-bottom: 1.75rem; }

/* =========================================================
   TESTIMONIAL
   ========================================================= */
.testimonial-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.testimonial-section::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,129,255,.25), transparent 70%);
  border-radius: 50%;
}

.testimonial {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  color: var(--white);
  position: relative;
  z-index: 2;
}
.quote-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  opacity: .8;
}
.testimonial > p {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--white);
  margin-bottom: 2rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.testimonial-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary);
}
.testimonial-author strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--white);
}
.testimonial-author span {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
}

/* =========================================================
   FEATURES
   ========================================================= */
.features-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.features-content h2 { margin-bottom: 1.25rem; }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 2.5rem;
}
.feature-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(130,209,12,.12);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: var(--transition);
}
.feature-item:hover .feature-icon {
  background: var(--secondary);
  color: var(--white);
  transform: scale(1.08) rotate(-4deg);
}
.feature-item h4 { font-size: 1rem; margin: 0; }
.feature-item p { font-size: .85rem; margin: 0; }

.features-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.features-image.img-fallback {
  min-height: 380px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.features-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.features-image:hover img { transform: scale(1.05); }

/* =========================================================
   OFFER ZONE
   ========================================================= */
.offer-zone { background: var(--light); }

.section-header { text-align: center; margin-bottom: 2rem; }

.offer-banner {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.offer-banner:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.offer-banner img { width: 100%; }

.offer-fallback {
  display: none;
  min-height: 220px;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: var(--white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.offer-fallback h3 { color: var(--white); font-size: 1.75rem; }
.offer-fallback p { margin-bottom: 1.5rem; }

/* =========================================================
   CONTACT CTA
   ========================================================= */
.contact-cta {
  background: linear-gradient(120deg, var(--primary), #0066cc);
  color: var(--white);
  padding: 70px 0;
}
.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.contact-inner h2 { color: var(--white); margin-bottom: .5rem; }
.contact-inner p { color: rgba(255,255,255,.85); margin: 0; max-width: 520px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 80px 0 0;
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 60px;
}
.footer-logo { margin-bottom: 1rem; }
.footer-logo .logo-fallback { color: var(--white); }
.footer-logo img { max-height: 46px; }

.footer-desc { margin-bottom: 1.5rem; line-height: 1.7; }

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .6rem; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-col a:hover { color: var(--secondary); padding-left: 4px; }

.hours { font-size: .9rem; line-height: 1.8; }
.hours strong { color: var(--white); }

.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: var(--transition);
}
.socials a:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom i { color: var(--secondary); }

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-4px);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .services-layout { grid-template-columns: 1fr; gap: 40px; }
  .features-layout { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 70px 0; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 80px; left: 0; right: 0;
    background: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { max-height: 520px; overflow-y: auto; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
  }
  .main-nav a { padding: 14px 16px; }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--light);
    max-height: 0;
    overflow: hidden;
    padding: 0 8px;
  }
  .has-dropdown.open .dropdown { max-height: 400px; padding: 8px; }

  .hero { min-height: 560px; }
  .hero-content h1 { font-size: 2rem; }

  .feature-grid { grid-template-columns: 1fr; }
  .contact-inner { flex-direction: column; text-align: center; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .services-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .back-to-top { bottom: 20px; right: 20px; }
  .hero-dots { bottom: 24px; }
}