@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@300;400;500;600;700&display=swap');

.golp-app {
  --gold: #C5A059; --gold-dark: #9C7C38; --ivory: #FAF9F6;
  --charcoal: #1A1A1A; --charcoal-light: #4A4A4A;
  max-width: 480px; margin: 0 auto; background: var(--ivory);
  font-family: 'Manrope', sans-serif; color: var(--charcoal);
  min-height: 70vh; padding-bottom: 90px; position: relative;
  -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
.golp-app *, .golp-app *::before, .golp-app *::after { box-sizing: border-box; }
.golp-app svg { stroke-width: 1.3; }

/* Header */
.golp-header { text-align: center; padding: 28px 24px 12px; animation: golp-fade .5s ease both; }
.golp-langs { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
.golp-lang-pill { border: none; background: transparent; color: var(--charcoal-light);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px;
  border-radius: 999px; cursor: pointer; font-weight: 600; }
.golp-lang-pill.active { background: var(--charcoal); color: var(--ivory); }
.golp-logo { width: 92px; height: 92px; object-fit: contain; margin: 0 auto 4px; display: block; }
.golp-title { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 40px;
  line-height: 1.1; margin: 4px 0; color: var(--charcoal); font-weight: 500; }
.golp-divider { width: 40px; height: 1px; background: var(--gold); margin: 12px auto; }
.golp-propname { font-weight: 600; font-size: 16px; }
.golp-location { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); margin-top: 4px; }
.golp-welcome { font-size: 14px; color: var(--charcoal-light); margin: 16px auto 0; max-width: 300px; line-height: 1.6; }

/* Apartment buttons */
.golp-apts { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.golp-apt-btn { display: flex; align-items: center; gap: 16px; width: 100%; background: #fff;
  border: 1px solid transparent; border-radius: 18px; padding: 16px 20px; cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,.04); transition: transform .3s, border-color .3s; text-align: left;
  animation: golp-fade .5s ease both; }
.golp-apt-btn:hover { transform: translateY(-3px); border-color: rgba(197,160,89,.3); }
.golp-apt-ic { width: 44px; height: 44px; border-radius: 999px; background: rgba(197,160,89,.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold-dark); }
.golp-apt-name { font-family: 'Cormorant Garamond', serif; font-size: 22px; line-height: 1; }
.golp-apt-sub { font-size: 11px; color: var(--charcoal-light); margin-top: 4px; }
.golp-apt-lock { color: var(--gold); margin-left: auto; }

/* Section title */
.golp-sec-title { text-align: center; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 600; color: var(--charcoal); margin: 32px 0 16px; }

/* Grid */
.golp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 20px; }
.golp-card-btn { background: #fff; border: 1px solid transparent; border-radius: 18px; height: 116px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px;
  cursor: pointer; box-shadow: 0 4px 24px rgba(0,0,0,.04); transition: transform .3s, border-color .3s; color: var(--charcoal); }
.golp-card-btn:hover { transform: translateY(-3px); border-color: rgba(197,160,89,.3); }
.golp-card-btn svg { color: var(--gold-dark); width: 30px; height: 30px; margin-bottom: 10px; }
.golp-card-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  text-align: center; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 2.6em; }

/* Bottom nav */
.golp-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  height: 64px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); z-index: 9999;
  display: flex; justify-content: space-around; align-items: center; border-top: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 -4px 20px rgba(0,0,0,.05); }
.golp-nav button { background: none; border: none; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 4px; color: var(--charcoal-light); }
.golp-nav button.active { color: var(--gold-dark); }
.golp-nav span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.golp-nav svg { width: 20px; height: 20px; }

/* Modal */
.golp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
  z-index: 10000; display: flex; align-items: flex-end; justify-content: center; animation: golp-fade .25s ease both; }
@media (min-width: 520px) { .golp-overlay { align-items: center; } }
.golp-modal { width: 100%; max-width: 480px; background: #FDFCFB; border-radius: 24px 24px 0 0; padding: 24px 24px 32px;
  box-shadow: 0 10px 40px rgba(0,0,0,.1); }
