/* =========================================================
   M&M Tech — Clean Stylesheet
   - Removed duplicates/overlaps
   - Kept final choices currently used on your site
   Fecha 12/30/2025
   ========================================================= */

/* ---------- Variables ---------- */
:root{
  --bg:#0b1220;
  --panel:#0f1930;
  --card:#101c36;
  --text:#e8eefc;
  --muted:#b7c2de;
  --line: rgba(255,255,255,.10);
  --accent:#5eead4;
  --accent2:#60a5fa;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;

  /* Section tone (gris plomo) */
  --plomo:#0f131c;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(96,165,250,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(94,234,212,.14), transparent 60%),
    var(--bg);
  line-height:1.55;
}
a{ color:inherit; text-decoration:none; }
.container{ max-width:1100px; margin:0 auto; padding:0 18px; }
.muted{ color:var(--muted); }

/* ---------- Header / Nav ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background: var(--plomo);
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.header-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:700;
}
.brand-mark{
  width:14px; height:14px; border-radius:50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:inline-block;
}
.brand-name{ letter-spacing:.2px; }

.nav{
  display:flex;
  gap:18px;
  align-items:center;
}
.nav a{ opacity:.9; }
.nav a:hover{ opacity:1; }

.nav-toggle{
  display:none;
  width:44px; height:40px;
  border:1px solid var(--line);
  background:transparent;
  border-radius:12px;
  gap:5px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
}
.nav-toggle span{
  width:20px; height:2px;
  background:var(--text);
  opacity:.85;
  border-radius:2px;
}

/* ---------- Buttons ---------- */
.btn,
.btn-contact,
.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, #0f1625, #1b2130);
  box-shadow: 0 12px 28px rgba(0,0,0,0.6);
  font-weight:700;
  letter-spacing:.3px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, opacity .2s ease;
}
.btn:hover,
.btn-contact:hover,
.btn-secondary:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.75);
}
.btn-small{ padding:10px 14px; box-shadow:none; }
.btn-ghost{
  background: transparent;
  border:1px solid var(--line);
  box-shadow:none;
}

.btn-secondary{ padding:14px 26px; font-size:15px; }
.btn-secondary.outline{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: none;
}
.btn-secondary.outline:hover{ background: rgba(255,255,255,0.05); }

/* ---------- Sections / Typography ---------- */
h1{ font-size:44px; margin:0 0 10px; line-height:1.12; }
.lead{ font-size:18px; color:var(--muted); margin:0 0 18px; }

