/* ============================================================
   MOCHICA - CHIMÚ HUANCHACO  |  Visual Enhancements v2
   Polished animations, refined typography, clean spacing
   ============================================================ */

/* ---------- 1. KEYFRAME ANIMATIONS ---------- */

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216,140,45,0); }
  50%       { box-shadow: 0 0 0 8px rgba(216,140,45,0.18); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(216,140,45,0.2); }
  50%       { border-color: rgba(216,140,45,0.65); }
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

/* ---------- 2. BODY & LAYOUT FOUNDATION ---------- */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--color-claro);
  overflow-x: hidden;
}

/* Thin decorative line accent at very top of page */
body::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primario), var(--color-secundario), var(--color-primario));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

/* Smooth section padding rhythm */
.container-fluid.py-5 {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

/* ---------- 3. NAVBAR — polish & logo wrap fix ---------- */

.nav-bar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar-brand .logotipo-texto {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: 0.12rem;
  max-width: 260px;
  white-space: normal;
}

.navbar-dark .navbar-nav .nav-link {
  font-size: 0.85rem;
  letter-spacing: 0.1rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  transition: color 0.25s ease;
}

/* ---------- 4. HERO CAROUSEL ---------- */

.carousel-item img {
  filter: brightness(72%) saturate(1.1);
  transition: filter 0.6s ease;
}

.carousel-item.active img {
  filter: brightness(72%) saturate(1.15);
}

.carousel-caption {
  bottom: 12%;
  animation: fadeSlideUp 0.75s ease both;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
}

.carousel-caption h1 {
  font-size: 3rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  letter-spacing: 0.15rem;
}

.carousel-caption h2 {
  font-size: 1.1rem;
  font-family: var(--font-base);
  letter-spacing: 0.05rem;
  opacity: 0.9;
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-secundario);
  opacity: 0.5;
  border: none;
  transition: opacity 0.3s, transform 0.3s;
}

.carousel-indicators .active {
  opacity: 1;
  transform: scale(1.3);
}

/* ---------- 5. BADGE IDENTITY — floating accent ---------- */

.badge-identity {
  font-size: 0.72rem;
  letter-spacing: 0.12rem;
  border: 1px solid rgba(216,140,45,0.35);
  animation: floatBadge 3s ease-in-out infinite;
}

/* ---------- 6. SECTION TITLES ---------- */

.section-title {
  margin-bottom: 2.5rem;
}

.section-title h1,
.section-title h2 {
  font-family: var(--font-titular);
  color: var(--color-oscuro);
  font-weight: 700;
  line-height: 1.2;
}

.section-title h1 {
  font-size: 2.6rem;
}

/* Decorative underline under section titles */
.section-title h1::after,
.section-title h2.display-4::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primario), var(--color-secundario));
  border-radius: 2px;
  margin: 0.85rem auto 0;
}

.section-title:not(.text-center) h1::after,
.section-title:not(.text-center) h2.display-4::after {
  margin-left: 0;
}

/* ---------- 7. CARDS — consistent polish ---------- */

.card-shadow,
.service-card,
.menu-item,
.testimonial-item,
.contact-info {
  border: 1px solid rgba(31,27,26,0.06);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.35s ease;
  will-change: transform;
}

.card-shadow:hover,
.service-card:hover,
.menu-item:hover {
  transform: translateY(-7px) scale(1.01);
  box-shadow: 0 36px 72px rgba(31,27,26,0.14);
  border-color: rgba(216,140,45,0.2);
}

.testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 56px rgba(31,27,26,0.14);
  border-color: rgba(216,140,45,0.25);
}

/* Service card icon pulse on hover */
.service-card:hover .fa,
.service-card:hover .fas,
.service-card:hover .fab {
  animation: pulseGold 1.2s ease infinite;
}

/* Service icon spacing */
.service-card h4 {
  font-family: var(--font-titular);
  color: var(--color-oscuro);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* ---------- 8. TESTIMONIAL CARD ---------- */

.testimonial-item {
  position: relative;
  padding-top: 2.25rem;
}

/* Opening quote decoration */
.testimonial-item p::before {
  content: '"';
  display: block;
  font-family: var(--font-titular);
  font-size: 4rem;
  color: rgba(216,140,45,0.25);
  line-height: 0.6;
  margin-bottom: 0.5rem;
}

/* ---------- 9. VALUE CARDS (Home page) ---------- */

.card-shadow.bg-white {
  border-left: 4px solid var(--color-primario);
  border-top: none;
}

.card-shadow.bg-white:hover {
  border-left-color: var(--color-secundario);
}

/* ---------- 10. TIMELINE ---------- */

.timeline {
  border-left: 3px solid var(--color-secundario);
  padding-left: 1.75rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  animation: fadeSlideIn 0.5s ease both;
}

.timeline-item::before {
  width: 14px;
  height: 14px;
  left: -2.3rem;
  top: 0.3rem;
  border: 3px solid var(--color-claro);
  box-shadow: 0 0 0 2px var(--color-secundario);
  background: var(--color-secundario);
  transition: background 0.25s ease, transform 0.25s ease;
}

.timeline-item:hover::before {
  background: var(--color-primario);
  box-shadow: 0 0 0 2px var(--color-primario);
  transform: scale(1.2);
}

.timeline-item h5 {
  font-family: var(--font-titular);
  font-size: 1rem;
  color: var(--color-primario);
  margin-bottom: 0.25rem;
}

/* ---------- 11. BUTTONS ---------- */

.btn {
  letter-spacing: 0.06rem;
  font-size: 0.875rem;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.25s ease,
              background-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(31,27,26,0.22);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primario) 0%, #c9562f 100%);
  border: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #c9562f 0%, var(--color-primario) 100%);
  border: none;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secundario) 0%, #c97f24 100%);
  border: none;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: linear-gradient(135deg, #c97f24 0%, var(--color-secundario) 100%);
  border: none;
}

