/* =====================================================
   VARIABLES (SOLO DARK)s
   ===================================================== */
:root{
  /* Branding */
  --azul-principal: #2E668A;
  --azul-secundario: #6594AE;
  --celeste: #98BFD0;

  /* DARK default */
  --bg: #0b1220;
  --surface: #0f1a2d;
  --surface-2: #0c1627;
  --text: #eaf2f6;
  --muted: rgba(255,255,255,.75);
  --border: rgba(152,191,208,.22);
  --shadow: 0 18px 40px rgba(0,0,0,.45);

  /* Hero overlay */
  --hero-grad-1: rgba(152,191,208,.12);
  --hero-overlay-a: rgba(12,18,32,.92);
  --hero-overlay-b: rgba(12,18,32,.86);
  --hero-overlay-c: rgba(12,18,32,.72);

  /* Hero logo opacity */
  --hero-logo-opacity: .28;
}

/* =====================================================
   RESET
   ===================================================== */
*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior: smooth; }

body{
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
}

a{ text-decoration:none; color:inherit; }

/* Normalizador global de imágenes */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
   CONTAINER
   ===================================================== */
.container{
  width: 92%;
  max-width: 1250px;
  margin: auto;
}

/* =====================================================
   HEADER
   ===================================================== */
.header{
  position: relative;
  background: var(--surface);
  border-bottom: 3px solid var(--azul-principal);
}

.header-content{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 16px;
  padding: 14px 0;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo-text h1{
  font-size:18px;
  display:flex;
  align-items:center;
  gap:10px;
}

.logo-text > span{
  font-size:12px;
  color: var(--azul-secundario);
}

.logo-pbx{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--azul-secundario);
  color: #fff;
  letter-spacing: .3px;
}

.nav a{
  margin-left:20px;
  font-weight:bold;
  color: var(--muted);
}
.nav a:hover{ color: var(--azul-principal); }

/* =====================================================
   BOTONES
   ===================================================== */
.btn{
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--azul-principal);
  color: #fff;
  display:inline-block;
  border: none;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.btn-primary{
  background: linear-gradient(135deg, var(--azul-principal), var(--azul-secundario));
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,.22);
}

/* =====================================================
   HERO
   ===================================================== */
.hero{
  position: relative;
  padding: 90px 0;
  min-height: 78vh;
  display:flex;
  align-items:center;
  overflow:hidden;
  background: var(--bg);
}

/* Overlay */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 520px at 20% 0%, var(--hero-grad-1), transparent 60%),
    linear-gradient(90deg,
      var(--hero-overlay-a) 0%,
      var(--hero-overlay-b) 55%,
      var(--hero-overlay-c) 100%);
  z-index:0;
}

/* Logo background */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("./techworld-removebg-preview.png");
  background-repeat:no-repeat;
  background-position: left 18% center;
  background-size: clamp(500px, 45vw, 760px);
  opacity: var(--hero-logo-opacity);
  z-index:0;
}

/* =====================================================
   HERO CONTENT
   ===================================================== */
.hero-content{
  position: relative;
  z-index:1;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 52px;
  align-items:center;
}

.hero-text{
  max-width: 620px;
}

.hero-text h2{
  font-size: 50px;
  line-height:1.05;
  margin-bottom: 14px;
}

.hero-text p{
  margin-bottom: 18px;
  max-width: 520px;
  color: var(--muted);
}

/* =====================================================
   FORM HERO
   ===================================================== */
.hero-box{
  padding: 28px;
  border-radius: 14px;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  background: rgba(15,26,45,.76);
}

.hero-box h3{
  margin-bottom:14px;
  color: #a7d7ea;
}

/* ---------- FORM (inputs flotantes) ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Label flotante SOLO cuando hay foco o texto real */
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:focus):not([value=""]) + label,
.field textarea:not(:focus):not(:empty) + label {
  top: -7px;
  font-size: 12px;
  background: rgba(12,18,32,.95);
  padding: 0 6px;
  border-radius: 6px;
  color: #9fdcff;
}


/* Labels flotantes */
.field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  pointer-events: none;
  transition: 0.2s ease;
  background: transparent;
}

.field textarea + label {
  top: 18px;
  transform: none;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: -7px;
  font-size: 12px;
  background: rgba(12,18,32,.95);
  padding: 0 6px;
  border-radius: 6px;
  color: #9fdcff;
}


.field input {
  min-height: 48px;
}


/* ---------- BOTÓN ENVIAR ---------- */
.btn-submit {
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, #4fc3f7, #1976d2);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 195, 247, 0.35);
}

