/*
Theme Name: Clínica Valencia Telemedicina v74
Theme URI: https://serviceti.cl
Author: STI
Author URI: https://serviceti.cl
Description: Tema responsive de telemedicina para Clínica Valencia
Version: 74.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clinica-valencia-v74
*/

:root {
  --gradient-start: #d441ff;
  --gradient-mid: #3f8cff;
  --gradient-end: #ffb347;
  --primary: #1e88e5;
  --primary-dark: #1565c0;
  --accent: #ff7e5f;
  --bg: #f5f7fb;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --card-bg: #ffffff;
  --border-soft: #e5e7eb;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-light: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
  padding: 0 1rem;
}

.hero {
  background: radial-gradient(circle at top left, var(--gradient-start), transparent 55%),
    radial-gradient(circle at bottom right, var(--gradient-end), transparent 55%),
    linear-gradient(135deg, #ffffff, #eef2ff);
  padding: 3.5rem 0 4.5rem;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.logo-container {
  position: absolute;
  top: 0px;
  left: 10%;
  z-index: 1000;
}

.logo {
  width: 200px;
  display: block;
}

/* Responsive logo positioning */
@media (max-width: 768px) {
  .logo-container {
    top: -3px;
    left: 8%;
  }
  
  .logo {
    width: 130px;
  }
}

@media (max-width: 480px) {
  .logo-container {
    top: -5px;
    left: 5%;
  }
  
  .logo {
    width: 90px;
  }
}

.hero-text h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 3.1rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* About / Quiénes somos */
.about {
  background: #fff;
  padding: 3rem 0;
}

.about h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.about h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.about p {
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.about .values {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-main);
}

.about .values li {
  margin-bottom: 0.4rem;
}

.about .tagline {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Values as buttons */
.values-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-value {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.hero-text p {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  color: var(--text-muted);
  max-width: 30rem;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-mid), var(--gradient-end));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.45);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-dark);
  border: 1px solid rgba(148, 163, 184, 0.6);
  backdrop-filter: blur(10px);
}

.btn-outline:hover,
.btn-outline:active {
  background: #ffffff;
}

.btn-full {
  width: 100%;
}

.btn-light {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-light);
}

.btn-light:hover,
.btn-light:active {
  transform: translateY(-1px);
}

.hero-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
}

.hero-media {
  padding: 0;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: clamp(220px, 50vw, 320px);
  width: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroFade 12s infinite;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slide-1 {
  animation-delay: 0s;
  background-image: url('https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?auto=format&fit=crop&w=1200&q=80');
}

.hero-slide-2 {
  animation-delay: 6s;
  background-image: url('https://images.unsplash.com/photo-1584466977773-e625c37cdd50?auto=format&fit=crop&w=1200&q=80');
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.05));
}

.hero-slide-content {
  position: absolute;
  left: 1.4rem;
  bottom: 1.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 0.9rem;
  max-width: 14rem;
}

