/**
 * Mannavilla — shared footer + back-to-top (same markup pattern as index.php).
 *
 * Canonical site contact — use these strings in HTML wherever this sheet is loaded
 * (and keep other public footers in sync):
 *   Address: 123 Luxury Avenue, New York, USA
 *   Phone:   +1 (234) 567-8901   (tel: +12345678901)
 *   Email:   info@mannavilla.com
 *
 * Newsletter intro (footer): “Subscribe to receive updates on exclusive properties.”
 *
 * Requires :root from the page stylesheet: --primary, --primary-dark, --secondary,
 * --accent, --white, --transition, --shadow-md, --shadow-lg.
 */

/* Footer “Get in touch” icons (same as index home) */
.location-icon {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.location-icon::before {
  content: "📍";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
}

.phone-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.362 1.903.7 2.81a2 2 0 0 1-.45 2.11L8 10a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.574 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.footer .phone-icon {
  margin-right: 0;
}

.facebook-icon,
.twitter-icon,
.instagram-icon,
.youtube-icon,
.linkedin-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  display: inline-block;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.facebook-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z'/%3E%3C/svg%3E");
}

.twitter-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z'/%3E%3C/svg%3E");
}

.instagram-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Crect x='2' y='2' width='20' height='20' rx='5' ry='5'%3E%3C/rect%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Cline x1='17.5' y1='6.5' x2='17.51' y2='6.5'/%3E%3C/svg%3E");
}

.youtube-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z'/%3E%3Cpolygon points='9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02'/%3E%3C/svg%3E");
}

.linkedin-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z'/%3E%3Crect x='2' y='9' width='4' height='12'/%3E%3Ccircle cx='4' cy='4' r='2'/%3E%3C/svg%3E");
}

/* Footer layout (from index.css) */
.footer {
  background: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--primary-dark) 100%
  );
  color: rgba(255, 255, 255, 0.8);
  padding-top: 5rem;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--primary),
    var(--accent)
  );
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.footer-col h5 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  position: relative;
  display: inline-block;
}

.footer-col h5::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-col p {
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.email-icon {
  width: 16px;
  height: 16px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
  background: var(--accent);
  color: var(--secondary);
  transform: translateY(-3px) rotate(360deg);
  border-color: var(--white);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  display: inline-block;
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.2rem;
}

.footer-links a::before {
  content: "→";
  position: absolute;
  left: 0;
  opacity: 0;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.footer-links a:hover::before {
  opacity: 1;
  left: -5px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.1);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.newsletter-form {
  position: relative;
  margin-top: 1rem;
}

.newsletter-form .form-control {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 100px;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  border: 2px solid var(--accent);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: var(--transition);
}

.newsletter-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .form-control:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

.newsletter-form .btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 2px solid rgba(238, 210, 121, 0.2);
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.copyright a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copyright a:hover {
  color: var(--white);
}

.footer-menu {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  position: relative;
  padding-right: 1.5rem;
  border-right: 2px solid rgba(238, 210, 121, 0.3);
  line-height: 1;
}

.footer-menu a:last-child {
  padding-right: 0;
  border-right: none;
}

.footer-menu a:hover {
  color: var(--accent);
}

/* Back to top (index) */
.back-to-top {
  position: fixed;
  right: 40px;
  bottom: 100px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  z-index: 99;
  transition: var(--transition);
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-color: var(--white);
}

@media (max-width: 991.98px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-menu {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 20px;
    bottom: 80px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}