.btn-submit:active { transform: scale(0.98); }

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Loader del botón */
.btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loader { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Mensaje */
.form-msg {
  font-size: 13px;
  margin-top: 6px;
}

/* Validación visual */
.field input.invalid,
.field textarea.invalid{
  border-color: rgba(255, 80, 80, .85) !important;
  box-shadow: 0 0 0 3px rgba(255, 80, 80, .14) !important;
}

/* =====================================================
   SECCIONES
   ===================================================== */
.section{ padding: 60px 0; }

.section-title{
  text-align:center;
  font-size: 30px;
  margin-bottom:30px;
  color: #a7d7ea;
}

.center-text{
  text-align:center;
  max-width:700px;
  margin:auto;
  color: var(--muted);
}

/* =====================================================
   FEATURES
   ===================================================== */
.features{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:15px;
  margin-top:30px;
  text-align:center;
}

.features > div{
  background: var(--surface-2);
  border:1px solid var(--border);
  padding:14px;
  border-radius:10px;
}

/* =====================================================
   STATS
   ===================================================== */
.stats{
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-number{
  font-size: 26px;
  font-weight: 800;
  color: #a7d7ea;
}

.stat-label{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

/* =====================================================
   SERVICIOS VERTICAL + POPUPS + POSTER
   ===================================================== */
.services-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* tarjeta */
.service-card{
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 190px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.service-card:hover{
  z-index: 10;
  border-color: rgba(255,255,255,.22);
}

.service-body{
  padding: 16px;
  display: grid;
  gap: 8px;
}

.service-title{
  margin: 0;
  font-size: 16px;
}

.service-text{
  margin: 0;
  opacity: .82;
  line-height: 1.45;
  font-size: 14px;
}

.service-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.service-link{
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.35);
  padding-bottom: 2px;
  opacity: .92;
}

/* ===== Popup base ===== */
.pop{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.partners-btn{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: inherit;
  cursor: pointer;
  opacity: .95;
}

/* Panel sale hacia arriba */
.pop-panel{
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);

  width: 360px;
  max-width: min(360px, 92vw);

  padding: 12px;
  border-radius: 16px;

  border: 1px solid rgba(255,255,255,.14);
  background: rgba(12,18,32,.95);
  backdrop-filter: blur(10px);

  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 50;
}

.pop-panel::before{
  content: "";
  position: absolute;
  bottom: -7px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: rgba(12,18,32,.95);
  border-right: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
  transform: rotate(45deg);
}

.pop:hover .pop-panel,
.pop:focus-within .pop-panel{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* grid de logos */
.partners-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.partner-item{
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
}

.partner-item img{
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
}

.partner-item span{
  font-size: 12px;
  opacity: .9;
  text-align: center;
}

/* =========================
   SERVICE POSTER
   ========================= */
.service-card--poster{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
}

.service-poster{
  border-radius: 16px 0 0 16px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,.06);
}

.service-poster img{
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}

/* =====================================================
   CONTACTO
   ===================================================== */
.contact-info{
  text-align:center;
  display:grid;
  gap:10px;
  font-weight:bold;
  color: var(--muted);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer{
  background: #0b1a2d;
  color: rgba(255,255,255,.86);
  padding: 20px 0;
  margin-top: 40px;
  text-align:center;
}

/* =====================================================
   WHATSAPP FLOAT
   ===================================================== */
.wa-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: #25D366;
  color: #07310f;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,.12);
  transition: transform .18s ease, box-shadow .18s ease;
}

.wa-icon{ font-size: 18px; line-height: 1; }
.wa-text{ font-size: 14px; }

.wa-float:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(0,0,0,.40);
}

@media (max-width: 520px){
  .wa-text{ display:none; }
  .wa-float{ padding: 12px; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 980px){
  .hero-content{
    grid-template-columns: 1fr;
    gap:28px;
  }

  .hero-text{
    text-align:center;
    margin:auto;
  }

  .hero-text h2{ font-size:40px; }

  .hero{
    padding-top:320px;
  }

  .hero::after{
    background-position:center 30px;
    background-size:520px auto;
  }
}

@media (max-width: 768px){
  .features{ grid-template-columns:1fr; }
  .nav{ display:none; }
}

@media (max-width: 700px){
  .service-card{
    grid-template-columns: 1fr;
  }
  .service-card--poster{
    grid-template-columns: 1fr;
  }
  .service-poster{
    border-radius: 16px 16px 0 0;
  }
}


