/**
 * Home Page Features - Main Styles
 * Version: 1.0.0
 */

/* ==========================================================================
   Carousel Styles
   ========================================================================== */

.hpf-carousel-wrapper {
  position: relative;
  clear: both;
}

.hpf-carousel-container {
  position: relative;
  max-width: 1352px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #fff;
}

.hpf-carousel-slides {
  position: relative;
  width: 100%;
  background: #f5f5f5;
}

.hpf-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto; /* don't force 100% height */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  display: grid;
  place-items: center;
}

.hpf-carousel-slide.active {
  opacity: 1;
  position: relative; /* ensure active slide participates in height */
}

.hpf-carousel-image {
  width: 100%;
  height: auto; /* key change: let image define height */
  max-height: 100%; /* ensure it never exceeds slide area in fixed mode */
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.hpf-carousel-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
  color: white;
  padding: 25px 30px;
  border-radius: 8px;
  max-width: 50%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hpf-carousel-title {
  margin: 0 0 12px 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hpf-carousel-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.95;
}

/* Carousel Controls */
.hpf-carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
  color: white;
  border: none;
  padding: 18px 22px;
  cursor: pointer;
  font-size: 28px;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
}

.hpf-carousel-control:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hpf-carousel-control:active {
  transform: translateY(-50%) scale(0.95);
}

.hpf-carousel-control:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.hpf-prev {
  left: 25px;
}

.hpf-next {
  right: 25px;
}

/* Carousel Indicators */
.hpf-carousel-indicators {
  position: absolute;
  bottom: 25px;
  right: 25px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hpf-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.hpf-indicator:hover {
  transform: scale(1.3);
  border-color: white;
}

.hpf-indicator.active {
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hpf-indicator:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* ==========================================================================
   WhatsApp Styles
   ========================================================================== */

/* Floating WhatsApp Button */
.hpf-whatsapp-floating {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  animation: hpf-whatsapp-pulse 3s infinite ease-in-out;
}

.hpf-whatsapp-button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 14px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.hpf-whatsapp-button:hover {
  background: linear-gradient(135deg, #128c7e, #0d7377);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
  color: white;
  text-decoration: none;
}

.hpf-whatsapp-button:active {
  transform: translateY(-1px);
}

.hpf-whatsapp-button:focus {
  outline: 3px solid rgba(37, 211, 102, 0.5);
  outline-offset: 2px;
}

.hpf-whatsapp-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.hpf-whatsapp-text {
  white-space: nowrap;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Inline WhatsApp Button */
.hpf-whatsapp-inline {
  display: inline-block;
  margin: 15px 0;
}

.hpf-whatsapp-button-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.hpf-whatsapp-button-inline:hover {
  background: linear-gradient(135deg, #128c7e, #0d7377);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.5);
}

/* Custom Button Style */
.hpf-whatsapp-button-style {
  display: inline-block;
  margin: 15px 0;
}

.hpf-whatsapp-button-custom {
  display: inline-block;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
  border: none;
  cursor: pointer;
}

.hpf-whatsapp-button-custom:hover {
  background: linear-gradient(135deg, #128c7e, #0d7377);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.5);
}

/* Pulse animation for floating button */
@keyframes hpf-whatsapp-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Loading state */
.hpf-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: not-allowed;
}

.hpf-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: hpf-spin 1s linear infinite;
}

@keyframes hpf-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet Styles */
@media (max-width: 1024px) {
  .hpf-carousel-container {
    max-width: 95%;
    margin: 0 auto;
  }

  .hpf-carousel-content {
    max-width: 60%;
    padding: 20px 25px;
  }

  .hpf-carousel-title {
    font-size: 1.6rem;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .hpf-carousel-content {
    max-width: 80%;
    padding: 18px 20px;
    bottom: 20px;
    left: 20px;
  }

  .hpf-carousel-title {
    font-size: 1.4rem;
  }

  .hpf-carousel-description {
    font-size: 0.9rem;
  }

  .hpf-carousel-control {
    padding: 14px 18px;
    font-size: 24px;
  }

  .hpf-prev {
    left: 15px;
  }

  .hpf-next {
    right: 15px;
  }

  .hpf-carousel-indicators {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }

  .hpf-indicator {
    width: 12px;
    height: 12px;
  }

  /* WhatsApp Mobile Styles */
  .hpf-whatsapp-floating {
    bottom: 20px;
    right: 20px;
  }

  .hpf-whatsapp-button {
    padding: 12px 16px;
    font-size: 13px;
  }

  .hpf-whatsapp-text {
    display: none; /* Hide text on mobile, only show icon */
  }

  .hpf-whatsapp-button {
    border-radius: 50%;
    width: 58px;
    height: 58px;
    padding: 0;
    justify-content: center;
  }

  .hpf-whatsapp-icon {
    width: 22px;
    height: 22px;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .hpf-carousel-content {
    position: static;
    background: rgba(0, 0, 0, 0.9);
    max-width: 100%;
    margin-top: -80px;
    position: relative;
    z-index: 5;
    border-radius: 0 0 10px 10px;
  }

  .hpf-carousel-title {
    font-size: 1.2rem;
  }

  .hpf-carousel-description {
    font-size: 0.85rem;
  }

  .hpf-carousel-control {
    padding: 12px 16px;
    font-size: 20px;
  }

  /* WhatsApp Small Mobile */
  .hpf-whatsapp-floating {
    bottom: 15px;
    right: 15px;
  }

  .hpf-whatsapp-button {
    width: 52px;
    height: 52px;
  }

  .hpf-whatsapp-icon {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   Accessibility & Print Styles
   ========================================================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hpf-carousel-control {
    background: black;
    border: 2px solid white;
  }

  .hpf-indicator {
    border-color: white;
    background: black;
  }

  .hpf-indicator.active {
    background: white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hpf-carousel-slide {
    transition: none;
  }

  .hpf-whatsapp-floating {
    animation: none;
  }

  .hpf-carousel-control,
  .hpf-whatsapp-button,
  .hpf-whatsapp-button-inline,
  .hpf-whatsapp-button-custom {
    transition: none;
  }
}

/* Print styles */
@media print {
  .hpf-whatsapp-floating,
  .hpf-carousel-control,
  .hpf-carousel-indicators {
    display: none !important;
  }

  .hpf-carousel-slide {
    position: relative !important;
    opacity: 1 !important;
    height: auto !important;
  }

  .hpf-carousel-slides {
    height: auto !important;
  }

  .hpf-carousel-content {
    position: relative !important;
    background: #f0f0f0 !important;
    color: black !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   Footer (dark) styles to match reference
   These are lightweight and scoped to common footer classes
   ========================================================================== */
.site-footer {
  background-color: #111315; /* near-black background */
  color: #98a2b3; /* muted gray text */
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-footer .footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem 3rem;
  margin: 2rem 0;
}

.site-footer .widget-title,
.site-footer .widgettitle,
.site-footer h2,
.site-footer h3 {
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin: 0.4rem 0;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff;
  text-decoration: none;
}

.site-footer .footer-navigation {
  margin-top: 1rem;
}
.site-footer .footer-navigation a {
  color: #cbd5e1;
}
.site-footer .footer-navigation a:hover {
  color: #fff;
}

.site-footer .site-info {
  color: #94a3b8;
  font-size: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .site-footer {
    padding: 2rem 0;
  }
  .site-footer .footer-columns {
    gap: 1.25rem 1.5rem;
  }
}
