/*=========================
   SERVITEC PMÁ – MAIN CSS
   Corporativo + Técnico Industrial
=========================*/

/* ========= TIPOGRAFÍA ========= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root{
   --morado:#5b2c83;
   --dorado:#d4af37;
   --verde:#1e7f43;
   --negro:#111111;
   --rojo:#a4161a;
   --blanco:#ffffff;
   --gris:#f4f6f8;
}

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

html{
  scroll-behavior:smooth;
  overflow-x:hidden;
}

body{
  font-family:'Montserrat',sans-serif;
  background:linear-gradient(135deg,var(--negro),var(--morado));
  color:#f2f2f2;
  transition:.4s;
}

/* ========= DARK MODE ========= */
body.dark{
  background:#0c0c0c;
  color:#ffffff;
}

/* ========= HEADER ========= */
header{
  padding:60px 8%;
  background:rgba(0,0,0,0.65);
  border-bottom:4px solid var(--dorado);
  display:flex;
  align-items:center;
  justify-content: center;
  gap:25px;
}

header img{
  width:80px;
}

header h1{
  font-size:2rem;
  color:var(--dorado);
  font-weight:700;
}

header p{
  opacity:.85;
  font-weight:300;
}

/* ========= NAV ========= */
nav{
  display:flex;
  justify-content:center;
  gap:35px;
  padding:16px 0;
  background:rgba(0,0,0,0.75);
}

nav a{
  color:#ffffff;
  text-decoration:none;
  font-weight:600;
  position:relative;
  transition:.3s;
}

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

/* ========= SECCIONES ========= */
section{
  max-width:1100px;
  margin:80px auto;
  padding:0 20px;
  text-align:center;
}

section h2{
  font-size:1.8rem;
  margin-bottom:25px;
  color:var(--dorado);
  padding-left:15px;
}

/* ========= BOX / CARDS ========= */
.box{
  background:rgba(0,0,0,0.6);
  border-radius:18px;
  padding:45px;
  margin-bottom:35px;
  box-shadow:0 12px 30px rgba(0,0,0,.45);
  line-height:1.8;
}

body.dark .box{
  background:#151515;
}

/* ========= GRID ========= */
.grid{
  display:grid;
  gap:30px;
}

.grid-2{
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
}

/* ========= PILARES / SERVICIOS ========= */
.pilar{
  background:rgba(255,255,255,0.05);
  border:1px solid var(--dorado);
  border-radius:16px;
  padding:30px;
  text-align:center;
  transition:.3s;
}

.pilar:hover{
  transform:translateY(-5px);
  box-shadow:0 10px 25px rgba(0,0,0,.6);
}

.pilar h3{
  color:var(--verde);
  margin-bottom:12px;
}

/* ========= BOTONES ========= */
.btn{
  display:inline-block;
  padding:14px 32px;
  background:var(--dorado);
  color:var(--negro);
  text-decoration:none;
  border-radius:40px;
  font-weight:600;
  transition:.3s;
}

.btn:hover{
  transform:translateY(-2px);
  filter:brightness(1.05);
}

.btn-outline{
  border:2px solid var(--dorado);
  color:var(--dorado);
  background:transparent;
}

/* BOTÓN TEMA FIJO */
.theme-btn{
  position:fixed;
  top:20px;
  left:20px;
  z-index:1100;
  font-size:1.6rem;
  cursor:pointer;
}

/* ========= HERO ========= */
.hero{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:0 20px;
}

.hero-content{
  max-width:800px;
}

.hero h1{
  font-size:2.8rem;
  margin-bottom:20px;
}

.hero h1{
  font-size:2.5rem;
  color:var(--dorado);
}

.hero p{
  margin-top:20px;
  max-width:700px;
  margin-left:auto;
  margin-right:auto;
  opacity:.9;
}

/* ========= FOOTER ========= */
footer{
  text-align:center;
  padding:40px 20px;
  background:rgba(0,0,0,0.85);
  font-size:.9rem;
  border-top:3px solid var(--verde);
}

/* ========= MENU LATERAL ========= */
.menu{
  position:fixed;
  inset:0;
  width:100%;
  height:100dvh;
  background:linear-gradient(135deg,var(--negro),var(--morado));
  padding:80px 30px;
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .35s ease;
  z-index:1000;
  overflow-y:auto;
}

.menu.open{
  transform:translateX(0);
}

.menu.open{
  right:0;
}

/* BOTÓN MENÚ FIJO */
.menu-btn{
  position:fixed;
  top:20px;
  right:20px;
  z-index:1200;
  font-size:1.8rem;
  cursor:pointer;
  color:#fff;
}

/* BLOQUEO DE SCROLL SOLO EN MÓVIL */
@media(max-width:1023px){
  body.menu-open{
    overflow:hidden;
    height:100dvh;
    touch-action:none;
  }
}