.section{ padding:48px 0; }
.section.alt{
  background: rgba(255,255,255,.02);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.section-head{ margin-bottom:18px; }
.section-head h2{ margin:0 0 6px; font-size:28px; }

/* Specific tone sections */
#camaras{ background: var(--plomo); }

/* ---------- Cards ---------- */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
.card{
  padding:18px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.card h3{ margin:0 0 8px; }

/* Service Icons (final working version) */
.cards .card .card-icon{
  width: 60px;
  height: 60px;
  border-radius: 12px;

  display:flex;
  align-items:center;
  justify-content:center;

  margin: 0 auto 12px;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.10);
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
.cards .card .card-icon svg{
  width: 50px;
  height: 50px;
  display:block;
  fill: currentColor;
}
.cards .card .icon-camera{ color:#4da3ff; }
.cards .card .icon-access{ color:#f5b942; }
.cards .card .icon-network{ color:#4dd2a8; }
.cards .card .icon-it{ color:#ff8c66; }
.cards .card .icon-web{ color:#b58cff; }

/* ---------- Video Hero ---------- */
.video-hero{
  width:100%;
  height:72vh;
  max-height:640px;
  min-height:420px;
  overflow:hidden;
  background:#000;
}
.video-hero video{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
}
/* Wide screens */
@media (min-aspect-ratio: 16/9){
  .video-hero{ height:84vh; max-height:760px; }
}
/* Normal screens */
@media (max-aspect-ratio: 16/9){
  .video-hero{ height:72vh; max-height:640px; }
}
/* Mobile */
@media (max-width: 768px){
  .video-hero{ height:62vh; min-height:340px; max-height:520px; }
}

/* ---------- Galleries ---------- */
.gallery,
.gallery-small{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery img{
  width:100%;
  height: 340px;
  object-fit: cover;
  object-position: center center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  display:block;
  transition: transform .3s ease;
}
.gallery img:hover{ transform: scale(1.03); }

/* ---------- Parallax ---------- */
.parallax{
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  background-attachment: fixed;
}
.parallax::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(8, 12, 20, 0.78);
}
.parallax > .container{
  position: relative;
  z-index: 1;
}

/* Backgrounds */
.parallax-servicios{
  background-image: url("https://www.mmsercom.com/3mtech/imagenesWeb/fondoServicios.png");
}
.parallax-acceso{
  background-image: url("https://www.mmsercom.com/3mtech/imagenesWeb/fondoControl.png");
}
.parallax-it{
  background-image: url("https://www.mmsercom.com/3mtech/imagenesWeb/fondoIT.png");
}

/* Dark cards on parallax */
.parallax .card{
  background: rgba(5, 8, 15, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.parallax .card h3{ color:#fff; }
.parallax .card p{ color: rgba(255,255,255,0.82); }
.parallax .card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.75);
}

/* ---------- Contact ---------- */
#contacto .section-head h2{
  font-size: 34px;
  letter-spacing: .6px;
  margin-bottom: 6px;
}
.contact-pro{
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(5, 8, 15, 0.65);
  box-shadow: var(--shadow);
}
.contact-line{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:baseline;
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.contact-line:last-of-type{ border-bottom:none; }
.contact-label{
  font-size:18px;
  color: rgba(255,255,255,0.75);
  min-width:110px;
}
.contact-link{
  font-size:22px;
  font-weight:750;
  color:#fff;
  text-decoration: underline;
  text-underline-offset:4px;
}
.contact-link:hover{ opacity:.9; }
.contact-text{
  font-size:22px;
  font-weight:700;
  color:#fff;
}
.contact-actions{
  margin-top:22px;
  text-align:center;
}

/* ---------- Section buttons spacing ---------- */
.camera-actions{
  margin-top: 20px;
  margin-bottom: 48px;
  display:flex;
  justify-content:center;
  gap:18px;
  flex-wrap:wrap;
}
.access-actions{
  margin-top: 20px;
  margin-bottom: 48px;
  display:flex;
  justify-content:center;
}

/* ---------- Back To Top ---------- */
.back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, #0f1625, #1b2130);
  box-shadow: 0 14px 32px rgba(0,0,0,0.65);
  cursor: pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  opacity: 0;
  transform: translateY(14px);
  pointer-events:none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index: 9999;
}
.back-to-top.show{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}
.back-to-top:hover{ box-shadow: 0 20px 44px rgba(0,0,0,0.8); }
.back-to-top-icon{ width:22px; height:22px; fill:#fff; }

/* ---------- Footer ---------- */
.footer{ padding:26px 0; }
.footer-wrap{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  border-top:1px solid var(--line);
  padding-top:18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  h1{ font-size:36px; }
  .cards{ grid-template-columns: 1fr; }
  .gallery, .gallery-small{ grid-template-columns: repeat(2, 1fr); }
  .gallery img{ height:320px; }
  .parallax{ background-attachment: scroll; }
}
@media (max-width: 760px){
  .nav-toggle{ display:flex; }
  .nav{
    position:absolute;
    right:18px;
    top:64px;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px;
    border-radius:16px;
    border:1px solid var(--line);
    background: rgba(11,18,32,.95);
    width: min(260px, calc(100vw - 36px));
    display:none;
  }
  .nav.open{ display:flex; }
}
@media (max-width: 520px){
  .gallery, .gallery-small{ grid-template-columns: 1fr; }
  .gallery img{ height:300px; }

  .back-to-top{
    width: 48px;
    height: 48px;
    right: 14px;
    bottom: 14px;
    border-radius: 14px;
  }
  .back-to-top-icon{ width:20px; height:20px; }
}