/* ---------- 12. FORMS ---------- */

.form-control,
.custom-select {
  background: #faf8f4;
  border: 1.5px solid rgba(31,27,26,0.15);
  border-radius: 0.6rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.92rem;
  color: var(--color-oscuro);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-control:focus,
.custom-select:focus {
  background: #fff;
  border-color: var(--color-secundario);
  box-shadow: 0 0 0 3px rgba(216,140,45,0.2);
  outline: none;
}

label {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  color: var(--color-oscuro);
  margin-bottom: 0.35rem;
}

/* ---------- 13. PAGE HEADER ---------- */

.page-header {
  background-image:
    linear-gradient(135deg, rgba(31,27,26,0.88) 0%, rgba(184,79,46,0.55) 60%, rgba(31,27,26,0.78) 100%),
    url('../images2/detalle-iconografia-mochica.jpg');
  background-size: cover;
  background-position: center 30%;
  position: relative;
  overflow: hidden;
}

/* Subtle geometric pattern overlay on page-header */
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(216,140,45,0.04) 0px,
    rgba(216,140,45,0.04) 1px,
    transparent 1px,
    transparent 40px
  );
  pointer-events: none;
}

.page-header h1 {
  font-family: var(--font-titular);
  font-size: 3rem;
  letter-spacing: 0.2rem;
  text-shadow: 0 3px 16px rgba(0,0,0,0.5);
  animation: fadeSlideUp 0.7s ease both;
  position: relative;
  z-index: 2;
}

/* Gold underline accent on page header title */
.page-header h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secundario), transparent);
  border-radius: 2px;
  margin: 0.6rem auto 0;
}

/* ---------- 14. FOOTER ---------- */

.footer {
  background: linear-gradient(180deg, #1a0f0c 0%, #0d0806 100%);
  border-top: 2px solid var(--color-primario);
}

.footer h4 {
  font-family: var(--font-titular);
  font-size: 1rem;
  color: var(--color-secundario) !important;
  letter-spacing: 0.15rem;
  margin-bottom: 1.25rem;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(235,225,211,0.85) !important;
}

.footer p .fa,
.footer p .fas {
  color: var(--color-secundario);
  width: 18px;
}

/* ---------- 15. CTA / OFFER BANNER ---------- */

.offer {
  background-image:
    linear-gradient(rgba(20,12,10,0.88), rgba(20,12,10,0.88)),
    url('../images2/banner-taller-alfareria.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  border-top: 2px solid rgba(216,140,45,0.3);
  border-bottom: 2px solid rgba(216,140,45,0.3);
}

.offer .display-3 {
  font-size: 2.4rem;
  letter-spacing: 0.08rem;
}

.offer h4 {
  font-family: var(--font-base);
  font-size: 1.05rem;
  letter-spacing: 0.04rem;
  opacity: 0.88;
  font-weight: 400;
}

/* ---------- 16. HOME MISSION SECTION ---------- */

.mission-img-col {
  min-height: 480px;
  border-radius: 1.5rem;
  overflow: hidden;
}

.mission-img-col img {
  border-radius: 1.5rem;
  transition: transform 0.6s ease;
}

.mission-img-col:hover img {
  transform: scale(1.04);
}

/* ---------- 17. BACK-TO-TOP BUTTON ---------- */

.back-to-top {
  border-radius: 50%;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--color-secundario), var(--color-primario));
  box-shadow: 0 8px 24px rgba(184,79,46,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 32px rgba(184,79,46,0.45);
}

/* ---------- 18. BG-LIGHT SECTION OVERRIDE ---------- */

.bg-light {
  background-color: #f0ebe1 !important;
}

/* ---------- 19. AOS CUSTOM EASING ---------- */

[data-aos] {
  transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* ---------- 20. SCROLLBAR POLISH ---------- */

::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--color-neutro);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primario);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-secundario);
}

/* ---------- 21. TEXT SELECTION ---------- */

::selection {
  background: rgba(216,140,45,0.3);
  color: var(--color-oscuro);
}

/* ---------- 22. RESPONSIVE TOUCH-UPS ---------- */

@media (max-width: 991.98px) {
  .page-header h1 { font-size: 2.25rem; }
  .carousel-caption h1 { font-size: 2.2rem; }
  .navbar-brand .logotipo-texto {
    font-size: 1.05rem;
    max-width: 200px;
  }
  .offer { background-attachment: scroll; }
}

@media (max-width: 767.98px) {
  .page-header h1 { font-size: 1.8rem; }
  .carousel-caption { padding: 1.25rem 1.5rem; }
  .section-title h1 { font-size: 2rem; }
  .offer .display-3 { font-size: 1.75rem; }
}

@media (max-width: 575.98px) {
  .navbar-brand .logotipo-texto { font-size: 0.9rem; max-width: 170px; }
  .page-header h1 { font-size: 1.5rem; letter-spacing: 0.1rem; }
}

/* ---------- 23. UTILS ---------- */

/* Consistent link colour in prose */
p a { color: var(--color-primario); }
p a:hover { color: var(--color-secundario); }

/* Remove Bootstrap's default root override so our palette wins */
#root {
  width: 100%;
  max-width: 100%;
  border: none;
  text-align: left;
  flex-direction: column;
  min-height: 100svh;
  display: flex;
}
