/* ============================================
   SYD Constructores - Custom Styles
   Matches original Salient/Nectar theme aesthetic
   ============================================ */

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

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 26px;
  color: #676767;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: #444;
  font-weight: 600;
}

/* --- Alpine.js cloak --- */
[x-cloak] {
  display: none !important;
}

/* ============================================
   HEADER
   ============================================ */
#site-header {
  transition: all 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}

#site-header.header-scrolled {
  box-shadow: 0 3px 45px rgba(0, 0, 0, 0.15);
}

/* Animated underline on nav links (matching original data-lhe="animated_underline") */
.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: #de2431;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.33, 1);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: #444;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero-slider {
  height: 650px;
  min-height: 400px;
}

/* Ken Burns effect on slide backgrounds */
.hero-slider .swiper-slide .slide-bg {
  transform: scale(1.35);
  transition: none;
}

.hero-slider .swiper-slide-active .slide-bg {
  animation: kenBurns 11s cubic-bezier(0.1, 0.2, 0.7, 1) forwards;
}

@keyframes kenBurns {
  0% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Hero text — force white over base h2 color */
.hero-slider h2 {
  color: #fff;
}

/* Fancy box headings — force white over base heading color */
.fancy-box h3 {
  color: #fff;
}

/* Hero text animations */
.hero-slider .swiper-slide .slide-content {
  opacity: 0;
  transform: translateY(40px);
}

.hero-slider .swiper-slide-active .slide-content {
  animation: fadeUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.hero-slider .swiper-slide-active .slide-content-delay {
  animation: fadeUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) 0.3s forwards;
}

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

/* Swiper pagination — see-through style */
.hero-slider .swiper-pagination {
  bottom: 30px !important;
}

.hero-slider .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  opacity: 1;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.33, 1);
  margin: 0 5px !important;
}

.hero-slider .swiper-pagination-bullet-active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.15);
}

/* Scroll indicator */
.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(8px) translateX(-50%); }
}

/* ============================================
   SECTION STYLES
   ============================================ */

/* --- About section cascading images --- */
.cascading-images .image-primary {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.33, 1);
}

.cascading-images:hover .image-primary {
  transform: scale(1.02);
}

/* --- Accordion / Toggle (matching original minimal_small) --- */
.accordion-item {
  border-bottom: 1px solid #e8e8e8;
}

.accordion-item:first-child {
  border-top: 1px solid #e8e8e8;
}

.accordion-toggle {
  transition: color 0.3s ease;
}

.accordion-toggle:hover {
  color: #de2431;
}

.accordion-toggle[aria-expanded="true"] {
  color: #de2431;
}

/* ============================================
   FANCY BOX / SCENARIO CARDS
   (matching data-style="hover_desc" + data-bg-animation="long_zoom")
   ============================================ */
.fancy-box {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
}

.fancy-box .fancy-bg {
  transition: transform 6s cubic-bezier(0.1, 0.2, 0.7, 1);
  will-change: transform;
}

.fancy-box:hover .fancy-bg {
  transform: scale(1.15);
}

.fancy-box .fancy-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.05) 100%);
  transition: background 0.5s ease;
}

.fancy-box:hover .fancy-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.1) 100%);
}

.fancy-box .fancy-content {
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.33, 1);
}

.fancy-box .fancy-desc {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 1, 0.33, 1),
              opacity 0.4s ease 0.1s;
}

.fancy-box:hover .fancy-content {
  transform: translateY(-8px);
}

.fancy-box:hover .fancy-desc {
  max-height: 200px;
  opacity: 1;
}

/* ============================================
   POST GRID / CASA CARDS
   (matching data-style='content_overlaid', data-hover-effect="slow_zoom")
   ============================================ */
.casa-card {
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1),
              transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}

.casa-card:hover {
  box-shadow: 0 19px 35px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.casa-card .casa-card-bg {
  transition: transform 5s cubic-bezier(0.1, 0.2, 0.7, 1);
  will-change: transform;
}

.casa-card:hover .casa-card-bg {
  transform: scale(1.08);
}

/* Card text overlay - bottom left shadow style */
.casa-card .card-overlay {
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    transparent 100%);
}

.casa-card .card-title {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* Category indicator bar */
.casa-card .category-bar {
  width: 30px;
  height: 3px;
  background: #de2431;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.33, 1);
}

.casa-card:hover .category-bar {
  width: 50px;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox-backdrop {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ============================================
   CONTACT FORM (matching original white card + depth shadow)
   ============================================ */
.contact-section {
  background: #f4f4f4;
}

.contact-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 27px 45px -10px rgba(0, 0, 0, 0.18);
}

.contact-input {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  padding: 14px 18px;
  border-radius: 5px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  color: #444;
  background: #fff;
}

.contact-input:focus {
  border-color: #de2431;
  box-shadow: 0 0 0 3px rgba(222, 36, 49, 0.1);
  outline: none;
}

.contact-input::placeholder {
  color: #a0a0a0;
}

/* ============================================
   BUTTONS (matching original Nectar button style)
   ============================================ */
.btn-primary {
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.5px;
  padding: 13px 28px;
  border-radius: 5px;
  transition: opacity 0.45s cubic-bezier(0.25, 1, 0.33, 1),
              background-color 0.3s ease,
              transform 0.3s ease,
              box-shadow 0.3s ease;
  text-transform: uppercase;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-see-through {
  background: transparent;
  border: 2px solid currentColor;
  padding: 11px 26px;
}

.btn-see-through:hover {
  background: #de2431;
  border-color: #de2431;
  color: #fff;
}

/* ============================================
   GUARANTEES
   ============================================ */
.guarantee-card {
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.33, 1),
              box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}

.guarantee-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 19px 35px rgba(0, 0, 0, 0.11);
}

/* ============================================
   FOOTER
   ============================================ */
#site-footer {
  font-size: 14px;
  line-height: 26px;
}

#site-footer a {
  transition: color 0.3s ease;
}

#site-footer a:hover {
  color: #de2431;
}

/* ============================================
   WHATSAPP BUTTON
   ============================================ */
.whatsapp-btn {
  animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6); }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.33, 1),
              transform 0.6s cubic-bezier(0.25, 1, 0.33, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children animation */
.animate-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.33, 1),
              transform 0.5s cubic-bezier(0.25, 1, 0.33, 1);
}

.animate-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.animate-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.animate-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }

.animate-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PROSE OVERRIDES
   ============================================ */
.prose {
  color: #676767;
  font-size: 14px;
  line-height: 26px;
}

.prose strong {
  color: #444;
  font-weight: 600;
}

.prose a {
  color: #de2431;
  text-decoration: none;
  transition: color 0.3s ease;
}

.prose a:hover {
  color: #b81d28;
}

/* ============================================
   LINE CLAMP UTILITIES
   ============================================ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   FOCUS STYLES (accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #de2431;
  outline-offset: 2px;
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */
@media (max-width: 1000px) {
  .hero-slider {
    height: 500px;
    min-height: 350px;
  }
}

@media (max-width: 767px) {
  .hero-slider {
    height: 400px;
    min-height: 300px;
  }

  body {
    font-size: 13px;
    line-height: 24px;
  }
}
