/* ==========================================================================
   Vinklou — Estilos del perfil público (portado de perfiles/plantilla-base)
   Un solo archivo para todos los perfiles. Lo que cambia por cliente
   (colores, tipografía, portada, filtros por etiqueta) lo inyecta el
   template perfil.php en un <style> propio de cada perfil, con los valores
   cargados en ProcessWire. Este archivo no se edita por cliente.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) VARIABLES DE MARCA — valores por defecto (perfil.php los pisa por perfil)
   -------------------------------------------------------------------------- */
:root {
  --brand-primary: #1a5f7a;
  --brand-primary-rgb: 26, 95, 122; /* mismo color que --brand-primary, en RGB */
  --brand-primary-dark: #123f52;
  --brand-secondary: #c99a3b;
  --brand-secondary-hover: #b38731;
  --brand-font-heading: "Poppins", sans-serif;
  --brand-font-body: "Inter", sans-serif;
  --brand-radius: 0.75rem;
}

/* --------------------------------------------------------------------------
   Tipografía base
   -------------------------------------------------------------------------- */
body {
  font-family: var(--brand-font-body);
  color: #2b2b2b;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.hero-name {
  font-family: var(--brand-font-heading);
}

/* --------------------------------------------------------------------------
   Re-tematizado de componentes de Bootstrap con el color de marca.
   Bootstrap 5.3 define el color de cada componente con variables propias
   (--bs-btn-bg, etc.), no heredan solas de --bs-primary global, así que se
   pisan acá de forma explícita.
   -------------------------------------------------------------------------- */
.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-dark);
  --bs-btn-hover-border-color: var(--brand-primary-dark);
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
  --bs-btn-disabled-bg: var(--brand-primary);
  --bs-btn-disabled-border-color: var(--brand-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
  --bs-btn-active-bg: var(--brand-primary);
  --bs-btn-active-border-color: var(--brand-primary);
}

.btn-secondary {
  --bs-btn-bg: var(--brand-secondary);
  --bs-btn-border-color: var(--brand-secondary);
  --bs-btn-color: #2b2b2b;
  --bs-btn-hover-bg: var(--brand-secondary-hover);
  --bs-btn-hover-color: #2b2b2b;
}

.text-primary { color: var(--brand-primary) !important; }
.bg-primary   { background-color: var(--brand-primary) !important; }
.text-brand-secondary { color: var(--brand-secondary) !important; }

a { color: var(--brand-primary); }
a:hover { color: var(--brand-primary-dark); }

.rounded-brand { border-radius: var(--brand-radius) !important; }

/* --------------------------------------------------------------------------
   Anclas de sección — que no queden tapadas por el navbar sticky
   -------------------------------------------------------------------------- */
section[id] {
  scroll-margin-top: 84px;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar-profile {
  background-color: #ffffff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.navbar-profile .nav-link {
  font-weight: 500;
  color: #444;
}

.navbar-profile .nav-link.active,
.navbar-profile .nav-link:hover {
  color: var(--brand-primary);
}

.navbar-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Hero / top header
   La foto de portada la inyecta perfil.php como background-image.
   -------------------------------------------------------------------------- */
.profile-cover {
  background-color: var(--brand-primary-dark);
  background-size: cover;
  background-position: center;
  min-height: 220px;
  position: relative;
}

@media (min-width: 768px) {
  .profile-cover {
    min-height: 300px;
  }
}

/* Franja debajo de la portada donde viven el avatar, el nombre y las redes.
   Fondo propio a todo el ancho (se declara fuera del .container en el
   HTML) para que no quede como un bloque de texto flotando en blanco. */
.profile-info-band {
  background-color: rgba(var(--brand-primary-rgb), 0.06);
}

/* Avatar: <img> con el logo del cliente, o un <div> con las iniciales si
   todavía no hay logo (perfil.php elige cuál). */
.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid #fff;
  background-color: var(--brand-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--brand-font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  margin-top: -60px;
  /* .profile-cover es position:relative, así que Chrome la pinta por
     encima de cualquier elemento estático que se le superponga, aunque
     venga después en el HTML (como este avatar). position:relative +
     z-index acá aseguran que el avatar quede arriba, en vez de tapado
     por la portada, en el tramo donde se solapan. */
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .profile-avatar {
    width: 190px;
    height: 190px;
    font-size: 3.25rem;
    margin-top: -75px;
  }
}

.hero-name {
  font-weight: 700;
}

/* Redes sociales junto al nombre, en el espacio que antes quedaba vacío a
   la derecha en pantallas anchas. */
.profile-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.25);
  background-color: #fff;
  color: var(--brand-primary);
  font-size: 1.15rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.social-icon-btn:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

/* Código QR con la vCard del cliente, arriba de .profile-social. */
.profile-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.profile-qr-img {
  width: 96px;
  height: 96px;
  padding: 6px;
  background-color: #fff;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.25);
  border-radius: var(--brand-radius);
}

.profile-qr-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-align: center;
  max-width: 110px;
}

/* Enlaces adicionales (sitio propio, tienda online, LinkedIn, portfolio,
   etc.), debajo de los CTA principales. A diferencia de .profile-social
   (íconos de redes conocidas), cada chip lleva texto porque el destino no
   es obvio solo con un ícono. */
