/*
Theme Name: Ruzpharma
Theme URI: https://ruzpharma.com.pe
Author: Ángel Grimaldo
Author URI: https://angelgrimaldo.com/
Description: Tema custom oficial de Ruzpharma inspirado en la alta estética biotecnológica y médica internacional. Desarrollado por Ángel Grimaldo (angelgrimaldo.com). Arquitectura ultraligera, 100% responsiva y optimizada para conversión (CRO).
Version: 1.2.0
Text Domain: ruzpharma
*/

/*
 * ============================================================================
 * Diseñado y Desarrollado por Ángel Grimaldo
 * Consultoría & Soluciones Digitales
 * Web: https://angelgrimaldo.com/
 * ============================================================================
 */

:root {
  --color-primary: #27272A;
  --color-accent: #00AEEF;
  --color-accent-hover: #0090D4;
  --color-bg-secondary: #F6F6F7;
  --color-border: #EDEDEF;
  --color-text-muted: #94959C;
  --color-dark-navy: #041E32;
}

html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--color-primary);
  background-color: #ffffff;
}

/* Glassmorphism & Floating Elements */
.frosted-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.frosted-glass-dark {
  background: rgba(4, 30, 50, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Typography Enhancements */
.font-display-hero {
  font-weight: 100;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

/* Product Card Sticky Stacking (Efecto Koru Pharma) */
.product-stack-card {
  position: -webkit-sticky;
  position: sticky;
  transition: box-shadow 0.35s ease;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
}

.product-stack-card:hover {
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.09);
}

/* Offsets y Z-Index progresivos para apilamiento */
.product-stack-card-1 {
  top: 16px;
  z-index: 10;
}
.product-stack-card-2 {
  top: 64px;
  z-index: 20;
}
.product-stack-card-3 {
  top: 112px;
  z-index: 30;
}
.product-stack-card-4 {
  top: 160px;
  z-index: 40;
}

@media (min-width: 640px) {
  .product-stack-card-1 { top: 24px; }
  .product-stack-card-2 { top: 76px; }
  .product-stack-card-3 { top: 128px; }
  .product-stack-card-4 { top: 180px; }
}

@media (min-width: 1024px) {
  .product-stack-card-1 { top: 28px; }
  .product-stack-card-2 { top: 82px; }
  .product-stack-card-3 { top: 136px; }
  .product-stack-card-4 { top: 190px; }
}

/* Soporte para usuarios conectados con barra de administración de WordPress */
body.admin-bar .product-stack-card-1 { top: calc(16px + 46px); }
body.admin-bar .product-stack-card-2 { top: calc(64px + 46px); }
body.admin-bar .product-stack-card-3 { top: calc(112px + 46px); }
body.admin-bar .product-stack-card-4 { top: calc(160px + 46px); }

@media (min-width: 783px) {
  body.admin-bar .product-stack-card-1 { top: calc(28px + 32px); }
  body.admin-bar .product-stack-card-2 { top: calc(82px + 32px); }
  body.admin-bar .product-stack-card-3 { top: calc(136px + 32px); }
  body.admin-bar .product-stack-card-4 { top: calc(190px + 32px); }
}

/* Doctors Card Avatar Cutout */
.doctor-avatar-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
  border-radius: 1.5rem;
}

.doctor-avatar-img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.doctor-card:hover .doctor-avatar-img {
  transform: scale(1.04);
}

/* Hide scrollbar for clean carousels */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================================================
 * BLINDAJE DE ESPACIADO VERTICAL COMPACTO EN MÓVIL (Mobile-First Vertical Spacing)
 * ============================================================================ */
@media (max-width: 640px) {
  .py-space-4xl,
  .py-24,
  .py-20,
  .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .mb-space-2xl,
  .mb-16,
  .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  .section-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .hero-giant-text {
    font-size: 2.75rem !important;
    line-height: 2.9rem !important;
    letter-spacing: -2px !important;
  }
}

/* ============================================================================
 * PÁGINA INTERNA NOSOTROS (SOBRE NOSOTROS) - ESTILOS INSPIRADOS EN KORU PHARMA
 * ============================================================================ */

/* Brands Seamless Marquee */
.brands-marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.brands-marquee-viewport {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.brands-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: brandsMarquee 38s linear infinite;
}

.brands-marquee-viewport:hover .brands-marquee-track,
.brands-marquee-viewport.is-paused .brands-marquee-track {
  animation-play-state: paused;
}

.brands-marquee-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  padding-right: 1.5rem;
}