@media (min-width: 520px) { .golp-modal { border-radius: 24px; } }
.golp-modal-ic { width: 56px; height: 56px; border-radius: 999px; background: rgba(197,160,89,.1);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--gold-dark); }
.golp-modal h3 { font-family: 'Cormorant Garamond', serif; font-size: 24px; text-align: center; margin: 0; }
.golp-modal p.sub { text-align: center; font-size: 14px; color: var(--charcoal-light); margin: 4px 0 18px; }
.golp-code-input { width: 100%; text-align: center; font-size: 24px; letter-spacing: .5em; padding: 14px;
  border-radius: 12px; border: 1px solid rgba(197,160,89,.3); background: #fff; outline: none; }
.golp-code-input:focus { border-color: var(--gold); }
.golp-err { color: #c0392b; text-align: center; font-size: 14px; margin: 12px 0 0; }
.golp-btn-dark { width: 100%; padding: 14px; border-radius: 12px; background: var(--charcoal); color: var(--ivory);
  border: none; font-weight: 500; cursor: pointer; margin-top: 18px; font-size: 15px; }
.golp-btn-dark:disabled { opacity: .5; }
.golp-btn-text { width: 100%; background: none; border: none; color: var(--charcoal-light); font-size: 14px;
  margin-top: 12px; cursor: pointer; }

/* Detail */
.golp-detail { position: fixed; inset: 0; background: var(--ivory); z-index: 10001; overflow-y: auto;
  animation: golp-scale .25s ease both; }
.golp-detail-inner { max-width: 480px; margin: 0 auto; padding: 0 20px 40px; }
.golp-detail-hero { position: relative; height: 220px; }
.golp-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.golp-detail-hero h2 { position: absolute; bottom: 16px; left: 20px; right: 20px; color: #fff;
  font-family: 'Cormorant Garamond', serif; font-size: 30px; margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.golp-back { position: absolute; top: 16px; left: 16px; width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,.92); border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.golp-detail-head { display: flex; align-items: center; gap: 12px; padding: 20px 0 4px; }
.golp-detail-head h2 { font-family: 'Cormorant Garamond', serif; font-size: 30px; margin: 0; }
.golp-detail-head svg { color: var(--gold-dark); width: 28px; height: 28px; }
.golp-notice { display: flex; gap: 12px; background: rgba(197,160,89,.1); border: 1px solid rgba(197,160,89,.3);
  border-radius: 12px; padding: 14px; margin-top: 18px; font-size: 14px; font-weight: 500; }
.golp-notice svg { color: var(--gold-dark); flex-shrink: 0; width: 20px; height: 20px; }
.golp-body { font-size: 15px; line-height: 1.65; color: var(--charcoal-light); white-space: pre-wrap; margin-top: 18px; }
.golp-detail img.golp-photo { width: 100%; border-radius: 18px; margin-top: 14px; box-shadow: 0 4px 24px rgba(0,0,0,.05); }
.golp-video { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; margin-top: 16px; }
.golp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.golp-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px;
  border-radius: 12px; font-weight: 500; font-size: 14px; margin-top: 10px; text-decoration: none; cursor: pointer; }
.golp-link.dark { background: var(--charcoal); color: var(--ivory); }
.golp-link.ghost { background: #fff; border: 1px solid rgba(197,160,89,.4); color: var(--charcoal); }
.golp-link svg { width: 16px; height: 16px; }

/* Contacts */
.golp-contact-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: #fff; border: 1px solid rgba(197,160,89,.3); text-decoration: none; color: var(--charcoal);
  margin-top: 10px; font-size: 14px; }
.golp-contact-row svg { color: var(--gold-dark); width: 20px; height: 20px; flex-shrink: 0; }

@keyframes golp-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes golp-scale { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.golp-loading { text-align: center; padding: 60px 0; color: var(--gold-dark); }


/* ===== Theme-proofing: forza i colori del testo su QUALSIASI tema (es. Hello Biz/Elementor) ===== */
.golp-app,
.golp-app p,
.golp-app span,
.golp-app div,
.golp-app h1,
.golp-app h2,
.golp-app h3 { color: var(--charcoal); }
.golp-app .golp-title,
.golp-app .golp-propname,
.golp-app .golp-apt-name,
.golp-app .golp-card-label,
.golp-app .golp-modal h3,
.golp-app .golp-detail-head h2,
.golp-app .golp-notice { color: var(--charcoal) !important; }
.golp-app .golp-apt-sub,
.golp-app .golp-welcome,
.golp-app .golp-modal p.sub,
.golp-app .golp-body { color: var(--charcoal-light) !important; }
.golp-app .golp-location,
.golp-app .golp-sec-title { color: var(--gold-dark) !important; }
.golp-app .golp-detail-hero h2 { color: #fff !important; }
.golp-app .golp-link.dark { color: var(--ivory) !important; }
.golp-app .golp-nav button { color: var(--charcoal-light) !important; }
.golp-app .golp-nav button.active { color: var(--gold-dark) !important; }
/* icone sempre nel tono oro, mai colorate dal tema */
.golp-app .golp-card-btn svg,
.golp-app .golp-apt-ic svg,
.golp-app .golp-modal-ic svg,
.golp-app .golp-detail-head svg,
.golp-app .golp-notice svg,
.golp-app .golp-contact-row svg { color: var(--gold-dark) !important; }
/* Neutralizza lo "skin" dei pulsanti del tema, mantenendo lo stile delle card */
.golp-app button { color: var(--charcoal) !important; }
.golp-app .golp-apt-btn,
.golp-app .golp-card-btn { background: #fff !important; border: 1px solid transparent !important; }
.golp-app .golp-apt-btn:hover,
.golp-app .golp-card-btn:hover { border-color: rgba(197,160,89,.3) !important; }
.golp-app .golp-nav button { background: none !important; border: 0 !important; }
.golp-app .golp-btn-dark,
.golp-app .golp-link.dark { color: var(--ivory) !important; }
.golp-app .golp-btn-text { color: var(--charcoal-light) !important; }
.golp-app .golp-code-input { color: var(--charcoal) !important; }

/* Fallback variabili colore per gli overlay (difensivo) */
.golp-detail, .golp-overlay { --gold:#C5A059; --gold-dark:#9C7C38; --gold-light:#E5D08C; --ivory:#FAF9F6; --charcoal:#1A1A1A; --charcoal-light:#4A4A4A; }
/* Testi degli overlay a prova di tema (nel caso siano montati fuori da .golp-app) */
.golp-detail .golp-detail-head h2, .golp-detail .golp-notice, .golp-modal h3 { color: var(--charcoal) !important; }
.golp-detail .golp-body, .golp-modal p.sub { color: var(--charcoal-light) !important; }
.golp-detail .golp-detail-hero h2 { color: #fff !important; }
.golp-detail .golp-link.dark, .golp-overlay .golp-btn-dark { color: var(--ivory) !important; }
/* Rispetta la barra admin di WordPress */
body.admin-bar .golp-detail { top: 46px; }
@media screen and (min-width:783px){ body.admin-bar .golp-detail { top: 32px; } }