.profile-extra-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.extra-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--brand-radius);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.25);
  background-color: #fff;
  color: var(--brand-primary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.extra-link-chip:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Galería (carrusel de Bootstrap)
   Las fotos salen del campo "galeria" de cada perfil.
   -------------------------------------------------------------------------- */
.profile-gallery .carousel-item {
  position: relative;
}

.profile-gallery .carousel-item img {
  height: 260px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .profile-gallery .carousel-item img {
    height: 420px;
  }
}

/* Degradé para que el texto de la leyenda se lea sobre cualquier foto */
.profile-gallery .carousel-item::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

.profile-gallery .carousel-caption {
  z-index: 2;
  text-align: left;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1rem;
  padding: 0;
}

.profile-gallery .carousel-indicators {
  margin-bottom: 0.75rem;
}

.hero-tagline {
  color: #555;
}

/* --------------------------------------------------------------------------
   Badges de estado: verificación y nivel de perfil.
   No son parte de los 3 ejes de personalización por cliente (color/tipo-
   grafía, imágenes, contenido) — colores fijos e iguales en toda la
   plataforma, para que funcionen como señal reconocible sin importar la
   marca del cliente. Qué estado mostrar se elige en index.html alternando
   la clase modificadora (is-verified/is-unverified, is-premium/is-standard).
   -------------------------------------------------------------------------- */
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.profile-badge .bi {
  font-size: 0.9rem;
}

.profile-badge-verified.is-verified {
  background-color: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.profile-badge-verified.is-unverified {
  background-color: rgba(108, 117, 125, 0.12);
  color: #6c757d;
}

.profile-badge-tier.is-premium {
  background: linear-gradient(135deg, #d4af37, #a1791f);
  color: #fff;
}

.profile-badge-tier.is-standard {
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  color: #666;
}

/* --------------------------------------------------------------------------
   Cards genéricas: servicios, destacados, novedades
   -------------------------------------------------------------------------- */
.profile-card {
  border: 1px solid #eee;
  border-radius: var(--brand-radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* Tarjeta del formulario de contacto: mismo estilo visual que .profile-card,
   pero SIN height: 100%. Ese card vive solo (no en una grilla de columnas
   parejas), y darle height:100% dentro de una .row con un solo <div>/<form>
   hace que el navegador calcule la altura de la columna a partir del alto
   del propio form, ignorando el texto que va arriba (kicker + título) — el
   form termina "flotando" más abajo de lo que la columna reserva y se
   solapa con el footer siguiente. */
.contact-form-card {
  border: 1px solid #eee;
  border-radius: var(--brand-radius);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* --------------------------------------------------------------------------
   Filtro de Servicios por etiqueta — CSS puro, sin JS propio.
   Mecanismo: un <input type="radio" class="btn-check"> oculto por opción
   (patrón "toggle buttons" de Bootstrap, ya themeado arriba vía
   --bs-btn-active-bg en .btn-outline-primary) + :has() para mostrar u
   ocultar las cards de .service-filter-wrapper según cuál esté marcado.
   Soportado en todos los navegadores modernos (Safari 15.4+, Chrome 105+,
   Firefox 121+). Las reglas por etiqueta las genera perfil.php a partir de
   las etiquetas cargadas en cada perfil.
   -------------------------------------------------------------------------- */
.service-tag {
  background-color: rgba(var(--brand-primary-rgb), 0.08);
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.75rem;
}

.service-card-cta {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  color: var(--brand-primary);
}

.service-card-cta:hover {
  color: var(--brand-primary-dark);
}

/* --------------------------------------------------------------------------
   Filtro de Portafolio por etiqueta — mismo mecanismo CSS puro que el
   filtro de Servicios de arriba (radio .btn-check + :has()). Las reglas por
   etiqueta las genera perfil.php.
   -------------------------------------------------------------------------- */
.portfolio-tag {
  background-color: rgba(var(--brand-primary-rgb), 0.08);
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.75rem;
}

/* La card de Portafolio no lleva el p-3 que usan Servicios/Destacados/
   Novedades: la imagen tiene que llegar a los cuatro bordes (por eso
   .overflow-hidden junto a .profile-card en el HTML). El padding del texto
   vive solo en .card-body. */
.portfolio-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.portfolio-card-cta {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  color: var(--brand-primary);
}

.portfolio-card-cta:hover {
  color: var(--brand-primary-dark);
}

.portfolio-modal-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--brand-radius);
}

.testimonial-stars {
  color: var(--brand-secondary);
  font-size: 0.9rem;
}

.news-date {
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Canales de contacto
   -------------------------------------------------------------------------- */
.contact-channel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #eee;
  border-radius: var(--brand-radius);
  color: #2b2b2b;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contact-channel:hover {
  border-color: var(--brand-primary);
  background-color: rgba(var(--brand-primary-rgb), 0.05);
  color: #2b2b2b;
}

.contact-channel .bi {
  font-size: 1.4rem;
  color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.profile-footer {
  background-color: var(--brand-primary-dark);
  color: #eef3f5;
}

.profile-footer a {
  color: #eef3f5;
}

.profile-footer a:hover {
  color: var(--brand-secondary);
}

.footer-credit {
  color: #b7c6cc;
  font-size: 0.8rem;
}

/* Section title helper */
.section-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-kicker {
  color: var(--brand-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}
