/* ====================================================================
   NECC CORPORATION - Production Stylesheet
   - Authentic BeTheme Layout & Typography
   - Excel Tabs System for Home Page Services
   - Mobile-First Responsive Optimization (Zero Squishing, Stacking Layouts)
   - Interactive Mobile Navigation & Accordion Dropdown
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
  --necc-green: #38662B;
  --necc-green-hover: #2e5323;
  --necc-dark: #2c2b2b;
  --necc-gray: #4b4b4b;
  --necc-bg: #ffffff;
  --site-width: 1200px;
}

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

body {
  font-family: 'Alegreya Sans', Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--necc-gray);
  background-color: var(--necc-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--necc-green);
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CONTAINER COM MARGENS LATERAIS SEGURAS */
.container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* 1. TOP BAR / ACTION BAR */
#Action_bar {
  background-color: #2c2c2c;
  padding: 8px 0;
  font-size: 14px;
}

#Action_bar .container {
  display: flex;
  justify-content: flex-end;
}

.contact_details {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.contact_details li {
  color: #a8a8a8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact_details a {
  color: #cccccc;
}

.contact_details a:hover {
  color: #ffffff;
}

/* 2. HEADER */
#Top_bar {
  background-color: #ffffff;
  border-bottom: 1px solid #eeeeee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 85px;
  position: relative;
}

.logo img {
  max-height: 60px;
  width: auto;
}

#menu > ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 4px;
}

#menu > ul > li {
  position: relative;
}

#menu > ul > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 18px;
  font-size: 16px;
  font-weight: 500;
  color: #000000;
  border-radius: 4px;
  transition: all 0.2s;
}

#menu > ul > li > a:hover,
#menu > ul > li.current-menu-item > a {
  background-color: var(--necc-green);
  color: #ffffff;
}

/* Indicador de Submenu (Seta) */
.submenu-arrow {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.25s ease;
  margin-left: 4px;
}

#menu li.submenu.open .submenu-arrow {
  transform: rotate(180deg);
}

/* Dropdown no Desktop */
#menu li.submenu:hover .sub-menu {
  display: block;
}

#menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 270px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border-top: 3px solid var(--necc-green);
  list-style: none;
  padding: 8px 0;
  z-index: 999;
  border-radius: 0 0 4px 4px;
}

#menu .sub-menu li a {
  display: block;
  padding: 11px 20px;
  font-size: 15px;
  color: #333333;
  border-bottom: 1px solid #f2f2f2;
}

#menu .sub-menu li:last-child a {
  border-bottom: none;
}

#menu .sub-menu li a:hover {
  background-color: #f7f9f7;
  color: var(--necc-green);
  padding-left: 24px;
}

.responsive-menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 12px;
  color: var(--necc-green);
  cursor: pointer;
  line-height: 1;
}

/* 3. HERO BANNER COM PRÉDIO COMERCIAL */
.hero-commercial-building {
  position: relative;
  width: 100%;
  min-height: 480px;
  background-image: url('../images/necccorp-new-slider.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.hero-commercial-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 60px 0;
  width: 100%;
}

.hero-commercial-logo {
  flex: 0 0 340px;
}

.hero-commercial-logo img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.45));
}

.hero-commercial-text {
  flex: 1;
}

.hero-commercial-text h2 {
  font-size: 42px;
  line-height: 1.15;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 3px 12px rgba(0,0,0,0.7);
  letter-spacing: -0.5px;
}

.hero-commercial-text .green-line {
  color: #5bb33b;
  display: inline-block;
}

/* 4. SISTEMA DE ABAS ESTILO EXCEL (HOME SERVICES TABS) */
.home-tabs-section {
  padding: 50px 0 70px;
  background-color: #ffffff;
}

.be-tabs-wrapper {
  width: 100%;
}

/* Barra de Abas - 100% da largura do box e proporcional */
.be-tabs-nav {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  gap: 6px;
  border-bottom: none;
  margin-bottom: 35px;
  padding: 0;
}

.be-tabs-nav li {
  width: 100%;
  margin-bottom: 0;
}

.be-tabs-nav li a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 12px 6px;
  color: var(--necc-green);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  background-color: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  min-height: 64px;
}

