/* front/static/css/public_site.css */
/* Styles for MAURICIO Sites Public Website Renderer */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: #F8FAFC;
  color: #0F172A;
  line-height: 1.6;
  padding-bottom: 4rem;
}

.pub-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 1.5rem;
}

/* Floating Banner if in Preview Mode */
.preview-mode-bar {
  background: #F59E0B;
  color: #FFFFFF;
  text-align: center;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Blocks Layout */
.pub-block {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid #E2E8F0;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04);
}

.pub-block__title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #0F172A;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

/* Hero Block */
.pub-hero {
  position: relative;
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  border: 1px solid #E2E8F0;
}

.pub-hero__logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border: 3px solid #FFFFFF;
}

.pub-hero__name {
  font-size: 2rem;
  font-weight: 900;
  color: #0F172A;
  margin-bottom: 0.35rem;
  letter-spacing: -0.5px;
}

.pub-hero__desc {
  font-size: 0.95rem;
  color: #0F172A;
  font-weight: 600;
  opacity: 0.75;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* Primary Action Buttons */
.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.pub-btn--primary {
  background: var(--brand-color, #0052FF);
  color: #FFFFFF;
}

.pub-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--brand-glow, rgba(0, 82, 255, 0.25));
  filter: brightness(1.05);
}

.pub-btn--whatsapp {
  background: #25D366;
  color: #FFFFFF;
}

.pub-btn--whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

/* Social Grid */
.pub-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.pub-social-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
  transition: all 0.2s ease;
  text-decoration: none;
}

.pub-social-item:hover {
  background: #FFFFFF;
  border-color: var(--brand-color, #0052FF);
  color: var(--brand-color, #0052FF);
}

/* Round Social Icon Buttons */
.pub-social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-color, #0052FF);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px var(--brand-glow, rgba(0, 82, 255, 0.2));
}

.pub-social-icon-btn:hover {
  transform: translateY(-4px) scale(1.12) rotate(6deg);
  background: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.35);
}

/* Photos Grid & Hover Zoom */
.pub-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.pub-photo-wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.pub-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pub-photo-caption-hover {
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.pub-photo-wrapper:hover .pub-photo-img {
  transform: scale(1.08);
}

.pub-photo-wrapper:hover .pub-photo-overlay {
  opacity: 1;
}

/* Elegant Lightbox Modal */
.pub-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: pubModalFadeIn 0.25s ease;
}

.pub-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pub-modal-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.pub-modal-caption {
  margin-top: 1rem;
  color: #F8FAFC;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  max-width: 600px;
}

.pub-modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.pub-modal-close:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #0F172A;
}

@keyframes pubModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Contact Links */
.pub-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #F8FAFC;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1E293B;
  text-decoration: none;
  font-size: 0.85rem;
}

/* Footer Branding */
.pub-footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.8rem;
  color: #94A3B8;
}

/* Discreet Action Buttons inside Hero Card (Share & MAURICIO Sites) */
.pub-share-btn,
.pub-feature-btn {
  position: absolute;
  top: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(203, 213, 225, 0.6);
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  z-index: 10;
  text-decoration: none;
}

.pub-share-btn {
  right: 0.85rem;
}

.pub-feature-btn {
  left: 0.85rem;
}

.pub-share-btn svg,
.pub-feature-btn svg,
.pub-feature-btn .pub-m-icon {
  opacity: 0.5;
  stroke-opacity: 0.5;
  transition: all 0.2s ease;
}

.pub-feature-btn .pub-m-icon {
  font-weight: 500;
  font-size: 0.82rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
}

.pub-feature-btn .pub-m-text,
.pub-feature-btn .pub-m-dot {
  transition: color 0.2s ease;
}

.pub-share-btn:hover,
.pub-feature-btn:hover {
  background: #FFFFFF;
  border-color: #6366F1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px) scale(1.08);
}

.pub-share-btn:hover {
  color: var(--brand-color, #0052FF);
  border-color: var(--brand-color, #0052FF);
}

.pub-feature-btn:hover .pub-m-text {
  color: #0F172A !important;
}

.pub-feature-btn:hover .pub-m-dot {
  color: #6366F1 !important;
}

.pub-share-btn:hover svg,
.pub-feature-btn:hover svg,
.pub-feature-btn:hover .pub-m-icon {
  opacity: 1 !important;
  stroke-opacity: 1 !important;
}