/* OCULTAR BOTONES CUANDO EL MENÚ ESTÁ ABIERTO */
body.menu-open .menu-btn,
body.menu-open .theme-btn{
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
}

.menu a{
  display:block;
  color:#fff;
  text-decoration:none;
  margin:20px 0;
  font-weight:500;
}

.submenu-toggle{
  color:#fff;
  font-weight:600;
  cursor:pointer;
  margin:18px 0;
}

.menu-btn,
.theme-btn{
  transition:opacity .3s ease;
}

/* ========= ANIMACIONES ========= */
.fade{
  opacity:0;
  transform:translateY(40px);
  transition:all .8s ease;
}

.fade.show{
  opacity:1;
  transform:none;
}

/* =========================
   FORMULARIO SOLICITUD
========================= */
.solicitud-box{
  max-width:520px;
  margin:0 auto;
  background:#f9f9f6;
  padding:40px;
  border-radius:18px;

  display:flex;
  flex-direction:column;
  gap:16px;
}

/* inputs */
.solicitud-box input,
.solicitud-box textarea,
.solicitud-box select{
   margin-top:5px;
   margin-bottom:15px;
   padding:14px 18px;
   border-radius:10px;
   border:1px solid #bbb;
   background:#fff;
   color:#000;
   font-size:1rem;
   width:100%;
   transition:0.2s;
}

/* focus */
.solicitud-box input:focus,
.solicitud-box textarea:focus,
.solicitud-box select:focus{
   outline:none;
   border:1px solid #0077ff;
   box-shadow:0 0 5px rgba(0,119,255,0.4);
}

/* SELECT estilo moderno */
.solicitud-box select{
   cursor:pointer;
   appearance:none;
   -webkit-appearance:none;
   -moz-appearance:none;
   background-image:url("data:image/svg+xml;utf8,<svg fill='black' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
   background-repeat:no-repeat;
   background-position:right 10px center;
   background-size:16px;
   padding-right:35px;
}

.dark .solicitud-box select{
   background-image:url("data:image/svg+xml;utf8,<svg fill='white' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
}

/* labels */
.solicitud-box label{
  font-weight:600;
  color:#333;
}

/* small */
.solicitud-box small{
   font-size: smaller;
   font-weight:600;
   color:#3333;
}

/* botón */
.solicitud-box button{
  padding:14px;
  border-radius:30px;
  border:none;
  cursor:pointer;
  font-size:1rem;
  background:var(--dorado);
  color:#111;
  font-weight:600;
}

.solicitud-box textarea{
  min-height:120px;
  resize:vertical;
}

/* =========================
   ADMIN TABLA
========================= */
table{
  width:100%;
  border-collapse:collapse;
  color:white;
}

thead{
  background:rgba(0,0,0,.7);
}

th,td{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.1);
  text-align:left;
}

tr:hover{
  background:rgba(255,255,255,.05);
}

#tabla td, #tabla th{
  padding:10px;
  border-bottom:1px solid #ddd;
}

#tabla tr:hover{
  background:#f5f5f5;
}

/* ===== ESTADOS PANEL ===== */

.estado-select{
  padding:6px 10px;
  border-radius:6px;
  border:1px solid #ccc;
  font-weight:bold;
}

/* pendiente */
.estado-pendiente{
  background:#fff3cd;
  color:#856404;
  border-color:#ffeeba;
}

/* contactado */
.estado-contactado{
  background:#cce5ff;
  color:#004085;
  border-color:#b8daff;
}

/* hecho */
.estado-hecho{
  background:#d4edda;
  color:#155724;
  border-color:#c3e6cb;
}

/* =========================
   MENSAJES DEL SISTEMA
========================= */
#msgBox{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
}

.msg{
  padding:16px 22px;
  border-radius:12px;
  font-weight:600;
  color:#fff;
  min-width:260px;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,.6);
  animation:msgPop .25s ease;
}

.msg.ok{
  background:#1e7f43;
}

.msg.error{
  background:#a4161a;
}

.msg.info{
  background:#5b2c83;
}

@keyframes msgPop{
  from{
    opacity:0;
    transform:scale(-9);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}

/* ========= RESPONSIVE ========= */
@media(min-width:1024px){

  .menu{
    width:380px;
    height:100vh;
    inset:auto 0 0 auto;   /* solo derecha */
    top:0;
    right:0;
    transform:translateX(100%);
    box-shadow:-10px 0 40px rgba(0,0,0,.6);
  }

  .menu.open{
    transform:translateX(0);
  }

}

@media(max-width:768px){

  header{
    flex-direction:column;
    text-align:center;
  }

  nav{
    flex-wrap:wrap;
    gap:20px;
  }

  .hero{
    padding:80px 20px;
  }

  section{
    margin:50px auto;
  }

  .box{
    padding:28px;
  }

}
