/* ============================================================
   TelNet Panamá — Sistema de diseño
   Distribuidor Autorizado Control4 | Redes | Seguridad | Domótica
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@600;700;800&display=swap');

:root {
  /* Paleta de marca TelNet — claro, sobre blanco */
  --bg: #FDFDFD;
  --bg-alt: #EDEEF1;
  --header-bg: #93969F;     /* cintillo superior — gris de marca, más oscuro para que el logo blanco resalte */
  --surface: #FFFFFF;
  --surface-2: #E6E8EC;
  --border: #DEE0E4;
  --text: #1E2433;
  --text-dim: #565C6B;
  --text-faint: #A1A3A7;    /* gris de marca */
  --accent: #3C529E;        /* azul de marca — botones, links, acentos */
  --accent-2: #2E3F7B;      /* azul de marca, tono oscuro — hover / contraste */
  --accent-contrast: #FFFFFF;
  --success: #2E9E63;
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1180px;
  --shadow: 0 10px 32px -14px rgba(30,36,51,.16);
  --font-head: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-dim); }
ul { margin: 0; padding: 0; list-style: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); display: inline-block; }
.lede { font-size: 1.15rem; color: var(--text-dim); max-width: 62ch; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: .96rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 8px 24px -8px rgba(60,82,158,.4); }
.btn-primary:hover { background: var(--accent-2); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn-lg { padding: 16px 32px; font-size: 1.02rem; }
.btn-whatsapp { background: #25d366; color: #06210f; }
.btn-whatsapp:hover { background: #35e376; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-top: 4px solid var(--accent);
  border-bottom: 4px solid var(--accent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: var(--max); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo-header { height: 72px; width: auto; display: block; }
.logo-footer { height: 30px; width: auto; display: block; }
nav.main-nav { display: flex; align-items: center; gap: 28px; }
nav.main-nav a { color: var(--text); font-weight: 700; font-size: .94rem; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--accent-2); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; gap: 4px; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--text-dim); }
.lang-switch a.active { background: var(--accent); color: #fff; }
.lang-switch a:hover { text-decoration: none; color: var(--accent-2); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(30,36,51,.3); border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }

@media (max-width: 900px) {
  nav.main-nav { position: fixed; inset: 112px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 4px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; }
  nav.main-nav.open { transform: translateX(0); }
  nav.main-nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-lg-header { display: none; }
}

/* Hero */
.hero-photo { padding: 28px 0 0; }
.hero-photo .photo-wide { aspect-ratio: 21 / 7; }
@media (max-width: 700px) { .hero-photo .photo-wide { aspect-ratio: 16 / 11; } }
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero.hero-tight { padding-top: 46px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px;
  background: radial-gradient(60% 60% at 30% 20%, rgba(60,82,158,.09), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(161,163,167,.14), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; color: var(--text-dim);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.stat-strip { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.stat b { display: block; font-size: 1.9rem; font-family: 'League Spartan', var(--font-head); font-weight: 700; color: var(--text); }
.stat span { font-size: .82rem; color: var(--text-faint); }

/* Hero trust badges as logo images (replaces text pill badges) */
.badge-logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 22px 0 30px; }
.badge-logo-row img { height: 34px; width: auto; display: block; }
.badge-logo-row img.badge-tall { height: 44px; }

/* Illustration panel (SVG-based hero visual, no photography required) */
.hero-visual { position: relative; }
.device-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: 20px; padding: 26px; box-shadow: var(--shadow);
}
.device-card .row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.device-card .row:last-child { border-bottom: none; }
.device-card .row .label { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .92rem; }
.device-card .icon-chip { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; overflow: hidden; }
.icon-chip img { width: 56%; height: 56%; object-fit: contain; filter: brightness(0) invert(1); }
.icon-chip img.icon-plain { width: 100%; height: 100%; filter: none; }
.icon-chip.chip-plain { background: transparent; }
.icon-chip.chip-plain img { width: 100%; height: 100%; filter: none; }
/* Larger variant — used where a glyph needs more visual weight */
.icon-chip img.icon-lg { width: 78%; height: 78%; }
/* Bolder variant — stacks a soft white outline to thicken thin glyph strokes */
.icon-chip img.icon-bold { filter: brightness(0) invert(1) drop-shadow(0 0 .5px #fff) drop-shadow(0 0 .5px #fff) drop-shadow(0 0 .5px #fff); }
.solution-icon.icon-bold { filter: drop-shadow(0 0 .5px #7A2E3E) drop-shadow(0 0 .5px #7A2E3E); }
.toggle-pill { width: 42px; height: 24px; border-radius: 999px; background: var(--accent); position: relative; }
.toggle-pill::after { content:""; position:absolute; top:3px; right:3px; width:18px; height:18px; border-radius:50%; background:#fff; }
.toggle-pill.off { background: var(--border); }
.toggle-pill.off::after { right: auto; left: 3px; }

/* Cards / Grids */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent-2); transform: translateY(-3px); }
.card .icon-chip { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 1.15rem; overflow: hidden; flex-shrink: 0; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card a.learn { font-weight: 700; font-size: .9rem; display: inline-block; margin-top: 8px; }

/* Photo slots — real photos drop in by filename; a soft brand-tinted
   background shows instead of a broken-image icon until the file exists. */
.photo {
  background-color: var(--surface-2);
  background-image: linear-gradient(145deg, rgba(60,82,158,.10), rgba(161,163,167,.14));
  background-size: cover; background-position: center;
  border-radius: var(--radius); border: 1px solid var(--border);
  display: flex; align-items: flex-end;
}
.photo-wide { aspect-ratio: 21 / 9; }
.photo-4-3 { aspect-ratio: 4 / 3; }
.photo-3-2 { aspect-ratio: 3 / 2; }
.photo-16-10 { aspect-ratio: 16 / 10; }
.photo-caption {
  width: 100%; padding: 14px 18px; border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(0deg, rgba(30,36,51,.55), transparent);
  color: #fff; font-size: .82rem; font-weight: 600;
}
.photo-card { overflow: hidden; }
.photo-card .photo { border-radius: 0; border: none; border-bottom: 1px solid var(--border); }
.photo-card .card-body { padding: 20px; }

/* Carrusel de fotos — auto-rotación, sin dependencias */
.photo.carousel { position: relative; background-image: none; }
.photo.carousel .carousel-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  border-radius: inherit;
  opacity: 0; transition: opacity 1.1s ease;
}
.photo.carousel .carousel-slide.is-active { opacity: 1; }
.photo.carousel .photo-caption { position: relative; z-index: 2; }
.carousel-dots {
  position: absolute; z-index: 3; right: 16px; bottom: 14px;
  display: flex; gap: 7px;
}
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.5); border: none; padding: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.carousel-dots button.is-active { background: #fff; transform: scale(1.15); }
.carousel-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Franja CTA con foto de fondo */
.cta-photo { position: relative; background-size: cover; background-position: center; overflow: hidden; }
.cta-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(20,25,38,.86), rgba(46,63,123,.82));
}
.cta-photo .container { position: relative; z-index: 1; }
.cta-photo h2 { color: #fff; }
.cta-photo p.lede { color: rgba(255,255,255,.88); }
.cta-photo .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.cta-photo .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }

/* Section header */
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head.left { text-align: left; margin: 0 0 44px; }

/* Control4 pillar band */
.c4-band {
  border: 1px solid rgba(60,82,158,.24);
  background: linear-gradient(145deg, rgba(60,82,158,.06), rgba(60,82,158,.015));
  border-radius: 22px; padding: 48px; position: relative; overflow: hidden;
}
.c4-tier-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 34px; }
@media (max-width: 900px) { .c4-tier-grid { grid-template-columns: 1fr; } }
.c4-tier {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px;
}
.c4-tier .tag { display:inline-block; font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color: var(--accent); margin-bottom:10px; }
.c4-tier .tier-logo { height: 60px; width: auto; max-width: 100%; display: block; margin-bottom: 16px; }
.solution-icon { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px; display: block; }

/* Timeline / process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step-photo {
  aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px;
  background-size: cover; background-position: center; border: 1px solid var(--border);
}
.step .num {
  counter-increment: step; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px;
}
.step .num::before { content: counter(step); }

/* Testimonials */
.testimonial { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.testimonial .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; }
.testimonial footer { margin-top: 16px; font-size: .86rem; color: var(--text-faint); font-style: normal; }
.testimonial footer b { color: var(--text); }

/* Testimonials — quote-card redesign */
.testimonial-quote {
  background: var(--bg-alt); border-radius: var(--radius); padding: 34px 28px 28px; position: relative;
}
.testimonial-quote .quote-mark {
  font-family: Georgia, 'Times New Roman', serif; font-size: 3.6rem; line-height: 1; color: #7A2E3E;
  font-weight: 700; margin-bottom: 4px; display: block;
}
.testimonial-quote p { color: var(--text-dim); font-style: italic; font-size: 1rem; }
.testimonial-quote footer { margin-top: 14px; font-style: normal; font-size: .88rem; color: var(--text-faint); }
.testimonial-quote footer b { color: var(--text); display: block; font-size: .96rem; margin-bottom: 2px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: none; color: var(--text); font-weight: 700; font-size: 1.02rem; padding: 20px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--font-head); }
.faq-q .plus { flex-shrink: 0; color: var(--accent); font-size: 1.3rem; transition: transform .2s ease; }
.faq-item[open] .faq-q .plus { transform: rotate(45deg); }
.faq-a { padding: 0 0 22px; color: var(--text-dim); }

/* Brand strip */
.brand-strip { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; opacity: .8; }
.brand-strip span { font-weight: 700; letter-spacing: .04em; color: var(--text-faint); border: 1px solid var(--border); padding: 10px 18px; border-radius: 10px; }

/* Brand logo grid — real product-brand logos (Marcas de productos que instalamos) */
.brand-logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; align-items: center; justify-items: center; margin-top: 8px; }
.brand-logo-grid img { max-height: 40px; width: auto; max-width: 100%; object-fit: contain; opacity: .88; transition: opacity .2s ease; }
.brand-logo-grid img:hover { opacity: 1; }
@media (max-width: 700px) { .brand-logo-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 6px; color: var(--text-dim); }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-family: inherit; font-size: .96rem; margin-bottom: 18px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); }
textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: .78rem; color: var(--text-faint); margin-top: -8px; }

