/*
Theme Name:   Webb Consulting
Theme URI:    https://webbconsulting.com.gt
Author:       Servicom
Description:  Tema a medida para Webb Consulting. Reemplaza OceanWP + Elementor por plantillas nativas: sin constructores, sin dependencias de plugins y con endurecimiento de seguridad integrado. Incluye formulario de contacto propio (antispam, sin plugin) y carrusel sin librerías externas.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  webb-consulting
Tags:         one-column, custom-menu, custom-logo, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. TOKENS DE DISEÑO
   Valores extraídos del sitio original para mantener la identidad exacta.
   ========================================================================== */
:root {
  /* Marca */
  --wc-blue:        #5E82A2;  /* azul de marca dominante */
  --wc-navy:        #2F4F86;  /* fondo de encabezados de tarjeta */
  --wc-blue-deep:   #0C68B8;
  --wc-blue-link:   #1364D5;

  /* Canales de contacto (uno por tarjeta) */
  --wc-phone:       #03A7C0;
  --wc-phone-hi:    #08DFFF;
  --wc-wa:          #03C054;
  --wc-wa-hi:       #08FF51;
  --wc-mail:        #C07403;
  --wc-mail-hi:     #FFD608;

  /* Neutros */
  --wc-ink:         #333333;
  --wc-ink-soft:    #555555;
  --wc-line:        #ADADAD;
  --wc-line-soft:   #D0D0D0;
  --wc-bg:          #FFFFFF;
  --wc-bg-alt:      #F5F7F6;

  /* Tipografía */
  --wc-font:        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --wc-font-alt:    "Roboto Slab", Georgia, "Times New Roman", serif;

  /* Métrica */
  --wc-container:   1200px;
  --wc-radius:      8px;
  --wc-radius-card: 50px 15px 50px 15px;
  --wc-shadow:      1px 1px 3px rgba(0, 0, 0, .28);
  --wc-shadow-lg:   0 6px 24px rgba(0, 0, 0, .12);
  --wc-gap:         30px;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--wc-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--wc-ink);
  background: var(--wc-bg);
  overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--wc-blue-link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--wc-font);
  font-weight: 600;
  line-height: 1.25;
  color: var(--wc-navy);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.4em; }
li { margin-bottom: .4em; }
strong, b { font-weight: 600; color: var(--wc-navy); }
hr { border: 0; border-top: 1px solid var(--wc-line-soft); margin: 2.5rem 0; }

/* Foco visible — requisito de accesibilidad */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--wc-blue-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Utilidades */
.wc-container { width: 100%; max-width: var(--wc-container); margin: 0 auto; padding: 0 20px; }
.wc-container--narrow { max-width: 900px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--wc-navy); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--wc-radius) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ==========================================================================
   3. BARRA SUPERIOR
   ========================================================================== */
.wc-topbar {
  background: var(--wc-navy);
  color: rgba(255, 255, 255, .92);
  font-size: .85rem;
  padding: 7px 0;
}
.wc-topbar__inner {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: flex-end;
  gap: 8px 26px;
}
.wc-topbar a { color: #fff; }
.wc-topbar__item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.wc-topbar__item svg { width: 15px; height: 15px; fill: currentColor; flex: none; }

/* ==========================================================================
   4. ENCABEZADO + NAVEGACIÓN
   ========================================================================== */
.wc-header {
  background: var(--wc-bg);
  border-bottom: 1px solid var(--wc-line-soft);
  position: sticky; top: 0; z-index: 500;
}
.wc-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 12px; padding-bottom: 12px;
}
.wc-logo { flex: 0 1 auto; min-width: 0; }
.wc-logo a { display: block; }
.wc-logo img { max-height: 74px; width: auto; }
.wc-logo__text { font-size: 1.35rem; font-weight: 600; color: var(--wc-navy); }

/* Menú de escritorio */
.wc-nav { flex: 0 0 auto; }
.wc-nav ul { list-style: none; margin: 0; padding: 0; }
.wc-nav > ul { display: flex; align-items: center; gap: 2px; }
.wc-nav > ul > li { position: relative; }
.wc-nav a {
  display: block; padding: 12px 15px;
  color: var(--wc-ink); font-weight: 500; font-size: .96rem;
  border-radius: var(--wc-radius);
  transition: background-color .18s ease, color .18s ease;
}
.wc-nav a:hover, .wc-nav a:focus { background: var(--wc-bg-alt); color: var(--wc-navy); text-decoration: none; }
.wc-nav .current-menu-item > a,
.wc-nav .current-menu-ancestor > a,
.wc-nav .current-page-ancestor > a { color: var(--wc-navy); font-weight: 600; }