@keyframes brandsMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Timeline Components */
.timeline-row {
  position: relative;
  transition: opacity 0.3s ease;
}

.timeline-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 174, 239, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-dot-inner {
  border-radius: 9999px;
  background-color: #00AEEF;
  box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.2);
  transition: transform 0.3s ease;
}

.timeline-row:hover .timeline-dot-inner {
  transform: scale(1.18);
  box-shadow: 0 0 0 6px rgba(0, 174, 239, 0.3);
}

/* Editorial Content Styling */
.editorial-prose h2,
.editorial-prose h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #27272A;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.editorial-prose h2:first-child {
  margin-top: 0;
}

.editorial-prose p {
  color: #4B5563;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.editorial-prose ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.editorial-prose ul li {
  position: relative;
  padding-left: 1.5rem;
  color: #4B5563;
  line-height: 1.6;
}

.editorial-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: #00AEEF;
}

/* Doctors Carousel */
.doctors-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.doctors-carousel-card {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #D1D5DB;
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.is-active {
  width: 28px;
  background-color: #00AEEF;
}

/* ==========================================================================
   Estilos del Blog / Noticias (Inspirado en Koru Pharma)
   ========================================================================== */

/* Barra de categorías sin barra de desplazamiento visible */
.no-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Tipografía de artículos científicos (.tiptap-editor) */
.tiptap-editor {
  color: #27272A;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.tiptap-editor h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #041E32;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .tiptap-editor h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
}

.tiptap-editor h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #041E32;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.tiptap-editor p {
  margin-bottom: 1.5rem;
  color: #374151;
}

.tiptap-editor ul,
.tiptap-editor ol {
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}

.tiptap-editor ul {
  list-style-type: disc;
}

.tiptap-editor ol {
  list-style-type: decimal;
}

.tiptap-editor li {
  margin-bottom: 0.5rem;
  color: #374151;
}

.tiptap-editor strong {
  font-weight: 600;
  color: #111827;
}

.tiptap-editor a {
  color: #00AEEF;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tiptap-editor a:hover {
  color: #0090D4;
  text-decoration: underline;
}

.tiptap-editor img {
  border-radius: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Pestañas de categorías del blog fijas a 16px */
.news-filter-btn {
  font-size: 16px !important;
  line-height: 20px !important;
}

/* Botón CTA dentro de artículos de noticias con texto e icono estrictamente blancos */
.tiptap-editor a.news-cta-btn,
.tiptap-editor a.news-cta-btn span,
.tiptap-editor .news-cta-btn,
.tiptap-editor .news-cta-btn span {
  color: #ffffff !important;
  text-decoration: none !important;
}

.tiptap-editor a.news-cta-btn svg,
.tiptap-editor .news-cta-btn svg {
  stroke: #ffffff !important;
}

/* ==========================================================================
 * Responsive Shield para Páginas de Tecnologías (Mobile-First)
 * ========================================================================== */
@media (max-width: 640px) {
  /* Blindaje contra desbordamiento horizontal */
  .site-main {
    overflow-x: clip;
    width: 100%;
  }

  /* Ajuste de títulos principales en móvil */
  h1 {
    word-break: break-word;
  }

  /* Imágenes científicas siempre responsivas */
  .tech-content img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Compensación compacta de espaciados verticales */
  .py-space-4xl, .py-24, .py-20 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

