/* ===== CSS VARIABLES ===== */
:root {
  --primary: #FF6B35;
  --secondary: #2D6A4F;
  --accent: #FFD166;
  --accent2: #118AB2;
  --accent3: #EF476F;
  --dark: #1A1A2E;
  --dark2: #16213E;
  --light: #F8F5F0;
  --white: #FFFFFF;
  --copy-color: #E63946;
  --lib-color: #2D6A4F;
  --copy-light: #FFF0EE;
  --lib-light: #EDF7F2;
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-display: 'Playfair Display', serif;
  --font-body: 'Nunito', sans-serif;
  --font-accent: 'Fredoka One', cursive;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden; /* contiene desbordamiento en el eje raíz */
}
body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  /*background: rgba(26,26,46,0.97);*/
  background: #ba21f1f7;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.18);
  transition: var(--transition);
}
.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 72px;
  gap: 0.5rem;
  /* NO overflow:hidden aquí — cortaba el logo */
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;        /* el logo nunca cede espacio a los links */
  text-decoration: none;
}
.nav-logo img {
  /*height: 38px;*/
  height: 50px;
  width: auto;
  flex-shrink: 0;
  border-radius: 8px;
}
.nav-logo-text {
  font-family: var(--font-accent);
  /* Escala fluid entre 320px y 960px: mínimo 0.95rem, máximo 1.45rem */
  font-size: clamp(0.95rem, 4vw, 1.45rem);
  color: var(--white);
  letter-spacing: 0.4px;
  white-space: nowrap;
  /* Nunca se oculta: el clamp garantiza que siempre cabe junto al logo+hamburguesa */
}
.nav-logo-text span { color: var(--accent); }

/* Los links de escritorio crecen y se comprimen en el espacio sobrante */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  /* flex-shrink por defecto (1) — ceden espacio si hace falta */
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 9px;
  border-radius: 8px;
  transition: var(--transition);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
  background: rgba(255,209,102,0.12);
}
.nav-links a.btn-nav {
  /*background: var(--primary);*/
  background: #6a41ea;
  color: white;
  padding: 8px 14px;
  border-radius: 24px;
}
.nav-links a.btn-nav:hover { background: #e55a25; color: white; }

/* Hamburguesa: siempre fija a la derecha, nunca se comprime */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  margin-left: 0.5rem;
  border: none;
  background: none;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 3px;
  background: white;
  border-radius: 3px;
  transition: var(--transition);
}

/* ===== HERO ===== */
#inicio {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, /*var(--dark)*/ #6969b1 0%, var(--dark2) 50%, #0F3460 100%);
  padding-top: 72px;
}
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: floatShape 8s ease-in-out infinite;
}
.shape-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; right: -150px; animation-delay: 0s; }
.shape-2 { width: 400px; height: 400px; background: var(--accent); bottom: -100px; left: -100px; animation-delay: 3s; }
.shape-3 { width: 300px; height: 300px; background: var(--accent2); top: 50%; left: 30%; animation-delay: 5s; }
@keyframes floatShape {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
/* Nombre de marca en el hero — solo visible en pantallas muy pequeñas como refuerzo */
.hero-brand-mobile {
  display: none;
  font-family: var(--font-accent);
  font-size: 2rem;
  color: var(--white);
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}
.hero-brand-mobile span { color: var(--accent); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,209,102,0.15);
  border: 1px solid rgba(255,209,102,0.3);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 24px;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero-title .highlight {
  color: var(--accent);
  display: block;
}
.hero-title .highlight-red { color: var(--primary); }
.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
}
.btn-primary:hover { background: #e55a25; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.5); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.hero-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.hero-card:hover { background: rgba(255,255,255,0.12); transform: translateY(-4px); }
.hero-card-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}
.hero-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: white;
  margin-bottom: 0.4rem;
}
.hero-card p { font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat { text-align: center; }
.stat-num { font-family: var(--font-accent); font-size: 1.8rem; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 1px; }

/* ===== SECTION COMMONS ===== */
.section { padding: 5rem 1.25rem; }
.section-inner { max-width: 1300px; margin: 0 auto; width: 100%; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.section-tag.red { background: var(--copy-light); color: var(--copy-color); }
.section-tag.green { background: var(--lib-light); color: var(--lib-color); }
.section-tag.blue { background: #EEF6FF; color: var(--accent2); }
.section-tag.orange { background: #FFF3EE; color: var(--primary); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ===== HORARIO BANNER ===== */
.horario-banner {
  background: linear-gradient(90deg, var(--dark) 0%, var(--dark2) 100%);
  padding: 1.2rem 1.25rem;
}
.horario-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.horario-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}
.horario-item span.icon { font-size: 1.2rem; }
.horario-item strong { color: var(--accent); }
.horario-divider {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.2);
}

/* ===== COPISTERÍA SECTION ===== */
#copisteria { background: white; }
.copy-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}
.copy-hero-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.copy-hero-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
}
.copy-hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(230,57,70,0.15) 0%, transparent 60%);
  border-radius: var(--radius);
}
.copy-badge {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--copy-color);
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}
.service-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-img img { transform: scale(1.08); }
.service-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
}
.service-price-badge {
  position: absolute;
  bottom: 12px; right: 12px;
  background: var(--accent);
  color: var(--dark);
  font-weight: 800;
  font-size: 1rem;
  padding: 4px 14px;
  border-radius: 20px;
}
.service-body { padding: 1.4rem; }
.service-type {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
}
.service-type.copy { color: var(--copy-color); }
.service-type.lib { color: var(--lib-color); }
.service-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.service-desc { font-size: 0.85rem; color: #777; line-height: 1.6; margin-bottom: 1rem; }
.service-prices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--light);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.price-row span:last-child { font-weight: 800; color: var(--dark); }
.btn-encargar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  border-radius: 50px;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-encargar.copy-btn {
  background: var(--copy-light);
  color: var(--copy-color);
}
.btn-encargar.copy-btn:hover { background: var(--copy-color); color: white; }
.btn-encargar.lib-btn {
  background: var(--lib-light);
  color: var(--lib-color);
}
.btn-encargar.lib-btn:hover { background: var(--lib-color); color: white; }