/* Submenú */
.wc-nav ul ul {
  position: absolute; top: 100%; left: 0;
  min-width: 260px;
  background: var(--wc-bg);
  border: 1px solid var(--wc-line-soft);
  border-radius: var(--wc-radius);
  box-shadow: var(--wc-shadow-lg);
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.wc-nav li:hover > ul,
.wc-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.wc-nav ul ul a { padding: 10px 14px; font-size: .93rem; white-space: normal; }
.wc-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; margin-left: 7px;
  border: 4px solid transparent; border-top-color: currentColor;
  transform: translateY(2px);
}

/* Botón hamburguesa */
.wc-burger {
  display: none;
  background: none; border: 1px solid var(--wc-line-soft);
  border-radius: var(--wc-radius);
  padding: 9px 12px; cursor: pointer;
  color: var(--wc-navy); line-height: 0;
}
.wc-burger span {
  display: block; width: 22px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.wc-burger span + span { margin-top: 5px; }
.wc-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wc-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.wc-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil */
.wc-mobile-nav {
  display: none;
  border-top: 1px solid var(--wc-line-soft);
  background: var(--wc-bg);
  max-height: min(75vh, 620px); overflow-y: auto;
}
.wc-mobile-nav.is-open { display: block; }
.wc-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.wc-mobile-nav li { border-bottom: 1px solid var(--wc-bg-alt); }
.wc-mobile-nav a { display: block; padding: 14px 20px; color: var(--wc-ink); font-weight: 500; }
.wc-mobile-nav ul ul a { padding-left: 40px; font-size: .93rem; color: var(--wc-ink-soft); }

@media (max-width: 980px) {
  .wc-nav { display: none; }
  .wc-burger { display: block; }
  .wc-logo img { max-height: 56px; }
  .wc-header { position: static; }
}

/* ==========================================================================
   5. HERO
   ========================================================================== */
.wc-hero { position: relative; background: var(--wc-bg-alt); overflow: hidden; }
.wc-hero__img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 1312 / 736; object-fit: cover;
}

/* Carrusel de inicio — CSS + JS mínimo, sin librerías */
.wc-slider { position: relative; }
.wc-slider__track { position: relative; }
.wc-slider__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility .7s;
}
.wc-slider__slide.is-active { position: relative; opacity: 1; visibility: visible; }
.wc-slider__slide a { display: block; }

.wc-slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(47, 79, 134, .68); color: #fff;
  border: 0; border-radius: 50%; cursor: pointer;
  transition: background-color .2s ease;
  z-index: 3;
}
.wc-slider__nav:hover { background: var(--wc-navy); }
.wc-slider__nav svg { width: 20px; height: 20px; fill: currentColor; }
.wc-slider__nav--prev { left: 16px; }
.wc-slider__nav--next { right: 16px; }