/* Contact info list */
.contact-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: none; }
.contact-list .icon-chip { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff; display:flex; align-items:center; justify-content:center; flex-shrink: 0; overflow: hidden; }
.contact-list .icon-chip img { width: 52%; height: 52%; object-fit: contain; filter: brightness(0) invert(1); }
.contact-list b { color: var(--text); display: block; }

/* Location cards — embedded, linked Google Map + address below */
.map-embed { position: relative; aspect-ratio: 16/9; background: var(--surface-2); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map-link { font-weight: 700; font-size: .9rem; display: inline-block; margin-top: 10px; }

/* Footer */
footer.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--text); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--accent-2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 28px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-faint); }
.social-row { display: flex; gap: 12px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.social-row a:hover { color: var(--accent); border-color: var(--accent); }

/* Sticky WhatsApp CTA */
.float-whatsapp {
  position: fixed; bottom: 22px; right: 22px; z-index: 200;
  background: #25d366; color: #06210f; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px -8px rgba(30,36,51,.35);
}
.float-whatsapp:hover { transform: scale(1.06); }

/* Breadcrumb */
.breadcrumb { font-size: .82rem; color: var(--text-faint); padding: 22px 0 0; }
.breadcrumb a { color: var(--text-faint); }

/* Utility */
.mt-0 { margin-top: 0; }
.text-accent { color: var(--accent); }
.text-accent2 { color: var(--accent-2); }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { background: var(--surface-2); border: 1px solid var(--border); padding: 8px 14px; border-radius: 999px; font-size: .84rem; color: var(--text-dim); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.divider { height: 1px; background: var(--border); border: none; margin: 0; }
.tag-line { display:flex; align-items:center; gap:10px; color: var(--text-dim); font-weight:600; font-size:.9rem; margin-bottom: 10px;}
.tag-line svg { color: var(--success); flex-shrink:0; }
