/* ============================================
   ENERGYNSERV - Stylesheet Refatorado
   Mobile-first, sem position:absolute
   ============================================ */

/* Reset e Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Campo anti-spam oculto do Netlify */
.hidden {
  display: none !important;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo img {
  height: 50px;
  width: auto;
}

/* Menu Toggle (mobile) */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #2c3e50;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-nav.open {
  max-height: 400px;
}

.main-nav ul {
  list-style: none;
  padding: 1rem 0;
}

.main-nav li {
  text-align: center;
}

.main-nav a {
  display: block;
  padding: 0.875rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #f2980f;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('imagem-energynserv.jpg') center center no-repeat;
  background-size: cover;
  text-align: center;
  padding: 6rem 1rem 4rem;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(44, 62, 80, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #f2980f;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}

.hero-description {
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: #f2980f;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(242, 152, 15, 0.4);
}

.btn-primary:hover {
  background: #e08a0c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 152, 15, 0.5);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  position: relative;
}

.hero-scroll span::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

/* Swipe hint for mobile */
.swipe-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: swipeFadeIn 1s ease 1s both;
}

.swipe-hand {
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.9);
  animation: swipeHand 2s ease-in-out infinite;
}

.swipe-hand svg {
  width: 100%;
  height: 100%;
}

.swipe-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: swipeText 2s ease-in-out infinite;
}

@keyframes swipeHand {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(-5deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(8px) rotate(5deg);
  }
}

@keyframes swipeText {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes swipeFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Hide swipe hint on desktop, show scroll indicator */
@media (min-width: 769px) {
  .swipe-hint {
    display: none;
  }
  .hero-scroll {
    display: block;
  }
}

/* Hide scroll indicator on mobile, show swipe hint */
@media (max-width: 768px) {
  .hero-scroll {
    display: none;
  }
  .swipe-hint {
    display: flex;
  }
  .hero {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
    min-height: 100svh;
    height: auto;
  }
  .section-text {
    text-align: center;
  }
  .btn-secondary {
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0;
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 4rem 0;
}

.section-light {
  background: #fff;
}

.section-dark {
  background: #f8f9fa;
}

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: #f2980f;
  border-radius: 2px;
}

.section p {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: transparent;
  color: #f2980f;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid #f2980f;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #f2980f;
  color: #fff;
}

/* Section Grid */
.section-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-text {
  flex: 1;
}

.section-slider {
  flex: 1;
}

/* ============================================
   SLIDER
   ============================================ */
.slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  background: #2c3e50;
  height: 280px;
  width: 100%;
  max-width: 100%;
}

.slider-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  height: 100%;
  width: 100%;
}

.slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2c3e50;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

/* Slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s ease;
}

.slider-dot.active {
  background: #f2980f;
}

/* ============================================
   SERVICE LIST
   ============================================ */
.service-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.service-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #555;
  line-height: 1.6;
}

.service-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #f2980f;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.about-image {
  flex: 0 0 auto;
}

.about-image img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #f2980f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-text {
  flex: 1;
  text-align: center;
}

.about-text h2 {
  text-align: center;
}

.about-text h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #555;
  line-height: 1.5;
}

.feature-icon {
  color: #f2980f;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-header h2 {
  display: inline-block;
}

.contact-header h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact-header p {
  color: #777;
  font-size: 1rem;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Form */
.contact-form-wrapper {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #f2980f;
}

.form-group input::placeholder {
  color: #aaa;
}

.form-group button[type="submit"] {
  width: 100%;
  padding: 1rem;
  background: #f2980f;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.form-group button[type="submit"]:hover {
  background: #e08a0c;
}

.form-group button[type="submit"]:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.form-feedback {
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 0.5rem;
}

.form-feedback.success {
  background: #d4edda;
  color: #155724;
}

.form-feedback.error {
  background: #f8d7da;
  color: #721c24;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

.contact-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.contact-item span {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #2c3e50;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 1.5rem 1rem;
}

.footer p {
  font-size: 0.85rem;
  margin: 0;
}

/* ============================================
   WHATSAPP FLOAT
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}

.whatsapp-float > img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-float > img:hover {
  transform: scale(1.1);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7); }
}

/* WhatsApp Chat Window */
.whatsapp-chat {
  display: none;
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.whatsapp-chat.open {
  display: block;
  animation: chatSlideUp 0.3s ease;
}

@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #075e54;
  color: #fff;
  padding: 0.875rem 1rem;
}

.chat-header span {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-header button {
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
}

.chat-body {
  padding: 1rem;
  height: 220px;
  overflow-y: auto;
  background: #e5ddd5;
}

.chat-message {
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  max-width: 85%;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message.received {
  background: #fff;
  color: #333;
  align-self: flex-start;
}

.chat-message.sent {
  background: #dcf8c6;
  color: #333;
  margin-left: auto;
}

.chat-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f0f0f0;
}

.chat-footer input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.9rem;
  font-family: inherit;
}

.chat-footer input:focus {
  outline: none;
  border-color: #25d366;
}

.send-btn {
  padding: 0.5rem 1rem;
  background: #25d366;
  color: #fff;
  font-weight: 600;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}

.send-btn:hover {
  background: #1da851;
}

/* ============================================
   TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }

  .section {
    padding: 5rem 0;
  }

  .slider {
    height: 240px;
  }

  .contact-grid {
    flex-direction: row;
    align-items: flex-start;
  }

  .contact-form-wrapper {
    flex: 1.2;
  }

  .contact-info {
    flex: 0.8;
  }

  .about-grid {
    flex-direction: row;
    text-align: left;
  }

  .about-text {
    text-align: left;
  }

  .about-text h2::after {
    left: 0;
    transform: none;
  }

  .about-image img {
    width: 260px;
    height: 260px;
  }

  .about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ============================================
   DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .header-container {
    padding: 0 2rem;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .main-nav ul {
    display: flex;
    gap: 0.5rem;
    padding: 0;
  }

  .main-nav a {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .section-grid {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }

  .section-grid-reverse {
    flex-direction: row-reverse;
  }

  .section-text {
    flex: 0.45;
  }

  .section-slider {
    flex: 0.55;
  }

  .slider {
    height: 380px;
  }

  .about-grid {
    gap: 4rem;
  }

  .about-image img {
    width: 300px;
    height: 300px;
  }

  .whatsapp-float > img {
    width: 70px;
    height: 70px;
  }
}

/* ============================================
   LARGE DESKTOP (1400px+)
   ============================================ */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .slider {
    height: 440px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.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;
}