.wc-slider__dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 9px; z-index: 3; margin: 0; padding: 0; list-style: none;
}
.wc-slider__dot {
  width: 12px; height: 12px; padding: 0;
  border: 2px solid #fff; border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: background-color .2s ease;
}
.wc-slider__dot[aria-current="true"] { background: #fff; }

@media (max-width: 600px) {
  .wc-slider__nav { width: 36px; height: 36px; }
  .wc-slider__nav--prev { left: 8px; }
  .wc-slider__nav--next { right: 8px; }
}

/* ==========================================================================
   6. CONTENIDO / PROSA
   ========================================================================== */
.wc-main { padding: 0 0 10px; }
.wc-section { padding: 52px 0; }
.wc-section--alt { background: var(--wc-bg-alt); }
.wc-section--tight { padding: 34px 0; }

.wc-page-title { text-align: center; margin-bottom: 1.6rem; }

.wc-prose { font-size: 1.03rem; }
.wc-prose > *:last-child { margin-bottom: 0; }
.wc-prose h2 { margin-top: 1.8em; }
.wc-prose h3 { margin-top: 1.5em; }
.wc-prose img { border-radius: var(--wc-radius); margin: 1.5rem auto; box-shadow: var(--wc-shadow); }
.wc-prose ul { padding-left: 1.2em; }
.wc-prose ul li::marker { color: var(--wc-blue); }
.wc-prose blockquote {
  margin: 1.6rem 0; padding: 1rem 1.4rem;
  border-left: 4px solid var(--wc-blue);
  background: var(--wc-bg-alt); border-radius: 0 var(--wc-radius) var(--wc-radius) 0;
}
.wc-prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.wc-prose th, .wc-prose td { border: 1px solid var(--wc-line-soft); padding: 10px 12px; text-align: left; }
.wc-prose th { background: var(--wc-bg-alt); font-weight: 600; color: var(--wc-navy); }

/* Encabezado de bloque, estilo original: fondo azul marino, texto blanco */
.wc-block-title {
  background: var(--wc-navy);
  color: #fff;
  font-size: 20px; font-weight: 600;
  text-align: center;
  padding: 11px 16px;
  border-radius: var(--wc-radius);
  margin: 0 15px 18px;
}

/* Dos columnas (perfil profesional, direcciones) */
.wc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .wc-split { grid-template-columns: 1fr; gap: 28px; } }
.wc-split img { border-radius: var(--wc-radius); box-shadow: var(--wc-shadow); width: 100%; }

/* Mapa */
.wc-map { position: relative; border-radius: var(--wc-radius); overflow: hidden; box-shadow: var(--wc-shadow); }
.wc-map iframe { display: block; width: 100%; height: 354px; border: 0; }

/* ==========================================================================
   7. TARJETAS DE CONTACTO (LLÁMENOS / ESCRÍBANOS / ENVÍE UN EMAIL)
   ========================================================================== */
.wc-cta { padding: 48px 0; }
.wc-cta__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--wc-gap);
}
@media (max-width: 860px) { .wc-cta__grid { grid-template-columns: 1fr; gap: 22px; } }

.wc-cta__card {
  border: 1px solid var(--wc-line);
  border-radius: var(--wc-radius-card);
  box-shadow: var(--wc-shadow);
  background: var(--wc-bg);
  padding: 15px 15px 26px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.wc-cta__card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0, 0, 0, .16); }

.wc-cta__icon {
  display: inline-grid; place-items: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  color: #fff;
  margin: 6px auto 14px;
  transition: background-color .2s ease, transform .2s ease;
}
.wc-cta__icon svg { width: 32px; height: 32px; fill: currentColor; }
.wc-cta__card a:hover .wc-cta__icon { transform: scale(1.06); }

.wc-cta__card--phone .wc-cta__icon { background: var(--wc-phone); }
.wc-cta__card--phone a:hover .wc-cta__icon,
.wc-cta__card--phone a:focus .wc-cta__icon { background: var(--wc-phone-hi); }

.wc-cta__card--wa .wc-cta__icon { background: var(--wc-wa); }
.wc-cta__card--wa a:hover .wc-cta__icon,
.wc-cta__card--wa a:focus .wc-cta__icon { background: var(--wc-wa-hi); }

.wc-cta__card--mail .wc-cta__icon { background: var(--wc-mail); }
.wc-cta__card--mail a:hover .wc-cta__icon,
.wc-cta__card--mail a:focus .wc-cta__icon { background: var(--wc-mail-hi); }

.wc-cta__card a { display: block; color: inherit; text-decoration: none; }
.wc-cta__value { font-size: .98rem; color: var(--wc-ink-soft); margin: 0; word-break: break-word; }

/* ==========================================================================
   8. FORMULARIO DE CONTACTO
   ========================================================================== */
.wc-form-wrap {
  background: var(--wc-bg);
  border: 1px solid var(--wc-line-soft);
  border-radius: var(--wc-radius);
  box-shadow: var(--wc-shadow);
  padding: 26px;
}
.wc-form { display: grid; gap: 15px; }
.wc-form__row { display: grid; gap: 15px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .wc-form__row { grid-template-columns: 1fr; } }