.be-tabs-nav li a:hover {
  background-color: #edf5eb;
  color: var(--necc-green-hover);
  border-color: #bfdcba;
}

.be-tabs-nav li.active a {
  background-color: #ffffff;
  color: var(--necc-green);
  border: 1px solid var(--necc-green);
  border-top: 3px solid var(--necc-green);
  box-shadow: 0 3px 10px rgba(56, 102, 43, 0.12);
}

/* Painéis de Conteúdo das Abas */
.be-tab-pane {
  display: none;
  animation: fadeInTab 0.3s ease;
}

.be-tab-pane.active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Conteúdo da Aba 1: Banner "We are NECC" */
.tab-we-are-necc-content a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.tab-we-are-necc-content img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}

.tab-we-are-necc-content a:hover img {
  transform: scale(1.01);
}

/* Grade de Conteúdo dos Serviços nas Abas */
.tab-service-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 45px;
  align-items: center;
  padding: 10px 0;
}

.tab-service-text h3 {
  font-size: 30px;
  font-weight: 700;
  color: var(--necc-green);
  margin-bottom: 18px;
  line-height: 1.25;
}

.tab-service-text p {
  font-size: 17px;
  color: #4b4b4b;
  line-height: 1.65;
  margin-bottom: 25px;
}

.tab-btn-wrapper {
  margin-top: 15px;
}

.tab-service-image {
  text-align: center;
}

.tab-service-image img {
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  margin: 0 auto;
}

/* Botão Stroke Estilo BeTheme */
.button-stroke-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--necc-green);
  border: 2px solid var(--necc-green);
  border-radius: 3px;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.button-stroke-custom:hover {
  background-color: var(--necc-green);
  color: #ffffff !important;
}

/* 5. RODAPÉ REPLICA OFICIAL */
#Footer {
  background-color: #222222;
  color: #ffffff;
  padding: 50px 0 40px;
  font-size: 15px;
  border-top: 4px solid var(--necc-green);
}

.footer-grid-replica {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 30px;
}

.footer-replica-logo img {
  max-width: 140px;
  height: auto;
}

.footer-replica-center {
  text-align: center;
  color: #cccccc;
  line-height: 1.6;
}

.footer-replica-center a {
  color: var(--necc-green);
  font-weight: 600;
}

.footer-replica-center a:hover {
  text-decoration: underline;
  color: #ffffff;
}

.footer-replica-address {
  text-align: right;
  color: #cccccc;
  line-height: 1.6;
}

.footer-replica-address a {
  color: #ffffff;
}

.footer-replica-address a:hover {
  text-decoration: underline;
}

/* Botão Flutuante Back to top */
.btn-back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 42px;
  height: 42px;
  background: #ffffff;
  color: #333333;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 999;
}

.btn-back-to-top:hover {
  background: var(--necc-green);
  color: #ffffff;
}

/* 6. ESTILOS DAS PÁGINAS INTERNAS (SUBPAGES) */
.subheader-dark {
  background-color: #4a4a4a;
  background-image: url('../images/header-services.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 90px 0 50px;
  text-align: left;
  position: relative;
}

.subheader-dark h2 {
  font-size: 40px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  margin-bottom: 12px;
}

.subheader-dark .sep {
  width: 80px;
  height: 3px;
  background-color: var(--necc-green);
}

.service-content-wrapper {
  padding: 60px 0;
}

.service-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 45px;
  align-items: start;
  margin-bottom: 50px;
}

.service-badge-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.service-badge-title .color-block {
  width: 22px;
  height: 22px;
  background-color: #94846c;
  display: inline-block;
  flex-shrink: 0;
}

.service-badge-title h3 {
  font-size: 32px;
  font-weight: 700;
  color: #222222;
  margin: 0;
}

.solutions-wrapper-box {
  background: #fbfbfb;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  padding: 40px;
  margin-top: 35px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.list_check {
  list-style: none;
  padding-left: 0;
}

.list_check li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 16px;
  color: #444444;
  line-height: 1.5;
}

.list_check li::before {
  content: '✔';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--necc-green);
  font-weight: bold;
  font-size: 15px;
}

.content-two-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 25px;
  align-items: start;
}

