/* ==========================================================
   I BRIGANTI — Styles
   ========================================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Navbar --- */
.navbar {
  width: 100%;
  max-width: 480px;
  display: flex;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}
.navbar a {
  flex: 1;
  padding: 10px;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .2s;
}
.navbar a:hover { opacity: .85; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: 480px;
  padding: 15px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Share icon --- */
.share-btn {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 18px;
  padding: 4px;
}

/* --- Profile --- */
.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}
.profile-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.profile-address {
  font-size: 13px;
  margin-bottom: 14px;
}
.profile-address a {
  text-decoration: none;
}
.profile-address svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  margin-right: 2px;
}

/* --- Socials --- */
.socials {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #333;
  text-decoration: none;
  transition: transform .2s;
}
.socials a:hover { transform: scale(1.15); }
.socials svg { width: 22px; height: 22px; fill: currentColor; }

/* --- Buttons area --- */
.buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Accordion button --- */
.accordion { width: 100%; }
.accordion-toggle {
  width: 100%;
  padding: 13px 20px;
  border-radius: 25px;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: opacity .2s;
}
.accordion-toggle:hover { opacity: .9; }
.accordion-toggle .chevron {
  position: absolute;
  right: 18px;
  transition: transform .3s;
  font-size: 12px;
}
.accordion.open .accordion-toggle .chevron {
  transform: rotate(180deg);
}

/* --- Accordion panel --- */
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.accordion.open .accordion-panel {
  max-height: 5000px;
}
.accordion-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

/* --- Child links --- */
.child-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  border-radius: 25px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  transition: opacity .2s;
}
.child-link:hover { opacity: .85; }
.child-link .child-icon {
  position: absolute;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.2);
}
.child-link .child-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* --- Simple link button --- */
.simple-link {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border-radius: 25px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: opacity .2s;
}
.simple-link:hover { opacity: .85; }

/* --- Restaurant / standalone image --- */
.restaurant-img, .standalone-img {
  width: 100%;
  border-radius: 12px;
  margin-top: 0;
  margin-bottom: 0;
}

/* --- Gallery --- */
.gallery-category-name {
  font-size: 14px;
  font-weight: 700;
  margin: 10px 0 6px;
  padding-left: 4px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .2s;
  background: #eee;
}
.gallery-grid img:hover { transform: scale(1.03); }

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
.footer {
  margin-top: 30px;
  padding: 10px;
  text-align: center;
}
.footer svg { height: 24px; opacity: .4; }

/* --- SEO Content sections --- */
.seo-content {
  width: 100%;
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  text-align: left;
}
.seo-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0e7c5f;
}
.seo-content p {
  line-height: 1.6;
  color: #555;
  font-size: 14px;
  margin-bottom: 10px;
}
.seo-content strong {
  color: #333;
}
.seo-content .rating {
  font-size: 16px;
  color: #ff9800;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .container { padding: 10px 16px 30px; }
  .profile-img { width: 120px; height: 120px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .gallery-grid img { border-radius: 6px; }
}

@media (max-width: 360px) {
  .container { padding: 8px 12px 24px; }
  .profile-img { width: 100px; height: 100px; }
  .profile-name { font-size: 16px; }
  .profile-address { font-size: 12px; }
  .accordion-toggle, .simple-link { font-size: 14px; padding: 12px 16px; }
  .child-link { font-size: 13px; padding: 12px 16px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Touch-friendly: ensure min tap targets */
@media (pointer: coarse) {
  .accordion-toggle, .simple-link, .child-link { min-height: 48px; }
  .socials a { width: 44px; height: 44px; }
  .navbar a { padding: 14px 10px; }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .navbar { padding-top: env(safe-area-inset-top); }
}