.wc-form label { font-weight: 500; font-size: .92rem; color: var(--wc-ink-soft); display: block; margin-bottom: 5px; }
.wc-form .req { color: #C0392B; }

.wc-form input[type="text"],
.wc-form input[type="email"],
.wc-form input[type="tel"],
.wc-form textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  color: var(--wc-ink);
  padding: 12px 14px;
  border: 1px solid var(--wc-line-soft);
  border-radius: var(--wc-radius);
  background: var(--wc-bg);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.wc-form input:focus, .wc-form textarea:focus {
  border-color: var(--wc-blue);
  box-shadow: 0 0 0 3px rgba(94, 130, 162, .18);
  outline: none;
}
.wc-form textarea { min-height: 145px; resize: vertical; }
.wc-form input[aria-invalid="true"], .wc-form textarea[aria-invalid="true"] { border-color: #C0392B; }

/* Trampa antispam — invisible para personas, visible para bots */
.wc-hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.wc-btn {
  display: inline-block;
  font: inherit; font-weight: 600; font-size: 1rem;
  color: #fff; background: var(--wc-navy);
  border: 0; border-radius: var(--wc-radius);
  padding: 13px 34px; cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}
.wc-btn:hover, .wc-btn:focus { background: var(--wc-blue-deep); text-decoration: none; }
.wc-btn:active { transform: translateY(1px); }
.wc-btn[disabled] { opacity: .6; cursor: not-allowed; }

.wc-notice {
  border-radius: var(--wc-radius);
  padding: 14px 18px; margin-bottom: 18px;
  font-size: .96rem; border: 1px solid transparent;
}
.wc-notice--ok  { background: #E7F7EE; border-color: #9BD9B6; color: #1B5E38; }
.wc-notice--err { background: #FDECEA; border-color: #F0B4AE; color: #8B2016; }
.wc-notice ul { margin: 8px 0 0; padding-left: 1.2em; }

/* ==========================================================================
   9. PIE DE PÁGINA
   ========================================================================== */
.wc-footer { background: var(--wc-navy); color: rgba(255, 255, 255, .88); margin-top: 20px; }
.wc-footer__inner { padding: 34px 20px; text-align: center; }
.wc-footer a { color: #fff; }
.wc-footer__nav { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
.wc-footer__nav a { font-size: .93rem; }
.wc-footer__copy { font-size: .88rem; margin: 0; color: rgba(255, 255, 255, .72); }

/* Botón flotante de WhatsApp */
.wc-wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 600;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wc-wa); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .2s ease, background-color .2s ease;
}
.wc-wa-float:hover { background: var(--wc-wa-hi); transform: scale(1.07); text-decoration: none; }
.wc-wa-float svg { width: 30px; height: 30px; fill: currentColor; }
@media print { .wc-wa-float, .wc-topbar, .wc-burger { display: none !important; } }

/* ==========================================================================
   10. 404 / BÚSQUEDA / VARIOS
   ========================================================================== */
.wc-404 { text-align: center; padding: 70px 0; }
.wc-404__code { font-size: clamp(3.4rem, 12vw, 6.5rem); font-weight: 700; color: var(--wc-blue); line-height: 1; margin: 0; }

.wc-searchform { display: flex; gap: 8px; max-width: 460px; margin: 22px auto 0; }
.wc-searchform input[type="search"] {
  flex: 1; font: inherit; padding: 11px 14px;
  border: 1px solid var(--wc-line-soft); border-radius: var(--wc-radius);
}

.wc-results { list-style: none; padding: 0; margin: 0; }
.wc-results li { padding: 18px 0; border-bottom: 1px solid var(--wc-bg-alt); }
.wc-results h2 { font-size: 1.15rem; margin-bottom: .3em; }

.wc-pagination { display: flex; gap: 8px; justify-content: center; margin: 34px 0; flex-wrap: wrap; }
.wc-pagination .page-numbers {
  padding: 9px 14px; border: 1px solid var(--wc-line-soft);
  border-radius: var(--wc-radius); color: var(--wc-ink);
}
.wc-pagination .current { background: var(--wc-navy); color: #fff; border-color: var(--wc-navy); }

/* Alineaciones nativas de WordPress */
.alignleft  { float: left;  margin: .4rem 1.6rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.6rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .87rem; color: var(--wc-ink-soft); text-align: center; margin-top: .4rem; }
.clearfix::after { content: ""; display: table; clear: both; }
