/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

:root{
  --brand:#4fb173;
  --bg:#0e1013;
  --panel:#1a1d24;
  --panel-2:#181b22;
  --text:#f0f0f0;
  --muted:#cfcfcf;
}

/* Base */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background: var(--panel);
  padding: 1rem;
  border-right: 1px solid #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar__logo {
  width: 120px;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  width: 100%;
  padding: 0 1rem;
}

.sidebar__nav a {
  color: #ccc;
  text-decoration: none;
  padding: .5rem;
  border-radius: 6px;
  transition: .25s ease;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
  background: var(--brand);
  color: #fff;
  transform: translateX(4px);
}

/* Botón menú móvil */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: .5rem .8rem;
  border-radius: 6px;
  z-index: 101;
  cursor: pointer;
}

/* Contenido */
main {
  margin-left: 300px;
  padding: 2rem;
}

body.index main {
  margin-left: 0;
  padding: 0;
}
.hero {
  position: relative;
  height: 100vh;     
  width: 100vw;       
  display: flex;
  align-items: center; 
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  padding: 0;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 90%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(0.95);           
  opacity: 0;
  animation: fadeIn 2.2s ease forwards;
  z-index: 0;
}


@keyframes fadeIn { from {opacity:0} to {opacity:1} }

.hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1;
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__copy h1 {
  font-size: 2.5rem;
  margin-bottom: .8rem;
}

.hero__copy p {
  font-size: 1.1rem;
  color: #e2e2e2;
}

/* Encabezados de página */
.page-header {
  text-align: center;
  margin-top: 2rem;
}

.page-header h1,
.page-header h2 {
  color: var(--brand);
  margin-bottom: .6rem;
}

.page-header p {
  color: #ccc;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ======= Servicios (cards) ======= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--panel-2);
  padding: 1.4rem 1.2rem;
  border-radius: 12px;
  text-align: center;
  transition: transform .25s ease, background .25s ease;
}

.card:hover {
  background: #232631;
  transform: translateY(-4px);
}

/* Tamaño CONTROLADO de fotos de servicios */
.card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: .8rem;
  border-radius: 6px;
}

/* Tipografía de servicios */
.card h3 {
  font-size: 1.15rem;
  margin-bottom: .45rem;
  color: #fff;
}

.card p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

/* ======= Productos ======= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.product {
  background: var(--panel-2);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  transition: transform .25s ease, background .25s ease;
}

.product:hover {
  background: #232631;
  transform: translateY(-4px);
}

/* Tamaño CONTROLADO de fotos de productos */
.product img {
  width: 100%;
  max-width: 160px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto .6rem;
  display: block;
}

.product h4 {
  color: #fff;
  margin-bottom: .3rem;
  font-size: 1.05rem;
}

.product p {
  color: var(--brand);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal--in {
  opacity: 1;
  transform: translateY(0);
}
.contact p {
  margin-bottom: 3rem;  
  font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle { display: block; }

  .sidebar { transform: translateX(-100%); }

  .sidebar.active { transform: translateX(0); }

  main {
    margin-left: 0;
    padding: 1rem;
  }

  .hero__copy h1 { font-size: 2rem; }
}