@keyframes heroFade {
  0%,
  7% {
    opacity: 0;
    transform: scale(1.02);
  }
  10%,
  45% {
    opacity: 1;
    transform: scale(1);
  }
  48%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

main {
  padding: 2.5rem 0 3rem;
}

.tabs-bar {
  background: #f9fafb;
  border-bottom: 1px solid var(--border-soft);
}

.tabs-inside {
  margin: 0 0 1rem;
  background: transparent;
  border: none;
  padding-top: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabs-inner {
  display: flex;
  gap: 2rem;
  padding: 0.8rem 0;
  justify-content: flex-end;
  min-width: min-content;
}

.tab-link {
  padding: 0.6rem 1.4rem;
  border-radius: 999px 999px 0 0;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.tab-link-active {
  background: #e5e7ff;
  color: var(--primary-dark);
  box-shadow: none;
}

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: #ffffff;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 1.7rem);
  margin-bottom: 1.4rem;
}

.section-intro {
  max-width: 32rem;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.card h3 {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.96rem;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.chip {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(212, 65, 255, 0.07), rgba(63, 140, 255, 0.07));
  color: var(--primary-dark);
  font-size: 0.86rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}

.step {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
}

.step h3 {
  margin-bottom: 0.4rem;
}

.testimonials .quote {
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.testimonials .author {
  font-weight: 600;
}

.testimonials .tag {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.faq {
  display: grid;
  gap: 0.7rem;
  max-width: 44rem;
}

.details {
}

details {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-light);
}

summary {
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  margin-top: 0.4rem;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.cta {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  color: #ffffff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-inner p {
  max-width: 28rem;
}

.footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding: 1.5rem 0 2rem;
  background: #ffffff;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.footer-title {
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

.whatsapp-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.6rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #25d366, #128c7e);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.15s ease;
}

.whatsapp-float:hover,
.whatsapp-float:active {
  filter: brightness(1.05);
  transform: scale(1.05);
}

.wa-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wa-text-main {
  white-space: nowrap;
}

.wa-text-number {
  font-weight: 700;
}

/* =============================================
   RESPONSIVE BREAKPOINTS - TABLET
   ============================================= */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-slider {
    height: clamp(200px, 40vw, 280px);
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }
}

/* =============================================
   RESPONSIVE BREAKPOINTS - MOBILE
   ============================================= */

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .hero-text h1 {
    font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  }

  .section h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  }

  .section {
    padding: 2rem 0;
  }

  .grid-3,
  .grid-2,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabs-inner {
    gap: 1rem;
  }

  .hero-actions {
    gap: 0.6rem;
  }

  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  .hero-slider {
    height: clamp(200px, 60vw, 250px);
  }

  .whatsapp-float {
    right: 1rem;
    bottom: 1.2rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .wa-icon {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    width: 100%;
  }

  .values-buttons {
    gap: 0.5rem;
  }

  .btn-value {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .cta-inner p {
    font-size: 0.95rem;
  }

  .cta-inner div h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  }
}

/* =============================================
   RESPONSIVE BREAKPOINTS - SMALL MOBILE
   ============================================= */

@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 0 0.75rem;
  }

  .hero-text p {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
  }

  .section-intro {
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    width: 100%;
  }

  .btn-full {
    width: 100%;
  }

  .card {
    padding: 1rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.9rem;
  }

  .step {
    padding: 1rem;
  }

  .hero-slider {
    height: clamp(160px, 70vw, 220px);
  }

  .hero-slide-content {
    left: 0.8rem;
    bottom: 0.8rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .cta-inner {
    padding: 1.5rem 0;
  }

  .cta-inner div h2 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  }

  .cta-inner p {
    font-size: 0.9rem;
  }

  .whatsapp-float {
    right: 0.8rem;
    bottom: 1rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .wa-text-main,
  .wa-text-number {
    display: none;
  }

  .wa-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .tabs-inner {
    gap: 0.8rem;
  }

  .tab-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  details {
    padding: 0.6rem 0.75rem;
  }

  summary {
    font-size: 0.9rem;
  }

  details p {
    font-size: 0.85rem;
  }

  .testimonials .quote {
    font-size: 0.9rem;
  }

  .testimonials .author {
    font-size: 0.85rem;
  }

  .testimonials .tag {
    font-size: 0.75rem;
  }

  .chips {
    gap: 0.4rem;
  }

  .chip {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
  }

  .footer-content {
    font-size: 0.8rem;
  }

  .footer-links {
    font-size: 0.8rem;
  }
}

/* =============================================
   LANDSCAPE MODE - Small screens
   ============================================= */

@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    padding: 1.5rem 0;
  }

  .hero-slider {
    height: clamp(140px, 80vh, 200px);
  }

  .section {
    padding: 1.5rem 0;
  }
}

/* =============================================
   HIGH DPI / RETINA DISPLAYS
   ============================================= */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* =============================================
   DARK MODE SUPPORT (Optional)
   ============================================= */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --text-main: #e2e8f0;
    --text-muted: #a0aec0;
    --card-bg: #1a202c;
    --border-soft: #2d3748;
  }

  body {
    background: var(--bg);
    color: var(--text-main);
  }

  .hero {
    background: radial-gradient(circle at top left, rgba(212, 65, 255, 0.2), transparent 55%),
      radial-gradient(circle at bottom right, rgba(255, 179, 71, 0.2), transparent 55%),
      linear-gradient(135deg, #1a202c, #2d3748);
  }

  .tabs-bar {
    background: #1a202c;
  }

  .about {
    background: #1a202c;
  }

  .section-alt {
    background: #1a202c;
  }

  .card {
    background: #2d3748;
  }

  .hero-card {
    background: rgba(45, 55, 72, 0.96);
  }

  .footer {
    background: #1a202c;
  }

  details {
    background: #2d3748;
  }
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
  .whatsapp-float,
  .tabs-bar {
    display: none;
  }

  body {
    font-size: 12pt;
  }
}

/* =============================================
   ACCESSIBILITY - Reduced Motion
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* =============================================
   ACCESSIBILITY - High Contrast
   ============================================= */

@media (prefers-contrast: more) {
  .btn {
    border: 2px solid currentColor;
  }

  .card {
    border-width: 2px;
  }

  details {
    border-width: 2px;
  }
}

