/* ==========================================================================
   Public Bio Profile Page Stylesheet (Pro Edition)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;600;700;800&family=Almarai:wght@400;700;800&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Aref+Ruqaa:wght@400;700&family=Cairo:wght@400;600;700;800;900&family=Changa:wght@400;600;700;800&family=El+Messiri:wght@400;600;700&family=Katibeh&family=Lalezar&family=Lemonada:wght@400;600;700&family=Marhey:wght@400;600;700&family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Rakkas&family=Readex+Pro:wght@400;500;600;700&family=Reem+Kufi:wght@400;600;700&family=Tajawal:wght@400;500;700;800&display=swap');

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

body {
  font-family: 'Readex Pro', 'Cairo', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 20px 40px 20px;
  direction: rtl;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Master Font Classes */
.font-readex, .font-readex * { font-family: 'Readex Pro', sans-serif !important; }
.font-cairo, .font-cairo * { font-family: 'Cairo', sans-serif !important; }
.font-tajawal, .font-tajawal * { font-family: 'Tajawal', sans-serif !important; }
.font-almarai, .font-almarai * { font-family: 'Almarai', sans-serif !important; }
.font-alexandria, .font-alexandria * { font-family: 'Alexandria', sans-serif !important; }
.font-lalezar, .font-lalezar * { font-family: 'Lalezar', cursive, sans-serif !important; }
.font-aref, .font-aref * { font-family: 'Aref Ruqaa', serif !important; }
.font-reem, .font-reem * { font-family: 'Reem Kufi', sans-serif !important; }
.font-marhey, .font-marhey * { font-family: 'Marhey', cursive, sans-serif !important; }
.font-rakkas, .font-rakkas * { font-family: 'Rakkas', display, cursive !important; }
.font-lemonada, .font-lemonada * { font-family: 'Lemonada', cursive, sans-serif !important; }
.font-changa, .font-changa * { font-family: 'Changa', sans-serif !important; }
.font-katibeh, .font-katibeh * { font-family: 'Katibeh', serif !important; }
.font-amiri, .font-amiri * { font-family: 'Amiri', serif !important; }
.font-elmessiri, .font-elmessiri * { font-family: 'El Messiri', sans-serif !important; }
.font-inter, .font-inter * { font-family: 'Plus Jakarta Sans', sans-serif !important; }

.profile-page-wrapper {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  position: relative;
}

/* Floating Share Corner Button */
.corner-share-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.corner-share-btn:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.5);
}

/* Hero Banner Layout */
.layout-banner {
  padding-top: 0 !important;
}

.public-hero-banner {
  display: none;
  width: 100vw;
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0 0 24px 24px;
  margin-bottom: -55px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.layout-banner .public-hero-banner {
  display: block;
}

.layout-banner .profile-avatar {
  border: 4px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Side Layout */
.layout-side .profile-header {
  flex-direction: row;
  text-align: right;
  gap: 20px;
  align-items: center;
}
.layout-side .profile-avatar {
  margin-bottom: 0;
  width: 84px;
  height: 84px;
}
.layout-side .profile-bio {
  max-width: 100%;
  text-align: right;
}

/* Profile Header Section */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
  width: 100%;
  position: relative;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
}

.profile-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  color: #1d9bf0;
}

.profile-bio {
  font-size: 1rem;
  opacity: 0.88;
  max-width: 460px;
  line-height: 1.55;
  margin-bottom: 20px;
  white-space: pre-line;
}

/* Social Row */
.social-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.social-icon-btn {
  color: inherit;
  opacity: 0.85;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon-btn:hover {
  transform: translateY(-3px) scale(1.1);
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
}

/* Links List */
.public-links-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-bottom: 40px;
}

.public-link-item {
  width: 100%;
  min-height: 60px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.public-link-item:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.public-link-item:active {
  transform: translateY(1px) scale(0.99);
}

.link-icon-lead {
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-title-text {
  flex: 1;
  text-align: center;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-trailing-arrow {
  width: 24px;
  opacity: 0.65;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Public Footer Branding */
.public-footer {
  margin-top: auto;
  text-align: center;
  padding: 20px 0;
}

.brand-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.brand-pill-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ==========================================================================
   Themes Support
   ========================================================================== */
.theme-emerald { background: #254f1a; color: #ffffff; }
.theme-emerald .public-link-item { background: #d2e823; color: #1e3914; border: none; font-weight: 700; }
.theme-emerald .public-link-item:hover { background: #e1f538; }

.theme-gold { background: radial-gradient(circle at 50% 10%, #211c12 0%, #0d0c0a 100%); color: #f3e5ab; }
.theme-gold .public-link-item { background: linear-gradient(135deg, #d4af37, #f6d365, #c59b27); color: #12100a; border: none; font-weight: 700; }

.theme-aurora { background: linear-gradient(135deg, #4338ca 0%, #7c3aed 50%, #ec4899 100%); color: #ffffff; }
.theme-aurora .public-link-item { background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.35); color: #ffffff; }

.theme-velvet { background: linear-gradient(180deg, #090b10 0%, #111420 100%); color: #f8fafc; }
.theme-velvet .public-link-item { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); color: #ffffff; backdrop-filter: blur(16px); }

.theme-cyber { background: linear-gradient(180deg, #130924 0%, #070314 100%); color: #e0e7ff; }
.theme-cyber .public-link-item { background: rgba(14, 165, 233, 0.12); border: 1px solid #06b6d4; color: #67e8f9; }

.theme-desert { background: linear-gradient(180deg, #2b1d14 0%, #170f0a 100%); color: #f5e6d3; }
.theme-desert .public-link-item { background: #d97706; color: #1a0f05; border: none; font-weight: 700; }

.theme-cherry { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%); color: #831843; }
.theme-cherry .public-link-item { background: #ffffff; color: #9d174d; border: 1px solid #fbcfe8; }

.theme-minimal { background: #f8fafc; color: #0f172a; }
.theme-minimal .public-link-item { background: #ffffff; color: #0f172a; border: 1px solid #e2e8f0; }

.theme-ocean { background: linear-gradient(180deg, #0f172a 0%, #0369a1 100%); color: #e0f2fe; }
.theme-ocean .public-link-item { background: #38bdf8; color: #0c4a6e; border: none; font-weight: 700; }

.theme-sunset { background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%); color: #2b1108; }
.theme-sunset .public-link-item { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); color: #3e160a; }

.theme-forest { background: linear-gradient(180deg, #052e16 0%, #021a0d 100%); color: #dcfce7; }
.theme-forest .public-link-item { background: #15803d; color: #ffffff; border: 1px solid #22c55e; }

.theme-amethyst { background: radial-gradient(circle at 50% 20%, #3b0764 0%, #150124 100%); color: #f3e8ff; }
.theme-amethyst .public-link-item { background: linear-gradient(135deg, #c084fc, #9333ea); color: #ffffff; border: none; font-weight: 700; }

/* Radius Classes */
.radius-pill .public-link-item { border-radius: 999px; }
.radius-rounded .public-link-item { border-radius: 14px; }
.radius-sharp .public-link-item { border-radius: 4px; }
