/* style.css – Performance-optimized with critical CSS inlined */

/* ============================================================
   PREMIUM GOLD THEME – A&M MATRIMONY
   Primary: #E98C0B | Secondary: #FBFB96 | Dark: #1A1202
   ============================================================ */

/* ----- RESET & BASE ----- */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Poppins', sans-serif;
  background-color: #faf8f5;
  color: #1A1202;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}
* { box-sizing: border-box; }

/* ----- COLOR VARIABLES ----- */
:root {
  --color-primary: #E98C0B;
  --color-primary-light: #FBFB95;
  --color-primary-dark: #c77a0a;
  --color-secondary: #FBFB96;
  --color-text: #1e1e2f;
  --color-bg: #faf9f6;
}

/* ----- TAILWIND OVERRIDES ----- */
.bg-primary { background-color: var(--color-primary); }
.text-primary { color: var(--color-primary); }
.border-primary { border-color: var(--color-primary); }
.hover\:bg-primary:hover { background-color: var(--color-primary-dark); }
.hover\:text-primary:hover { color: var(--color-primary); }
.focus\:ring-primary:focus { --tw-ring-color: var(--color-primary); }
.shadow-primary { box-shadow: 0 4px 14px rgba(233, 140, 11, 0.39); }
.from-primary { --tw-gradient-from: var(--color-primary); }
.bg-primary\/10 { background-color: rgba(233, 140, 11, 0.1); }
.bg-primary\/20 { background-color: rgba(233, 140, 11, 0.2); }
.bg-primary\/5 { background-color: rgba(233, 140, 11, 0.05); }
.border-primary\/10 { border-color: rgba(233, 140, 11, 0.1); }
.border-primary\/20 { border-color: rgba(233, 140, 11, 0.2); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-secondary\/10 { background-color: rgba(251, 251, 150, 0.1); }
.bg-secondary\/20 { background-color: rgba(251, 251, 150, 0.2); }

/* ----- PREMIUM SHADOWS ----- */
.premium-shadow { box-shadow: 0 10px 40px -10px rgba(233, 140, 11, 0.15); }

/* ----- BUTTONS ----- */
.btn-primary {
  display: inline-block; background-color: var(--color-primary); color: #fff;
  font-weight: 600; padding: 0.75rem 2rem; border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(233, 140, 11, 0.3); text-align: center; cursor: pointer; border: none;
}
.btn-primary:hover { background-color: var(--color-primary-dark); transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px rgba(233, 140, 11, 0.4); }

.btn-secondary {
  display: inline-block; border: 2px solid var(--color-primary); color: var(--color-primary);
  background: transparent; font-weight: 600; padding: 0.7rem 1.8rem; border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-align: center; cursor: pointer;
}
.btn-secondary:hover { background-color: var(--color-primary); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(233, 140, 11, 0.3); }

.btn-gold-gradient {
  background: linear-gradient(135deg, #E98C0B 0%, #F6C544 100%); color: #1A1202;
  font-weight: 700; padding: 0.75rem 2rem; border-radius: 9999px;
  transition: all 0.3s ease; box-shadow: 0 4px 20px rgba(233, 140, 11, 0.3);
  display: inline-block; text-align: center; border: none; cursor: pointer;
}
.btn-gold-gradient:hover { background: linear-gradient(135deg, #D07A0A 0%, #E98C0B 100%); transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px rgba(233, 140, 11, 0.4); }

.btn-primary-grad {
  background: linear-gradient(135deg, #E98C0B 0%, #f6b83e 100%); color: #fff;
  font-weight: 700; padding: 0.75rem 1.5rem; border-radius: 9999px;
  transition: all 0.3s ease; box-shadow: 0 4px 14px rgba(233, 140, 11, 0.35);
  border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 1rem;
}
.btn-primary-grad:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(233, 140, 11, 0.4); }

.btn-secondary-outline {
  background: transparent; border: 2px solid #E98C0B; color: #E98C0B;
  font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 9999px;
  transition: all 0.3s ease; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-secondary-outline:hover { background: #E98C0B; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(233, 140, 11, 0.3); }

.btn-sm { padding: 0.35rem 1.25rem; border-radius: 9999px; font-size: 0.8rem; font-weight: 600; transition: all 0.3s ease; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; }
.btn-outline-sm { background: transparent; border: 2px solid #E98C0B; color: #E98C0B; }
.btn-outline-sm:hover { background: #E98C0B; color: #fff; transform: translateY(-1px); }
.btn-heart-sm { background: #dc2626; color: #fff; }
.btn-heart-sm:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-primary-sm { background: #E98C0B; color: #fff; }
.btn-primary-sm:hover { background: #c77a0a; transform: translateY(-1px); }
.btn-accept { background: #059669; color: #fff; }
.btn-accept:hover { background: #047857; }
.btn-reject { background: #dc2626; color: #fff; }
.btn-reject:hover { background: #b91c1c; }
.btn-view { background: rgba(233, 140, 11, 0.1); color: #E98C0B; }
.btn-view:hover { background: #E98C0B; color: #fff; }
.btn-login { background: #10B981; color: #fff; border: none; }
.btn-login:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35); }

/* ----- CARDS ----- */
.match-card, .result-card {
  background: #fff; border-radius: 1.5rem; overflow: hidden;
  border: 1px solid rgba(241, 245, 249, 1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.match-card:hover, .result-card:hover {
  transform: translateY(-6px); box-shadow: 0 20px 40px -10px rgba(233, 140, 11, 0.15);
  border-color: rgba(233, 140, 11, 0.2);
}
.match-card .image-wrapper, .result-card .image-wrapper { position: relative; height: 200px; overflow: hidden; background: #e2e8f0; }
.match-card .image-wrapper img, .result-card .image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.match-card:hover .image-wrapper img, .result-card:hover .image-wrapper img { transform: scale(1.05); }
.match-card .badge, .result-card .badge {
  position: absolute; top: 0.75rem; right: 0.75rem; background: rgba(233, 140, 11, 0.9);
  color: #fff; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; backdrop-filter: blur(4px);
}
.match-card .content, .result-card .content { padding: 1.25rem 1.5rem 1.5rem; }
.match-card .name, .result-card .name { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 0 0 0.15rem; }
.match-card .details, .result-card .details { font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.5rem; }
.match-card .tags, .result-card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.match-card .tags span, .result-card .tags span { background: #f1f5f9; padding: 0.15rem 0.6rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 500; color: #475569; }
.match-card .actions, .result-card .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ----- INTEREST CARD ----- */
.interest-card {
  background: #fff; border: 1px solid rgba(241, 245, 249, 1); border-radius: 1.25rem;
  padding: 1rem 1.25rem; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem;
}
.interest-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -8px rgba(233, 140, 11, 0.12); border-color: rgba(233, 140, 11, 0.2); }
.interest-card .avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; border: 2px solid #E98C0B; flex-shrink: 0; }
.interest-card .info { flex: 1; min-width: 0; }
.interest-card .info h4 { font-weight: 700; color: #1e293b; font-size: 1rem; margin: 0; line-height: 1.3; }
.interest-card .info p { font-size: 0.85rem; color: #94a3b8; margin: 0; }
.interest-card .badge { font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-accepted { background: #d1fae5; color: #059669; }
.badge-rejected { background: #fee2e2; color: #dc2626; }
.interest-card .actions { display: flex; gap: 0.3rem; }

/* ----- BLOG ----- */
.blog-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid rgba(241, 245, 249, 1);
  background: #fff; border-radius: 2rem; overflow: hidden;
}
.blog-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -10px rgba(233, 140, 11, 0.15); border-color: rgba(233, 140, 11, 0.2); }
.blog-card .image-wrapper { overflow: hidden; border-radius: 1.5rem 1.5rem 0 0; }
.blog-card .image-wrapper img { transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.blog-card:hover .image-wrapper img { transform: scale(1.08); }
.category-badge { background: rgba(233, 140, 11, 0.1); color: #E98C0B; padding: 0.35rem 1rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.3s ease; }
.blog-card:hover .category-badge { background: #E98C0B; color: #fff; }
.read-more { display: inline-flex; align-items: center; gap: 0.5rem; color: #E98C0B; font-weight: 600; transition: all 0.3s ease; }
.blog-card:hover .read-more { gap: 0.75rem; }

/* ----- INPUT GROUPS ----- */
.input-group { position: relative; }
.input-group .input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1rem; pointer-events: none; transition: color 0.3s ease; }
.input-group:focus-within .input-icon { color: #E98C0B; }
.input-group input, .input-group select, .input-group textarea {
  padding-left: 2.75rem; width: 100%; border: 2px solid #e2e8f0; border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem; font-size: 0.95rem; transition: all 0.3s ease;
  background: #fff; color: #1e293b; outline: none;
}
.input-group textarea { padding-top: 0.75rem; min-height: 100px; resize: vertical; padding-left: 2.75rem; }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: #E98C0B; box-shadow: 0 0 0 4px rgba(233, 140, 11, 0.1);
}
.input-group input::placeholder, .input-group textarea::placeholder { color: #94a3b8; font-weight: 300; }
.input-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-position: right 1rem center; background-repeat: no-repeat; background-size: 1.5rem; padding-right: 2.5rem; }

/* ----- STAT CARDS ----- */
.stat-card { background: #fff; border-radius: 1.5rem; padding: 1.5rem; border: 1px solid rgba(241, 245, 249, 1); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); text-align: center; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px -8px rgba(233, 140, 11, 0.12); border-color: rgba(233, 140, 11, 0.2); }
.stat-card .icon { width: 3rem; height: 3rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: rgba(233, 140, 11, 0.1); color: #E98C0B; margin: 0 auto 0.75rem; }

/* ----- PROFILE CARD ----- */
.profile-header {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(233, 140, 11, 0.05) 0%, rgba(251, 251, 150, 0.1) 100%);
  border-bottom: 1px solid rgba(241, 245, 249, 1);
}
.profile-header .avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #E98C0B; box-shadow: 0 8px 25px rgba(233, 140, 11, 0.15); margin-bottom: 1rem; }
.profile-header .name { font-size: 2rem; font-weight: 800; color: #1e293b; margin: 0 0 0.1rem; }
.profile-header .sub { font-size: 1rem; color: #94a3b8; margin-bottom: 0.25rem; }
.profile-header .tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
.profile-header .tags span { background: rgba(233, 140, 11, 0.1); color: #E98C0B; padding: 0.15rem 0.75rem; border-radius: 9999px; font-size: 0.8rem; font-weight: 600; }
.profile-body { padding: 2rem; }
.profile-body .section-title { font-size: 1.1rem; font-weight: 700; color: #1e293b; margin: 1.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid rgba(241, 245, 249, 1); display: flex; align-items: center; gap: 0.5rem; }
.profile-body .section-title:first-of-type { margin-top: 0; }
.profile-body .section-title i { color: #E98C0B; font-size: 1rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.5rem; }
.info-grid .item { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid rgba(241, 245, 249, 0.5); font-size: 0.95rem; }
.info-grid .item .label { color: #94a3b8; font-weight: 500; }
.info-grid .item .value { color: #1e293b; font-weight: 500; text-align: right; }
.action-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 1.5rem 2rem 2rem; background: rgba(251, 251, 150, 0.08); border-top: 1px solid rgba(241, 245, 249, 1); justify-content: center; }
.btn-premium { padding: 0.6rem 1.8rem; border-radius: 9999px; font-weight: 600; transition: all 0.3s ease; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-outline { background: transparent; border: 2px solid #E98C0B; color: #E98C0B; }
.btn-outline:hover { background: #E98C0B; color: #fff; transform: translateY(-2px); }
.btn-heart { background: #dc2626; color: #fff; }
.btn-heart:hover { background: #b91c1c; transform: translateY(-2px); }

/* ----- EMPTY STATES ----- */
.empty-state { text-align: center; padding: 2.5rem 1.5rem; color: #94a3b8; background: #fff; border-radius: 1.5rem; border: 1px solid rgba(241, 245, 249, 1); }
.empty-state .icon { font-size: 3rem; color: #e2e8f0; margin-bottom: 1rem; }
.empty-state h4 { font-weight: 600; color: #475569; font-size: 1.1rem; }
.empty-state p { font-size: 0.9rem; margin-top: 0.25rem; }

/* ----- BANNER ----- */
.banner-warning { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-left: 4px solid #E98C0B; border-radius: 1rem; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; box-shadow: 0 4px 15px rgba(233, 140, 11, 0.1); }

/* ----- ANIMATIONS ----- */
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.8s linear infinite; }

/* ----- LINE CLAMP ----- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ----- SCROLLBAR ----- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #E98C0B; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #D07A0A; }

/* ----- MODAL OVERLAYS ----- */
.profile-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.profile-modal-overlay.active { display: flex; }
.profile-modal {
  background: white; border-radius: 2rem; max-width: 500px; width: 100%; max-height: 90vh;
  overflow-y: auto; padding: 2rem; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.profile-modal .close-btn { position: absolute; top: 1rem; right: 1rem; background: #f1f5f9; border: none; border-radius: 50%; width: 2.5rem; height: 2.5rem; font-size: 1.2rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.profile-modal .close-btn:hover { background: #e2e8f0; }
.profile-modal .avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid #E98C0B; margin: 0 auto 1rem; }
.profile-modal .name { font-size: 1.5rem; font-weight: 800; text-align: center; }
.profile-modal .details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin-top: 1.5rem; }
.profile-modal .details .label { color: #94a3b8; font-weight: 500; }
.profile-modal .details .value { font-weight: 500; text-align: right; }
.profile-modal .action-btn { display: block; width: 100%; margin-top: 1.5rem; background: #E98C0B; color: white; border: none; border-radius: 9999px; padding: 0.75rem; font-weight: 600; cursor: pointer; transition: 0.3s; }
.profile-modal .action-btn:hover { background: #c77a0a; }

.admin-user-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.admin-user-modal-overlay.active { display: flex; }
.admin-user-modal {
  background: white; border-radius: 2rem; max-width: 600px; width: 100%; max-height: 90vh;
  overflow-y: auto; padding: 2rem; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  animation: modalFadeIn 0.3s ease;
}
.admin-user-modal .close-btn { position: absolute; top: 1rem; right: 1rem; background: #f1f5f9; border: none; border-radius: 50%; width: 2.5rem; height: 2.5rem; font-size: 1.2rem; cursor: pointer; transition: 0.2s; }
.admin-user-modal .close-btn:hover { background: #e2e8f0; }
.admin-user-modal .avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid #E98C0B; margin: 0 auto 0.5rem; }
.admin-user-modal .name { font-size: 1.5rem; font-weight: 800; text-align: center; }
.admin-user-modal .details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 1.5rem 0; }
.admin-user-modal .details-grid .label { color: #94a3b8; font-weight: 500; }
.admin-user-modal .details-grid .value { font-weight: 500; text-align: right; }
.admin-user-modal .action-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.admin-user-modal .action-row button { flex: 1; min-width: 100px; padding: 0.6rem; border-radius: 9999px; border: none; font-weight: 600; cursor: pointer; transition: 0.3s; }
.admin-user-modal .action-row .btn-edit { background: #3b82f6; color: white; }
.admin-user-modal .action-row .btn-suggest { background: #10b981; color: white; }
.admin-user-modal .action-row .btn-message { background: #6366f1; color: white; }
.admin-user-modal .action-row .btn-delete { background: #ef4444; color: white; }
.admin-user-modal .action-row button:hover { transform: translateY(-2px); filter: brightness(0.9); }

.admin-user-card {
  background: white; border-radius: 1.5rem; padding: 1.25rem;
  border: 1px solid #e2e8f0; transition: all 0.3s ease; cursor: pointer;
}
.admin-user-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px -8px rgba(233,140,11,0.15); border-color: rgba(233,140,11,0.3); }
.admin-user-card .avatar { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; border: 2px solid #E98C0B; }
.admin-user-card .name { font-weight: 700; font-size: 1.1rem; }
.admin-user-card .sub { font-size: 0.85rem; color: #94a3b8; }
.admin-user-card .badge-status { font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 9999px; }

/* ----- RESPONSIVE ----- */
@media (max-width: 640px) {
  .btn-primary, .btn-secondary, .btn-gold-gradient, .btn-primary-grad, .btn-secondary-outline { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
  .match-card .image-wrapper, .result-card .image-wrapper { height: 160px; }
  .match-card .content, .result-card .content { padding: 1rem 1.25rem 1.25rem; }
  .match-card .name, .result-card .name { font-size: 1rem; }
  .interest-card { flex-wrap: wrap; padding: 0.875rem 1rem; }
  .interest-card .actions { width: 100%; justify-content: flex-start; margin-top: 0.25rem; }
  .profile-header .avatar { width: 90px; height: 90px; }
  .profile-header .name { font-size: 1.5rem; }
  .profile-body { padding: 1.25rem; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid .item { font-size: 0.9rem; }
  .action-bar { padding: 1rem 1.25rem; }
  .profile-modal { padding: 1.5rem; margin: 1rem; }
  .profile-modal .details { grid-template-columns: 1fr; }
  .profile-modal .details .value { text-align: left; }
  .admin-user-modal { padding: 1.5rem; margin: 0.5rem; }
  .admin-user-modal .details-grid { grid-template-columns: 1fr; }
  .admin-user-modal .details-grid .value { text-align: left; }
  .admin-user-modal .action-row button { min-width: 80px; font-size: 0.8rem; }
}

/* ============ HORIZONTAL SINGLE-ROW SCROLL LAYOUT ============ */
/* Used for: home page profile cards, testimonials page image cards */
.hscroll-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 140, 11, 0.35) transparent;
}
@media (min-width: 768px) {
  .hscroll-row { gap: 1.5rem; }
}
.hscroll-row > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.hscroll-row::-webkit-scrollbar { height: 8px; }
.hscroll-row::-webkit-scrollbar-track { background: transparent; }
.hscroll-row::-webkit-scrollbar-thumb {
  background: rgba(233, 140, 11, 0.35);
  border-radius: 9999px;
}
.hscroll-row::-webkit-scrollbar-thumb:hover { background: rgba(233, 140, 11, 0.55); }

/* Profile result cards inside the horizontal row need a fixed width */
.hscroll-row .result-card {
  width: 200px;
}
@media (min-width: 640px) {
  .hscroll-row .result-card { width: 240px; }
}
@media (min-width: 1024px) {
  .hscroll-row .result-card { width: 270px; }
}

/* Testimonial cards (image cards + text story cards) inside the horizontal row */
.hscroll-row .testimonial-card,
.hscroll-row .story-card {
  width: 280px;
}
@media (min-width: 640px) {
  .hscroll-row .testimonial-card,
  .hscroll-row .story-card { width: 320px; }
}
@media (min-width: 1024px) {
  .hscroll-row .testimonial-card,
  .hscroll-row .story-card { width: 360px; }
}

/* ============ TESTIMONIAL / STORY CARD SHAPE (SELF-CONTAINED) ============
   These cards are marked up with Tailwind utilities (rounded-3xl, overflow-hidden,
   border, bg-white, object-cover, etc.) that only exist once cdn.tailwindcss.com
   runs in the browser. On some hosts/networks that script can load late, get
   blocked, or fail outright — which leaves the cards with square corners,
   no clipping, and full-size unstyled images ("broken shape"). The rules below
   give the exact same visual result using plain CSS in this stylesheet, so the
   card shape is correct even if the Tailwind CDN never loads at all. */
.testimonial-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  background-color: #fff;
}
.testimonial-card img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card {
  position: relative;
  display: block;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  background-color: #fff;
  padding: 2rem;
}
.story-card .story-avatar {
  width: 3.5rem;
  height: 3.5rem;
  min-width: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Home page testimonial cards (3-column grid version) */
.home-testimonial-card {
  display: block;
  border-radius: 2rem;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  background-color: #fff;
}
.home-testimonial-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Hide default browser scrollbar site-wide (right-side scroll slider) */
html {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE / old Edge */
}
html::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, new Edge */
  width: 0;
  height: 0;
}
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ============ CLICK-TO-ENLARGE PROFILE PHOTOS ============ */
.clickable-profile-photo {
  cursor: zoom-in;
}
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
}
.image-lightbox-overlay.active { display: flex; }
.image-lightbox-overlay img {
  display: block;
  width: auto;
  max-width: min(92vw, 900px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.image-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 9999px;
  background: #fff;
  color: #0f172a;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
body.lightbox-open { overflow: hidden; }


/* ============================================================
   PROFILE CARD ALIGNMENT + RESPONSIVE UI HARDENING (2026-07-25)
   ============================================================ */
.profile-image-frame,
.match-card .image-wrapper,
.result-card .image-wrapper {
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 5;
  min-height: 280px;
  background: linear-gradient(145deg, #f4f6f8, #e8edf1);
  overflow: hidden;
}
.profile-card-photo,
.match-card .image-wrapper img,
.result-card .image-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover !important;
  object-position: center 18% !important;
  transform-origin: center center;
}
.result-card,
.match-card { height: 100%; display: flex; flex-direction: column; }
.result-card .content,
.match-card .content { display: flex; flex-direction: column; flex: 1; }
.result-card .actions,
.match-card .actions { margin-top: auto; }
.result-card .name,
.match-card .name { line-height: 1.3; word-break: break-word; }

.profile-preference-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}
.profile-preference-badge.featured { background: #fff3cd; color: #9a6700; }
.profile-preference-badge.hidden { background: #fee2e2; color: #b91c1c; }
.profile-preference-badge.normal { background: #e0f2fe; color: #0369a1; }

/* Ensure forms never overflow on small screens. */
input, select, textarea, button { max-width: 100%; }
img, video, iframe { max-width: 100%; }
.field-group { min-width: 0; }
.field-group input,
.field-group select,
.field-group textarea { width: 100%; }

@media (max-width: 767px) {
  html { scroll-padding-top: 76px; }
  body { font-size: 15px; }
  section { max-width: 100vw; }
  .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl, .max-w-3xl { width: 100%; }

  .result-card,
  .match-card { border-radius: 1.25rem; }
  .profile-image-frame,
  .match-card .image-wrapper,
  .result-card .image-wrapper {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
  .match-card .content,
  .result-card .content { padding: 1rem !important; }
  .match-card .name,
  .result-card .name { font-size: 1rem !important; }
  .match-card .details,
  .result-card .details { font-size: .8rem !important; }
  .btn-sm, .btn-match { min-height: 42px; justify-content: center; }

  .profile-card { border-radius: 1.25rem !important; }
  .profile-header { padding: 1.25rem 1rem 1rem !important; }
  .profile-header .avatar { width: 108px !important; height: 108px !important; }
  .profile-header .name { font-size: 1.45rem !important; line-height: 1.25; }
  .profile-body { padding: 1rem !important; }
  .profile-body .section-title { font-size: 1rem !important; }
  .info-grid { grid-template-columns: 1fr !important; gap: .25rem !important; }
  .info-grid .item { gap: 1rem; align-items: flex-start; }
  .info-grid .item .label { min-width: 42%; }
  .info-grid .item .value { overflow-wrap: anywhere; }
  .action-bar { padding: 1rem !important; flex-direction: column; }
  .action-bar .btn-premium { width: 100%; justify-content: center; }

  .interest-card { flex-direction: column; align-items: stretch !important; text-align: left; }
  .interest-card .avatar { align-self: center; }
  .interest-card .actions { width: 100%; flex-wrap: wrap; }
  .interest-card .actions > * { flex: 1 1 42%; justify-content: center; }

  .admin-user-modal-overlay {
    padding: .5rem !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
  }
  .admin-user-modal,
  .admin-edit-modal {
    width: calc(100vw - 1rem) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100dvh - 1rem) !important;
    margin: .5rem auto !important;
    padding: 1rem !important;
    border-radius: 1.25rem !important;
    overflow-y: auto !important;
  }
  .admin-edit-modal form > .grid,
  .admin-user-modal .grid { max-height: none !important; overflow: visible !important; }
  .admin-table { min-width: 720px; }
  .admin-filter-bar { align-items: stretch !important; }
  .admin-filter-bar label { width: 100%; }
  .admin-filter-bar select { width: 100%; }

  .photo-upload-wrapper { width: 100%; }
  .photo-upload-wrapper .upload-btn { width: 100%; justify-content: center; }
  .dashboard-hero { padding-top: 7rem !important; }
  .stat-card { min-width: 0; padding: .85rem !important; }

  /* Prevent iOS zoom and improve touch controls. */
  input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 420px) {
  #profileGrid > * { width: 82vw !important; }
  #testimonialGrid > * { width: 82vw !important; }
  .grid-cols-2.mobile-stack { grid-template-columns: 1fr !important; }
  .profile-header .name { font-size: 1.3rem !important; }
}