/* ====================================================================
   7. OTIMIZAÇÃO RESPONSIVA MOBILE (REGRAS ESTRITAS)
   - Margens laterais garantidas (sem colar nas bordas do aparelho)
   - Layout 100% empilhado (Texto ACIMA ou ABAIXO da imagem, NUNCA 50/50)
   - Logo e textos do rodapé perfeitamente centralizados
   - Menu mobile fluido com dropdown de serviços funcional
   ==================================================================== */

@media (max-width: 991px) {
  .hero-commercial-inner {
    flex-direction: column;
    text-align: center;
    gap: 25px;
    padding: 50px 0;
  }
  .hero-commercial-logo {
    flex: 0 0 auto;
  }
  .hero-commercial-logo img {
    margin: 0 auto;
    max-width: 260px;
  }
  .hero-commercial-text h2 {
    font-size: 32px;
  }
}

@media (max-width: 860px) {
  /* NUNCA DIVIDIDO MEIO A MEIO NO CELULAR / TABLET */
  .tab-service-grid,
  .service-intro-grid,
  .content-two-columns-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* Texto ocupa 100% da largura no topo */
  .tab-service-text,
  .service-intro-grid > div:first-child,
  .content-two-columns-grid > div:first-child {
    width: 100% !important;
    order: 1 !important;
  }

  /* Imagem ocupa 100% da largura abaixo do texto, centralizada */
  .tab-service-image,
  .service-intro-grid > div:last-child,
  .content-two-columns-grid > div:last-child {
    width: 100% !important;
    order: 2 !important;
    text-align: center !important;
  }

  .tab-service-image img,
  .service-intro-grid img,
  .content-two-columns-grid img {
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* Alinhamento de botões */
  .tab-btn-wrapper {
    text-align: center;
  }
  .button-stroke-custom {
    display: inline-flex;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  /* Margens laterais no celular para nada grudar na tela */
  .container {
    padding: 0 20px;
  }

  /* Top bar action contatos empilhados/compactos */
  #Action_bar .container {
    justify-content: center;
  }
  .contact_details {
    justify-content: center;
    gap: 12px;
    font-size: 13px;
  }

  /* Menu Hamburguer */
  .responsive-menu-toggle {
    display: block;
  }

  #menu > ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    padding: 10px 0;
    z-index: 1001;
  }

  #menu > ul.open {
    display: flex;
  }

  #menu > ul > li {
    width: 100%;
  }

  #menu > ul > li > a {
    padding: 12px 24px;
    border-radius: 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 17px;
    justify-content: space-between;
  }

  /* Dropdown de Serviços no Mobile */
  #menu .sub-menu {
    display: none;
    position: static;
    box-shadow: none;
    border-top: none;
    background: #f7f9f7;
    width: 100%;
    padding: 0;
    border-radius: 0;
  }

  #menu li.submenu.open .sub-menu {
    display: block;
  }

  #menu .sub-menu li a {
    padding: 12px 20px 12px 36px;
    border-bottom: 1px solid #eef2ee;
    font-size: 15px;
    color: #444444;
  }

  #menu .sub-menu li a:hover {
    background-color: #ebf3ea;
    color: var(--necc-green);
  }

  /* Navegação de Abas no Mobile: Scroll horizontal amigável */
  .be-tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-bottom: none;
  }

  .be-tabs-nav li {
    flex: 0 0 auto;
    width: auto;
  }

  .be-tabs-nav li a {
    font-size: 14px;
    padding: 10px 14px;
    min-height: auto;
    border-radius: 4px;
    white-space: normal;
  }

  .tab-service-text h3 {
    font-size: 24px;
  }

  .tab-service-text p {
    font-size: 16px;
  }

  .solutions-wrapper-box {
    padding: 24px 20px;
  }

  .subheader-dark {
    padding: 60px 0 40px;
  }

  .subheader-dark h2 {
    font-size: 28px;
  }

  /* RODAPÉ NO MOBILE: LOGO CENTRALIZADA, TEXTOS CENTRALIZADOS */
  .footer-grid-replica {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .footer-replica-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .footer-replica-logo img {
    margin: 0 auto;
  }

  .footer-replica-center {
    text-align: center;
  }

  .footer-replica-address {
    text-align: center;
  }
}