/* ===== LIBRERÍA SECTION ===== */
#libreria { background: var(--light); }
.lib-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

/* ===== IMPRENTA / PAPELERÍA ===== */
#imprenta { background: white; }
.cat-tabs {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.cat-tab {
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid #ddd;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  background: white;
}
.cat-tab.active, .cat-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===== FORMULARIO ENCARGOS ===== */
#encargos {
  background: linear-gradient(135deg, #1A1A2E 0%, #0F3460 100%);
  position: relative;
  overflow: hidden;
}
#encargos::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,107,53,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.encargos-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}
.encargos-info .section-title { color: white; }
.encargos-info .section-desc { color: rgba(255,255,255,0.65); }
.info-features { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.info-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  /*color: rgba(255,255,255,0.8);*/
  color: rgba(0,0,0,0.8);
  font-size: 0.92rem;
}
.info-feature .feat-icon {
  width: 36px; /*height: 36px;*/ height: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.form-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.form-subtitle { font-size: 0.9rem; color: #888; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.form-label .required { color: var(--copy-color); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  background: #fafafa;
  outline: none;
  color: var(--dark);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(255,107,53,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-select { appearance: none; cursor: pointer; }

/* File upload */
.upload-zone {
  border: 2px dashed #ddd;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: #fafafa;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(255,107,53,0.04);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-text { font-weight: 700; font-size: 0.95rem; color: var(--dark); }
.upload-subtext { font-size: 0.8rem; color: #999; margin-top: 0.3rem; }
.files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1rem;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.file-icon { font-size: 1.2rem; }
.file-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: #999; font-size: 0.78rem; }
.file-remove {
  width: 24px; height: 24px;
  border: none;
  background: var(--copy-color);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.file-remove:hover { background: #c0392b; transform: scale(1.1); }
.form-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #FF8C42 100%);
  color: white;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1.5rem;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
  letter-spacing: 0.3px;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.5); }
.form-submit:active { transform: translateY(0); }
.form-privacy {
  text-align: center;
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.8rem;
}
.form-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #0369a1;
  margin-bottom: 1.5rem;
}

/* ===== CONTACTO ===== */
#contacto { background: var(--light); overflow: hidden; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  width: 100%;
}
/* Evita que las columnas grid se expandan más allá del contenedor */
.contact-grid > * { min-width: 0; }
.contact-info-items { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.contact-item:hover { transform: translateX(4px); }
.contact-item-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.ci-orange { background: #fff3ee; }
.ci-green { background: #edf7f2; }
.ci-blue { background: #eef6ff; }
.ci-yellow { background: #fffbe6; }
.contact-item-text { min-width: 0; flex: 1; }
.contact-item-text h4 { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.contact-item-text p {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
  word-break: break-word;
}
.map-placeholder {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 350px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  font-size: 3rem;
  color: #ddd;
}
.map-placeholder p { font-size: 0.9rem; color: #aaa; text-align: center; padding: 0 1rem; }

/* ===== HORARIO DETALLADO ===== */
.horario-table-wrap {
  background: white;
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
  width: 100%;
  box-sizing: border-box;
}
.horario-table { width: 100%; border-collapse: collapse; min-width: 360px; }
.horario-table th, .horario-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.88rem;
  white-space: nowrap;
}
.horario-table th { background: var(--dark); color: white; font-weight: 700; font-size: 0.78rem; letter-spacing: 1px; }
.horario-table tr:last-child td { border-bottom: none; }
.horario-table tr:hover td { background: var(--light); }
.horario-status { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: #22c55e; }
.dot-orange { background: #f97316; }

/* ===== FLOATING BUTTONS ===== */
.float-whatsapp {
  position: fixed;
  bottom: 2rem;
  left: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.float-whatsapp a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  transition: var(--transition);
  white-space: nowrap;
}
.float-whatsapp a:hover { background: #1da851; transform: scale(1.05); box-shadow: 0 8px 30px rgba(37,211,102,0.6); }
.float-whatsapp .wa-icon { font-size: 1.3rem; }
.wa-pulse {
  width: 10px; height: 10px;
  background: #25D366;
  border-radius: 50%;
  position: absolute;
  top: -2px; right: -2px;
  animation: pulse 2s infinite;
}
.float-scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 999;
  width: 48px; height: 48px;
  background: var(--dark);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(10px);
}
.float-scroll-top.visible { opacity: 1; transform: translateY(0); }
.float-scroll-top:hover { background: var(--primary); transform: translateY(-3px); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(37,211,102,0); }
}

/* ===== FOOTER ===== */
footer {
  /*background: var(--dark);*/
  background: #6a41ea;
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img {
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 8px;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { color: white; font-weight: 700; margin-bottom: 1rem; font-size: 0.9rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col ul li a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.8rem; }
.footer-bottom strong { color: var(--accent); }
.social-links { display: flex; gap: 0.8rem; }
.social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
}
.social-link:hover { background: var(--primary); color: white; transform: translateY(-2px); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 100px; right: 2rem;
  z-index: 9999;
  background: var(--dark);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateX(200%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  max-width: 350px;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid #22c55e; }
.toast.error { border-left: 4px solid var(--copy-color); }

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */

/* --- 1100px: reducir fuente de links antes de pasar a hamburguesa --- */
@media (max-width: 1100px) {
  .nav-links a:not(.btn-nav) { font-size: 0.98rem; padding: 8px 6px; }
}

/* --- 960px: activar hamburguesa --- */
@media (max-width: 960px) {
  .nav-hamburger { display: flex; }

  /* Los links se ocultan y aparecen en panel vertical al abrir */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--dark);
    padding: 1.5rem 1.5rem 2.5rem;
    gap: 0.2rem;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }

  /* Items del menú hamburguesa: más grandes y separados */
  .nav-links li { width: 100%; }
  .nav-links a {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links a:last-of-type { border-bottom: none; }
  .nav-links a:hover, .nav-links a.active {
    background: rgba(255,209,102,0.14);
    color: var(--accent);
    padding-left: 22px;
  }
  .nav-links a.btn-nav {
    margin-top: 0.8rem;
    background: var(--primary);
    color: white;
    justify-content: center;
    border-radius: 50px;
    border-bottom: none;
  }
  .nav-links a.btn-nav:hover { background: #e55a25; padding-left: 16px; }

  /* El logo escala suavemente: entre 320px y 960px siempre visible */
  .nav-logo-text {
    font-size: clamp(0.95rem, 4.5vw, 1.4rem);
  }
}

/* --- 1024px: colapsar grids de contenido --- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 2rem; }
  .hero-cards { grid-template-columns: repeat(3, 1fr); }
  .copy-header, .lib-header { grid-template-columns: 1fr; gap: 2rem; }
  .encargos-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* --- 768px: ajustes generales móvil --- */
@media (max-width: 768px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .horario-inner { flex-direction: column; gap: 1rem; }
  .horario-divider { display: none; }
  .form-card { padding: 1.5rem 1rem; }
  .float-whatsapp a { padding: 10px 14px; font-size: 0.8rem; }
  .horario { display: none; }
}

/* --- 480px: móvil pequeño --- */
@media (max-width: 480px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline { width: 100%; justify-content: center; }
  .cat-tabs { gap: 0.4rem; }
  .cat-tab { padding: 7px 12px; font-size: 0.78rem; }
  .price-row { flex-wrap: wrap; gap: 4px; }
  .toast { right: 0.75rem; left: 0.75rem; max-width: 100%; }
}

/* --- 360px: pantallas muy pequeñas (Galaxy Fold, etc.)
     El texto "LibroCopia" NUNCA se oculta del nav.
     El clamp garantiza que logo+texto+hamburguesa = ~210px, suficiente a 320px.
     El .hero-brand-mobile aparece solo por debajo de 360px como refuerzo visual. --- */
@media (max-width: 360px) {
  .nav-logo img { height: 32px; }
  .hero-brand-mobile { display: block; }
  .hero-cards { grid-template-columns: 1fr; }
  .hero-badge { font-size: 0.75rem; padding: 5px 10px; }
}
