.card.mb-4 {
  margin-left: auto;
  margin-right: auto;
}

.card-body {
  /* width reset */
}

/* Consistent width for all comment-related card bodies */
.comment-card-body {
  /* width reset */
}
.photo-card .card-body,
.card.mb-4 .card-body {
  /* width reset */
}
.card.photo-card {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.photo-card .card-body,
.photo-card .text-center.p-3 {
  background: #000 !important;
}
.photo-detail-image {
  background: #000 !important;
}
.photo-card .card-body {
  background: #000000 !important;
}
.photo-card .card {
  background: #000000 !important;
}
/* Notifications dropdown menu dark background */
.dropdown-menu.notification-dropdown {
  background-color: #212529 !important;
  color: #f8f8f2 !important;
  border: none;
}
/* Notifications bell dropdown trigger dark background */
#notificationsDropdown.nav-link {
  background: var(--card-bg, #252525) !important;
  color: var(--text-primary, #f8f8f2) !important;
  border-radius: 8px;
  transition: background 0.2s;
}
#notificationsDropdown.nav-link:hover, #notificationsDropdown.nav-link:focus {
  background: #1c1c1c !important;
  color: #fff !important;
}
/* Custom styles for ShutterSpace */ /* Color palette variables - Warm Sophisticated Theme */

:root {
  --primary: #1c1c1c; /* Rich black */
  --secondary: #2a2a2a; /* Warm charcoal */
  --accent: #f8f8f2; /* Cream white */
  --highlight: #d4a574; /* Warm caramel */
  --tertiary: #8b6f47; /* Coffee brown */
  --danger: #a0522d; /* Warm sienna brown for danger actions */
  --sand: #d4a574; /* Updated to warm caramel */
  --rose: #e8d5d0; /* Warmer rose tone */
  --coral: #c8956d; /* Sophisticated coral-brown */
  --light: #f8f8f2; /* Cream white */
  --dark: #1c1c1c; /* Rich black */
  --muted: #8b7355; /* Warm muted brown */
  --bg-primary: #1c1c1c; /* Rich black */
  --bg-secondary: #2a2a2a; /* Warm charcoal */
  --text-primary: #f8f8f2; /* Cream white */
  --text-secondary: #d4c19f; /* Warm secondary text */
  --card-bg: #252525; /* Slightly warmer card background */
  --border-color: #3d3529; /* Warm border color */
  --container-max-width: 1100px;
}
.bg-rose {
  background-color: #e8d5d0 !important;
  background-color: var(--rose) !important;
}

.bg-coral {
  background-color: #c8956d !important;
  background-color: var(--coral) !important;
}

.btn-primary:hover {
  background: #0056b3;
}
.btn-primary:hover .bg-light {
  background-color: #2a2a2a !important;
  background-color: var(--bg-secondary) !important;
}
.btn-primary:hover .bg-dark {
  background-color: #1c1c1c !important;
  background-color: var(--bg-primary) !important;
  color: #f8f8f2;
  color: var(--text-primary);
}

.text-sand {
  color: #d4a574 !important;
  color: var(--sand) !important;
}

.form-control {
  border-radius: 6px;
  border: 1px solid #ced4da;
}
.form-control .text-rose {
  color: #e8d5d0 !important;
  color: var(--rose) !important;
}
.form-control .text-coral {
  color: #c8956d !important;
  color: var(--coral) !important;
}
.form-control .text-light {
  color: #f8f8f2 !important;
  color: var(--text-primary) !important;
}
.text-dark {
  color: #d4c19f !important;
  color: var(--text-secondary) !important;
}

.text-muted {
  color: #ffe6b0 !important;
  /* Soft light gold for better contrast on dark backgrounds */
}

/* Add more custom styles as needed */

/* General responsive improvements */
img {
  max-width: 100%;
  height: auto;
}

.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

/* Ensure proper spacing on all screen sizes */
.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

/* Overflow handling for long text */
.text-break {
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
}

/* Responsive tables */
.table-responsive {
  overflow-x: auto;
}

/* Desktop-specific Bootstrap column fixes */
@media (min-width: 992px) {
  .col-lg-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }

  .col-lg-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }

  .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  .col-lg-8 {
    flex: 0 0 66.666667% !important;
    max-width: 66.666667% !important;
  }
}

/* Navigation and header improvements */
.navbar {
  padding: 0.5rem 0;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Search form responsive improvements */
.search-form {
  min-width: 200px;
}

/* Dropdown improvements */
.notification-dropdown {
  width: 350px !important;
  max-height: 400px;
  overflow-y: auto;
}

.user-dropdown {
  min-width: 160px;
}

/* Basic layout */
body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #1c1c1c;
  background: linear-gradient(135deg, #1c1c1c 0%, #2a2a2a 100%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #f9fafb;
  color: #fff;
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

/* Global link styles: use sophisticated coral accent */
a,
a:link,
a:visited {
  color: #ffd580;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  text-decoration: none;
  font-weight: 500;
}

a:hover,
a:focus {
  /* Use the warm caramel for hover to ensure contrast */
  color: #fffbe6;
  text-decoration: underline;
}

/* Smaller text links (e.g., captions or metadata) should be slightly lighter weight */
.small a {
  color: #c8956d;
  color: var(--coral);
  font-weight: 400;
  text-decoration: none;
}

.small a:hover,
.small a:focus {
  text-decoration: underline;
}

/* Constrain main content for better reading rhythm */
main.container {
  max-width: 1100px;
  max-width: var(--container-max-width);
}

/* Enhanced navbar styling with glass effect */
.navbar {
  /* backdrop-filter removed for W3C validation compliance */
  background: rgba(44, 42, 42, 0.95) !important;
  border-bottom: 1px solid rgba(212, 165, 116, 0.2);
  padding: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(28, 28, 28, 0.1);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background: rgba(42, 42, 42, 0.95) !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}

.navbar {
  /* keep navbar above content (Bootstrap uses 1030+) */
  z-index: 1030;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: all 0.3s ease;
  position: relative;
  padding: 0.75rem 1.25rem !important;
  border-radius: 8px;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: var(--coral) !important;
  background: rgba(200, 149, 109, 0.08);
}

.navbar-nav .nav-link:hover::after {
  width: 60%;
}

/* Enhanced typography with better hierarchy - Dark Theme */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  margin-bottom: 1.2rem;
  position: relative;
}

h1 {
  font-size: 3rem;
  line-height: 1.1;
  font-weight: 700;
}
h2 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}
h3 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

/* Enhanced section headings */
h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--sand) 100%);
  border-radius: 2px;
}

.display-4 {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-size: 3.5rem;
}

/* Enhanced text styles */
.lead {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Better text hierarchy */
.text-large {
  font-size: 1.1rem;
  line-height: 1.6;
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Enhanced paragraph spacing */
p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* Ensure text is visible in jumbotron */
.jumbotron .display-4,
.jumbotron h1,
.jumbotron h2,
.jumbotron h3,
.jumbotron h4,
.jumbotron h5,
.jumbotron h6 {
  color: var(--text-primary) !important;
}

.lead {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card {
  border-radius: 16px;
  border: none;
  overflow: hidden;
}

/* Enhanced card styling with modern approach - Dark Theme */
.card {
  background: #252525;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid #3d3529;
  border: 1px solid var(--border-color);
  color: #f8f8f2;
  color: var(--text-primary);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card {
  background: var(--card-bg);
  /* backdrop-filter removed for W3C validation compliance */
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: none;
}

/* Modern card image container with proper aspect ratio */
.card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* Increased from 60% for taller image areas */
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #3a3a3a 100%);
}

/* Card image styling - only for thumbnails in cards */
.card-img-top:not(.photo-detail-image) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: none;
  border: none;
  display: block;
  background: transparent;
}

/* Alternative image display that shows full image without cropping */
.card-img-top.full-image {
  object-fit: contain;
  background: var(--bg-secondary);
}

/* For landscape images, use a wider aspect ratio */
.card-img-wrapper.landscape {
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

/* For portrait images, use a taller aspect ratio */
.card-img-wrapper.portrait {
  padding-top: 80%; /* 5:4 aspect ratio */
}
.card-img-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(13, 13, 13, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-img-wrapper::after {
  opacity: 1;
}

/* Enhanced card content styling */
.card-body {
  padding: 1.75rem 1.5rem;
  position: relative;
  z-index: 2;
}

.card-title {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Card metadata styling */
.card-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(211, 188, 152, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Card interaction states removed */
.photo-card {
  transition: none;
}

/* Interactive elements within cards */
.card .btn {
  transition: none;
}

/* Enhanced focus states for accessibility */
.card-img-top:focus,
.card a:focus {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* Special styling for photo cards */
.photo-card {
  height: 100%;
}

.photo-card .card-body {
  background: linear-gradient(
    180deg,
    var(--card-bg) 0%,
    rgba(242, 242, 242, 0.5) 100%
  );
  /* backdrop-filter removed for W3C validation compliance */
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.photo-card .card-body .mt-2,
.photo-card .card-body .mt-3 {
  margin-top: auto !important;
}

/* Enhanced button styling with modern effects */
.btn {
  font-weight: 500;
  border-radius: 12px;
  padding: 0.75rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-transform: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary,
.btn.btn-primary,
.btn.btn-sm.btn-primary {
  background: #8b6f47; /* Coffee brown fallback */
  background: linear-gradient(
    135deg,
    #8b6f47 0%,
    #1c1c1c 100%
  ); /* Using darker coffee brown to rich black */
  background: linear-gradient(
    135deg,
    var(--tertiary) 0%,
    var(--primary) 100%
  ); /* Using darker coffee brown to rich black */
  color: #f8f8f2 !important; /* Using cream white for maximum contrast */
  color: var(--accent) !important; /* Using cream white for maximum contrast */
  box-shadow: 0 2px 4px rgba(139, 111, 71, 0.3);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover,
.btn.btn-primary:hover,
.btn.btn-sm.btn-primary:hover {
  background: #d4a574; /* Warm caramel fallback */
  background: linear-gradient(
    135deg,
    #d4a574 0%,
    #c8956d 100%
  ); /* Using warm caramel to coral */
  background: linear-gradient(
    135deg,
    var(--highlight) 0%,
    var(--coral) 100%
  ); /* Using warm caramel to coral */
  color: #1c1c1c !important; /* Dark text on light background for contrast */
  color: var(
    --primary
  ) !important; /* Dark text on light background for contrast */
  box-shadow: 0 4px 8px rgba(212, 165, 116, 0.4);
  transform: translateY(-1px);
}

/* Navbar search form spacing */
.navbar .d-flex.me-3 {
  margin-right: 1.5rem !important;
}

/* Search button specific styling */
.navbar .btn[type="submit"] {
  min-width: 70px;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced danger buttons */
.btn-danger,
.btn.btn-danger,
.btn.btn-sm.btn-danger {
  background: #c8956d; /* Coral fallback */
  background: linear-gradient(135deg, #c8956d 0%, #ff7a6b 100%);
  background: linear-gradient(135deg, var(--coral) 0%, #ff7a6b 100%);
  color: white !important;
  box-shadow: 0 2px 4px rgba(255, 105, 87, 0.3);
}

.btn-danger:hover,
.btn.btn-sm.btn-danger:hover,
.btn-danger:focus,
.btn.btn-danger:focus {
  background: linear-gradient(135deg, #e65a48 0%, #d64938 100%);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(230, 90, 72, 0.4);
}

/* Outline danger should use coral for text/border while keeping transparent background */
.btn-outline-danger {
  color: var(--coral) !important;
  border-color: var(--coral) !important;
  background-color: transparent !important;
  transition: background-color 140ms ease, color 120ms ease;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: rgba(255, 105, 87, 0.08) !important; /* subtle coral tint */
  color: var(--coral) !important;
}

/* When placed in a dark navbar or dark container, show light text for contrast */
.navbar-dark .btn-outline-danger,
.bg-dark .btn-outline-danger {
  color: var(--light) !important;
}

.navbar-dark .btn-outline-danger:hover,
.bg-dark .btn-outline-danger:hover {
  background-color: rgba(255, 105, 87, 0.12) !important;
  color: var(--light) !important;
}

/* Secondary subtle buttons */
.btn-outline-secondary {
  color: var(--muted);
  border-color: #e9ecef;
}

/* Card grid improvements */
.row.g-4 .col {
  margin-bottom: 1.5rem;
}

/* Alternative card styles */
.card-minimal {
  box-shadow: none;
  border: 1px solid rgba(211, 188, 152, 0.2);
  background: rgba(255, 255, 255, 0.9);
  /* backdrop-filter removed for W3C validation compliance */
}

.card-minimal:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 105, 87, 0.15);
}

/* Featured card styling */
.card-featured {
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    rgba(242, 242, 242, 0.9) 100%
  );
  border: 2px solid var(--sand);
}

.card-featured .card-title {
  color: var(--coral);
}

/* Loading state for images */
.card-img-wrapper.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Enhanced utility classes */
.mb-sm {
  margin-bottom: 0.5rem !important;
}
.mt-sm {
  margin-top: 0.5rem !important;
}

/* ================================
   DELETE COMMENT MODAL OVERRIDES
   ================================ */
#deleteCommentModal .alert-warning {
  color: #fff !important;
  background-color: #f0ad4e !important;
  border-color: #eea236 !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#deleteCommentModal .btn.btn-secondary {
  color: #f8f9fa !important;
  background-color: #495057 !important;
  border-color: #495057 !important; /* Match background-color for W3C compliance */
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}
#deleteCommentModal .btn.btn-secondary:hover, 
#deleteCommentModal .btn.btn-secondary:focus {
  background-color: #343a40 !important;
  color: #fff !important;
}
/* End modal-specific delete comment form styles */
.card > .card-header {
  background: linear-gradient(135deg, var(--highlight) 0%, #b8956b 100%) !important;
  color: var(--primary) !important;
  border-bottom: 1px solid rgba(212, 165, 116, 0.3);
  padding: 1.25rem 1.5rem;
  border-radius: 20px 20px 0 0;
}
.card > .card-header h3,
.card > .card-header i {
  color: var(--primary) !important;
}
.card > .card-body {
  background: #23201b !important;
  color: #f8f8f2 !important;
  border: none;
}
/* Dark background for comments and add comment card bodies */
.comments-card > .card-body,
.add-comment-card > .card-body {
  background: #23201b !important; /* warm dark brown */
  color: #f8f8f2 !important;
  border: none;
}
/* Sidebar card-body dark background for profile */
.sidebar-dark-bg {
  background: #181818 !important;
  color: #f8f8f2 !important;
  border: none;
}
/* Ensure dark background for card-body.text-center in form-contrast cards */
.form-contrast .card-body.text-center {
  background: #181818 !important;
  color: #f8f8f2 !important;
  border: none;
}
/* Match upload photo form header to edit profile header */
.form-contrast .card-header.bg-primary {
  background: linear-gradient(135deg, var(--highlight) 0%, #b8956b 100%) !important;
  color: var(--primary) !important;
  border-bottom: 1px solid rgba(212, 165, 116, 0.3);
  padding: 1.25rem 1.5rem;
  border-radius: 20px 20px 0 0;
}
.form-contrast .card-header.bg-primary h3,
.form-contrast .card-header.bg-primary i {
  color: var(--primary) !important;
}
/* Ensure dark background for only the card body in form-contrast cards (applies to upload photo as well) */
.form-contrast .card-body {
  background: #181818 !important;
  color: #f8f8f2 !important;
  border: none;
}
.form-contrast {
  background: #181818 !important;
}
/* Ensure dark background for only the card body in form-contrast cards */
.form-contrast .card-body {
  background: #181818 !important;
  color: #f8f8f2 !important;
  border: none;
}
/* High-contrast, consistent form style for all main forms */
.form-contrast {
  background: #181818 !important;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  padding: 2.5rem 2rem;
/* Photo card body text color changed to black */
  color: #000000;
}
.form-contrast label,
.form-contrast .form-label,
.form-contrast .form-check-label {
  color: #ffd580;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.form-contrast .form-control,
.form-contrast .form-select {
  background: #232323;
  color: #f8f8f2;
  border: 1.5px solid #d4a574;
  border-radius: 8px;
  font-size: 1.05rem;
  box-shadow: none;
  transition: border-color 0.2s;
}
.form-contrast .form-control:focus,
.form-contrast .form-select:focus {
  border-color: #ffd580;
  background: #232323;
  color: #fff;
  outline: none;
}
.form-contrast .form-text,
.form-contrast .form-check-label,
.form-contrast .form-check-input {
  color: #d4c19f;
}
.form-contrast .invalid-feedback,
.form-contrast .alert-danger {
  color: #fff;
  background: #a0522d;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
}
.form-contrast .btn-primary {
  background: linear-gradient(90deg, #d4a574 0%, #c8956d 100%);
  color: #181818;
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(212,165,116,0.12);
}
.form-contrast .btn-primary:hover {
  background: linear-gradient(90deg, #ffd580 0%, #d4a574 100%);
  color: #181818;
}
.form-contrast .btn-outline-secondary {
  border: 1.5px solid #ffd580;
  color: #ffd580;
  color: #ffd580;
  background: transparent;
}
.form-contrast .btn-outline-secondary:hover {
  background: #ffd580;
  color: #181818;
}
/* Force profile stats horizontal on desktop */
@media (min-width: 992px) {
  .profile-stats-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: stretch;
  }
  .profile-stats-col {
    flex: 1 1 0;
    max-width: 25%;
    text-align: center;
  }
}

/* Footer */
footer.site-footer {
  padding: 24px 0;
  color: var(--muted);
}

/* Enhanced jumbotron/hero section with sophisticated colors */
.jumbotron {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 24px;
  padding: 5rem 4rem;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(28, 28, 28, 0.3),
    0 10px 20px rgba(28, 28, 28, 0.2);
}

.jumbotron::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(212, 165, 116, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.jumbotron::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.02) 2px,
    rgba(255, 255, 255, 0.02) 4px
  );
  animation: shimmer 20s linear infinite;
  pointer-events: none;
}

.jumbotron .display-4 {
  position: relative;
  z-index: 2;
  /* Background removed for clean text display */
  color: var(--highlight);
}

.jumbotron .lead {
  position: relative;
  z-index: 2;
  color: rgba(248, 248, 242, 0.9);
}

div.jumbotron.bg-primary.text-white.p-5.rounded.mb-4 {
  color: var(--accent) !important;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--secondary) 100%
  ) !important;
}

/* Enhanced alert styling */
.alert-info {
  color: var(--primary) !important;
  background: linear-gradient(135deg, var(--rose) 0%, #ede1e1 100%) !important;
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

/* Enhanced photo detail image */
.photo-detail-image {
  width: 100%;
  max-height: 600px;
  height: auto;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(13, 13, 13, 0.1),
    0 4px 6px -2px rgba(13, 13, 13, 0.05);
  background: var(--light);
  margin: 0 auto;
}

/* Image overlay effects for photo cards */
.photo-card {
  position: relative;
  overflow: hidden;
}

.photo-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(13, 13, 13, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-card:hover::after {
  opacity: 1;
}

/* Enhanced avatar styling */
.avatar-sm {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 4px 8px rgba(13, 13, 13, 0.15);
}

.avatar-circle {
  border-radius: 50%;
}

/* Enhanced avatar initials fallback */
.avatar-initials {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--coral) 0%, var(--sand) 100%);
  font-size: 32px;
  border: 3px solid white;
  box-shadow: 0 4px 8px rgba(13, 13, 13, 0.15);
}

/* Profile stats styling */
.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  margin: 1rem 0;
  border-top: 1px solid var(--rose);
  border-bottom: 1px solid var(--rose);
}

.profile-stats .stat {
  text-align: center;
  flex: 1;
}

.profile-stats .h5 {
  color: var(--accent);
  font-weight: 700;
}

.profile-meta {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
  max-width: 100%;
}

/* Profile bio text styling - ensure proper text wrapping AND readable width */
.card-body .profile-bio {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  max-width: 100% !important;
  hyphens: auto;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden !important;
  text-overflow: ellipsis;
  /* Limit text width for better readability */
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Ensure card body doesn't overflow and has reasonable text width */
.card-body {
  overflow-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  /* Removed padding override to use base padding (1.75rem 1.5rem) like home page */
}

/* Ensure the entire card container prevents overflow and has max width */
.col-md-4 .card {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Additional protection for any paragraph in profile cards */
.card p {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow: hidden !important;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.profile-link {
  color: #ffe6b0 !important;
  font-weight: 600;
}

/* Hero subtitle with contained width for readability */
.hero-subtitle {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  max-width: 1000px !important; /* Increased from 800px for much more breathing room */
  hyphens: auto;
  margin: 0 auto; /* Center the text */
  line-height: 1.4;
}

/* Container for main content to prevent full-width text */
.profile-content {
  max-width: 1600px; /* Increased from 1400px for maximum space utilization */
  margin: 0 auto;
  padding: 0 15px;
}

/* Ensure profile card bio doesn't get too wide even in larger containers */
.profile-bio-container {
  max-width: 450px; /* Increased from 350px for even better readability */
  margin: 0 auto;
  text-align: center;
}

/* Profile hero image section */
.profile-hero-section {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: -2rem;
  margin-bottom: 2rem;
  border-radius: 0;
  overflow: hidden;
}

/* Simple profile stats styling */
.profile-stats-container {
  background: var(--primary) !important;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-item {
  position: relative;
  transition: all 0.3s ease;
  border-radius: 12px;
  cursor: pointer;
}

.stat-item:hover {
  background: rgba(212, 165, 116, 0.1);
  transform: translateY(-2px);
}

.stat-clickable:hover .stat-number {
  color: var(--highlight) !important;
  transform: scale(1.05);
}

.stat-number {
  transition: all 0.3s ease;
}

.stat-label {
  color: var(--text-secondary) !important;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 1.1rem !important;
  text-align: center !important;
}

.stat-label i {
  transition: all 0.3s ease;
  display: inline-block;
}

.stat-item:hover .stat-label i {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.profile-hero-image {
  position: relative;
  width: 100%;
  height: 360px;
  min-height: 260px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .profile-hero-section {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  .profile-hero-image {
    height: 280px;
  }

  .hero-title {
    font-size: 2rem !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .hero-avatar,
  .hero-avatar-initials {
    width: 80px !important;
    height: 80px !important;
    font-size: 24px !important;
  }
}

/* Ensure main content sits below fixed/sticky navbars in case of overlap */
body {
  padding-top: 0; /* leave as 0 unless a fixed navbar is used */
}

.profile-hero-image .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  /* filter removed for W3C validation compliance */
  opacity: 0.7;
  transition: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.6) 0%,
    rgba(13, 13, 13, 0.3) 50%,
    rgba(255, 105, 87, 0.2) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border: 4px solid white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
  object-fit: cover;
}

.hero-avatar-initials {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--coral) 0%, var(--sand) 100%);
  font-size: 36px;
  border: 4px solid white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 0;
}

/* Enhanced comment action buttons */
.btn-sm.btn-outline-secondary {
  border-color: var(--accent);
  color: var(--accent) !important; /* Using cream white for better contrast */
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background-color: transparent;
}

.btn-sm.btn-outline-secondary:hover {
  background-color: var(--accent);
  border-color: var(--highlight);
  color: var(
    --primary
  ) !important; /* Dark text on light background for contrast */
}

.btn-sm.btn-outline-danger {
  border-color: var(--coral);
  color: var(--coral);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.btn-sm.btn-outline-danger:hover {
  background-color: var(--coral);
  border-color: var(--danger);
  color: white;
}

/* Icon spacing in comment buttons */
.btn-sm i {
  font-size: 0.7rem;
  margin-right: 0.25rem;
}

/* Photography portfolio enhancements */
.photo-metadata {
  background: rgba(13, 13, 13, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.75rem;
  position: absolute;
  bottom: 10px;
  left: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* backdrop-filter removed for W3C validation compliance */
}

.card:hover .photo-metadata {
  opacity: 1;
}

/* Enhanced image effects */
.card-img-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: all 0.6s ease;
  transform: translateX(-100%);
  z-index: 1;
}

.card:hover .card-img-wrapper::before {
  opacity: 1;
  transform: translateX(100%);
}

/* Professional gallery grid - use Bootstrap grid like home page */
.photo-grid {
  /* Removed CSS grid to use Bootstrap flexbox grid system like home page */
  margin: 2rem 0;
}

/* Enhanced profile stats with animations */
.profile-stats {
  display: flex;
  /* gap replaced with margin for W3C validation compliance */
  justify-content: center;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--primary);
  border-radius: 16px;
  /* backdrop-filter removed for W3C validation compliance */
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.profile-stats .stat {
  text-align: center;
  transition: transform 0.3s ease;
  margin: 0 0.5rem;
  min-width: 60px;
  max-width: 80px;
  flex: 1;
}

.profile-stats .stat:hover {
  transform: translateY(-5px);
}

.profile-stats .stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--coral);
  display: block;
  /* W3C compliant gradient text effect removed for validation */
}

.profile-stats .stat .label {
  font-size: 0.75rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
  max-width: 80px;
  margin: 0 auto;
}

.profile-meta {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Form enhancements */
.form-control {
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 0.2rem rgba(255, 105, 87, 0.25);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.form-label,
label {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Enhanced footer */
footer.site-footer {
  padding: 48px 0;
  color: var(--text-secondary);
  background: linear-gradient(
    135deg,
    rgba(26, 26, 26, 0.9) 0%,
    rgba(45, 45, 45, 0.9) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4rem;
}

/* Advanced animations and micro-interactions */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Page load animations */
.card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.2s;
}
.card:nth-child(3) {
  animation-delay: 0.3s;
}
.card:nth-child(4) {
  animation-delay: 0.4s;
}
.card:nth-child(5) {
  animation-delay: 0.5s;
}
.card:nth-child(6) {
  animation-delay: 0.6s;
}

.jumbotron {
  animation: slideInFromLeft 0.8s ease-out;
}

/* Enhanced loading states and micro-interactions */
.btn:active {
  transform: translateY(0);
}

/* Enhanced responsive design for cards */
@media (max-width: 768px) {
  .jumbotron {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
  }

  .profile-stats {
    /* gap replaced with margin for W3C validation compliance */
    padding: 1rem;
  }

  .profile-stats .stat {
    margin: 0 8px;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  /* Mobile card adjustments - removed padding override to match home page */

  /* Card image wrapper aspect ratio removed - using base 75% for consistency */

  .card-meta {
    flex-direction: column;
    align-items: flex-start;
    /* gap replaced with margin for W3C validation compliance */
  }

  .card-meta > * {
    margin-bottom: 0.5rem;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .card {
    background: rgba(255, 255, 255, 0.95);
  }

  .card-minimal {
    background: rgba(255, 255, 255, 0.9);
  }
}

/* =================================
   COMPREHENSIVE RESPONSIVE DESIGN
   ================================= */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  :root {
    --container-max-width: 100%;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Navigation adjustments for mobile */
  .navbar {
    padding: 0.25rem 0;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }

  /* Search form on mobile */
  .search-form {
    width: 100%;
    margin: 1rem 0;
    min-width: auto;
  }

  .search-form .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Dropdown positioning on mobile */
  .dropdown-menu {
    position: fixed !important;
    top: auto !important;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }

  .notification-dropdown {
    width: auto !important;
  }

  /* Typography for very small screens */
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4 {
    font-size: 1.1rem;
  }

  /* Card grid - single column */
  .row .col-md-4,
  .row .col-lg-4,
  .row .col-sm-6 {
    margin-bottom: 1.5rem;
  }

  /* Profile section mobile adjustments */
  .profile-stats-container {
    margin-bottom: 2rem !important;
  }

  .profile-stats-container .row {
    margin: 0;
  }

  .profile-stats-container .col-3 {
    padding: 0 0.25rem;
  }

  .stat-item {
    padding: 1rem 0.5rem !important;
  }

  .stat-number {
    font-size: 1.25rem !important;
  }

  .stat-label {
    font-size: 0.75rem !important;
  }

  /* Button adjustments - larger touch targets */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-height: 44px; /* iOS minimum touch target */
  }

  .btn-sm {
    padding: 0.5rem 1rem;
    min-height: 38px;
  }

  /* Form adjustments */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
    min-height: 44px;
  }

  .form-control:focus {
    border-color: var(--highlight);
    box-shadow: 0 0 0 0.2rem rgba(212, 165, 116, 0.25);
  }

  /* Form labels and text */
  .form-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
  }

  .form-text {
    font-size: 0.875rem;
  }

  /* File input improvements */
  .form-control[type="file"] {
    padding: 0.5rem;
  }

  /* Textarea improvements */
  textarea.form-control {
    min-height: 120px;
    resize: vertical;
  }

  /* Form layout on mobile */
  .row .col-md-6 {
    margin-bottom: 1rem;
  }

  /* Card forms mobile optimization */
  .card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  }

  .card-header {
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    padding: 1.25rem;
  }

  /* Card body padding removed to match home page */

  /* Jumbotron adjustments */
  .jumbotron {
    padding: 2rem 1.5rem !important;
    text-align: center;
  }

  .display-4 {
    font-size: 2rem !important;
  }

  /* Card improvements for mobile */
  .card {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
  }

  /* Card body padding removed to match home page */

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  /* Photo card specific adjustments - removed to match home page cards */

  /* Profile page mobile optimizations */
  .profile-sidebar {
    margin-bottom: 2rem;
  }

  .profile-photos-section h2 {
    font-size: 1.5rem;
  }

  .photo-grid .col-sm-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Hero section mobile adjustments */
  .profile-hero-image {
    height: 300px !important;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-title {
    font-size: 1.75rem !important;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem;
  }

  .hero-avatar,
  .hero-avatar-initials {
    width: 70px !important;
    height: 70px !important;
    font-size: 20px !important;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --container-max-width: 540px;
  }

  /* Navigation improvements */
  .search-form {
    min-width: 250px;
  }

  /* Two-column layout for small tablets */
  .row .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Adjust card spacing */
  .card {
    margin-bottom: 1.5rem;
  }

  /* Profile hero adjustments */
  .profile-hero-image {
    height: 350px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  /* Profile stats responsive */
  .profile-stats-container .col-3 {
    padding: 0 0.5rem;
  }

  .stat-item {
    padding: 1.25rem 0.75rem !important;
  }

  /* Button improvements */
  .btn {
    min-height: 40px;
  }

  /* Form improvements */
  .form-control {
    min-height: 40px;
  }

  /* Card body padding removed to match home page */

  /* Profile photos responsive layout */
  .photo-grid .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --container-max-width: 720px;
  }

  /* Three-column layout for tablets */
  .row .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  /* Navigation improvements */
  .search-form {
    min-width: 280px;
  }

  /* Profile hero adjustments */
  .profile-hero-image {
    height: 450px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  /* Profile stats for tablets */
  .profile-stats-container .col-3 {
    padding: 0 0.75rem;
  }

  .stat-item {
    padding: 1.5rem 1rem !important;
  }

  /* Card improvements */
  .card {
    margin-bottom: 2rem;
  }

  /* Card body padding removed - using base padding to match home page */

  /* Touch-friendly buttons */
  .btn {
    min-height: 42px;
    padding: 0.625rem 1.25rem;
  }

  .btn-sm {
    min-height: 36px;
    padding: 0.5rem 1rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  :root {
    --container-max-width: 960px;
  }

  /* Reset mobile-specific overrides for desktop */
  .btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    min-height: auto !important;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    min-height: auto !important;
  }

  .form-control {
    font-size: 0.875rem !important;
    padding: 0.375rem 0.75rem !important;
    min-height: auto !important;
  }

  /* Card improvements for desktop */
  .card {
    margin-bottom: 1.5rem !important;
    border-radius: 16px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  .card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
  }

  /* Removed card-body padding override to match home page card sizing */

  /* Card image wrapper aspect ratio removed - using base 75% for consistency */

  /* Profile photos responsive layout reset */
  .photo-grid .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  /* Optimal four-column layout */
  .row .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }

  .row .col-lg-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }

  /* Enhanced navigation */
  .navbar {
    padding: 1rem 0;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }

  /* Profile hero full potential */
  .profile-hero-image {
    height: 500px !important;
  }

  .hero-title {
    font-size: 3rem !important;
  }

  .hero-subtitle {
    font-size: 1.25rem !important;
  }

  /* Profile stats improvements for desktop */
  .profile-stats-container .col-3 {
    padding: 0 1rem !important;
  }

  .stat-item {
    padding: 1.5rem 1rem !important;
  }

  .stat-number {
    font-size: 1.5rem !important;
  }

  .stat-label {
    font-size: 0.875rem !important;
  }

  /* Better spacing for content */
  .jumbotron {
    padding: 4rem 2rem !important;
  }

  /* Search improvements */
  .search-form {
    min-width: 300px !important;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  :root {
    --container-max-width: 1140px;
  }

  /* Reset mobile overrides for large desktop */
  .btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    min-height: auto !important;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    min-height: auto !important;
  }

  .form-control {
    font-size: 0.875rem !important;
    padding: 0.375rem 0.75rem !important;
    min-height: auto !important;
  }

  /* Maximum layout potential */
  .container {
    max-width: var(--container-max-width);
  }

  /* Enhanced card behavior for large desktop */
  .card {
    margin-bottom: 2rem !important;
    border-radius: 16px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  }

  .card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2) !important;
  }

  /* Removed card-body padding override to match home page card sizing */

  /* Card image wrapper aspect ratio removed - using base 75% for consistency */

  /* Column layout improvements */
  .row .col-lg-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }

  .photo-grid .col-sm-6 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }

  /* Five-column layout for very wide screens */
  @media (min-width: 1400px) {
    .row .col-xl-2-4 {
      flex: 0 0 20%;
      max-width: 20%;
    }

    .photo-grid .col-lg-4 {
      flex: 0 0 25% !important;
      max-width: 25% !important;
    }
  }

  /* Enhanced typography for large screens */
  h1 {
    font-size: 3.5rem !important;
  }
  h2 {
    font-size: 2.75rem !important;
  }

  /* Profile hero maximum impact */
  .profile-hero-image {
    height: 600px !important;
  }

  .hero-title {
    font-size: 4rem !important;
  }

  .hero-subtitle {
    font-size: 1.5rem !important;
  }

  /* Profile stats for large desktop */
  .profile-stats-container .col-3 {
    padding: 0 1.5rem !important;
  }

  .stat-item {
    padding: 2rem 1.5rem !important;
  }

  .stat-number {
    font-size: 2rem !important;
  }

  .stat-label {
    font-size: 1rem !important;
  }

  /* Enhanced navigation */
  .navbar {
    padding: 1.5rem 0 !important;
  }

  .navbar-brand {
    font-size: 1.75rem !important;
  }

  /* Better spacing for large screens */
  .jumbotron {
    padding: 5rem 3rem !important;
  }

  .display-4 {
    font-size: 3.5rem !important;
  }

  /* Search improvements */
  .search-form {
    min-width: 400px !important;
  }
}

/* Ultra Wide Screens (1600px and up) */
@media (min-width: 1600px) {
  :root {
    --container-max-width: 1400px;
  }

  /* Maximum content width to maintain readability */
  .container {
    max-width: var(--container-max-width);
  }

  /* Enhanced grid for ultra-wide */
  .row .col-xxl-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }

  /* Ultra-wide specific adjustments */
  .profile-hero-image {
    height: 700px;
  }
}

/* Landscape Orientation Specific */
@media (orientation: landscape) and (max-height: 500px) {
  .profile-hero-image {
    height: 300px;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .jumbotron {
    padding: 2rem 1rem;
  }
}

/* High DPI Displays */
@media (min-resolution: 192dpi), (min-resolution: 2dppx) {
  /* Enhanced image quality for retina displays */
  .card-img-wrapper img,
  .profile-hero-image img {
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .search-container {
    display: none !important;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* Optimizations for narrower sidebar (col-lg-2) layout */
@media (min-width: 992px) {
  .col-lg-2 .profile-stats-container {
    padding: 0.75rem 0.5rem !important;
  }

  .col-lg-2 .profile-stats-container .col-3 {
    padding: 0 0.25rem !important;
  }

  .col-lg-2 .stat-item {
    padding: 0.75rem 0.25rem !important;
    font-size: 0.85rem;
  }

  .col-lg-2 .stat-number {
    font-size: 1.1rem !important;
  }

  .col-lg-2 .stat-label {
    font-size: 0.7rem !important;
    line-height: 1.2;
  }

  .col-lg-2 .profile-info {
    padding: 0.75rem !important;
    font-size: 0.9rem;
  }

  .col-lg-2 .card-body {
    padding: 1rem 0.75rem !important;
  }

  .col-lg-2 .avatar-sm {
    width: 80px !important;
    height: 80px !important;
  }

  /* Ultra-narrow sidebar (col-lg-1) optimizations */
  .col-lg-1 .profile-stats-container {
    padding: 0.5rem 0.25rem !important;
  }

  .col-lg-1 .profile-stats-container .col-3 {
    padding: 0 0.1rem !important;
  }

  .col-lg-1 .stat-item {
    padding: 0.5rem 0.1rem !important;
    font-size: 0.75rem;
  }

  .col-lg-1 .stat-number {
    font-size: 0.9rem !important;
  }

  .col-lg-1 .stat-label {
    font-size: 0.6rem !important;
    line-height: 1.1;
  }

  .col-lg-1 .profile-info {
    padding: 0.5rem !important;
    font-size: 0.8rem;
  }

  .col-lg-1 .card-body {
    padding: 0.75rem 0.5rem !important;
  }

  .col-lg-1 .avatar-sm {
    width: 60px !important;
    height: 60px !important;
  }
}

/* ================================
   UNIFIED DELETE MODAL STYLING
   ================================ */

/* Modal backdrop with sophisticated dark overlay */
.modal-backdrop {
  background-color: rgba(28, 28, 28, 0.85);
  backdrop-filter: blur(8px);
}

/* Shared modal styling for both photo and comment delete modals */
#deletePhotoModal .modal-dialog,
#deleteCommentModal .modal-dialog {
  margin: 2rem auto;
  max-width: 500px;
}

/* Modal content matching your card design */
#deletePhotoModal .modal-content,
#deleteCommentModal .modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  overflow: hidden;
}

/* Modal header with unified danger styling using your theme */
#deletePhotoModal .modal-header,
#deleteCommentModal .modal-header {
  background: linear-gradient(135deg, var(--danger) 0%, #8b4513 100%);
  border-bottom: 1px solid rgba(160, 82, 45, 0.3);
  color: var(--accent);
  padding: 1.25rem 1.5rem;
}

#deletePhotoModal .modal-title,
#deleteCommentModal .modal-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
}

#deletePhotoModal .btn-close,
#deleteCommentModal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

#deletePhotoModal .btn-close:hover,
#deleteCommentModal .btn-close:hover {
  opacity: 1;
}

/* Modal body styling */
#deletePhotoModal .modal-body,
#deleteCommentModal .modal-body {
  padding: 2rem 1.5rem;
  background: var(--card-bg);
}

/* Photo preview in modal */
#deletePhotoModal #deletePhotoImage {
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-color);
  transition: transform 0.3s ease;
}

#deletePhotoModal #deletePhotoImage:hover {
  transform: scale(1.02);
}

/* Photo title styling */
#deletePhotoModal #deletePhotoTitle {
  color: var(--highlight);
  font-weight: 600;
  font-size: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Comment preview styling */
#deleteCommentModal .border {
  border-color: var(--border-color) !important;
  border-radius: 12px !important;
  padding: 1rem !important;
}

#deleteCommentModal #deleteCommentAuthor {
  color: var(--highlight);
  font-weight: 600;
}

#deleteCommentModal #deleteCommentText {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
}

#deleteCommentModal #deleteCommentPhotoTitle {
  color: var(--highlight);
  font-weight: 600;
}

/* Warning alert matching your theme */
#deletePhotoModal .alert-warning,
#deleteCommentModal .alert-warning {
  background: linear-gradient(
    135deg,
    rgba(212, 165, 116, 0.15) 0%,
    rgba(139, 111, 71, 0.1) 100%
  );
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 1rem 1.25rem;
}

#deletePhotoModal .alert-warning i,
#deleteCommentModal .alert-warning i {
  color: var(--highlight);
}

/* Modal footer */
#deletePhotoModal .modal-footer,
#deleteCommentModal .modal-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  gap: 0.75rem;
}

/* Unified button styling */
#deletePhotoModal .btn-secondary,
#deleteCommentModal .btn-secondary {
  background: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

#deletePhotoModal .btn-secondary:hover,
#deleteCommentModal .btn-secondary:hover {
  background: var(--border-color);
  border-color: var(--highlight);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Unified danger button styling */
#deletePhotoModal .btn-danger,
#deletePhotoModal .btn-warning,
#deleteCommentModal .btn-danger,
#deleteCommentModal .btn-warning {
  background: linear-gradient(135deg, var(--danger) 0%, #8b4513 100%);
  border: 1px solid var(--danger);
  color: var(--accent);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(160, 82, 45, 0.3);
}

#deletePhotoModal .btn-danger:hover,
#deletePhotoModal .btn-warning:hover,
#deleteCommentModal .btn-danger:hover,
#deleteCommentModal .btn-warning:hover {
  background: linear-gradient(135deg, #b8956b 0%, var(--danger) 100%);
  border-color: #b8956b;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(160, 82, 45, 0.4);
}

/* Subtle animation for modal appearance */
#deletePhotoModal.fade .modal-dialog,
#deleteCommentModal.fade .modal-dialog {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#deletePhotoModal.show .modal-dialog,
#deleteCommentModal.show .modal-dialog {
  transform: scale(1);
}

/* Mobile responsiveness */
@media (max-width: 576px) {
  #deletePhotoModal .modal-dialog,
  #deleteCommentModal .modal-dialog {
    margin: 1rem;
    max-width: none;
  }

  #deletePhotoModal .modal-body,
  #deleteCommentModal .modal-body {
    padding: 1.5rem 1rem;
  }

  #deletePhotoModal .modal-footer,
  #deleteCommentModal .modal-footer {
    padding: 1rem;
    flex-direction: column;
  }

  #deletePhotoModal .modal-footer .btn,
  #deleteCommentModal .modal-footer .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}

/* ================================
   EDIT PROFILE HEADER STYLING
   ================================ */

/* Edit profile header to match website theme */
.edit-profile-header {
  background: linear-gradient(
    135deg,
    var(--highlight) 0%,
    #b8956b 100%
  ) !important;
  color: var(--primary) !important;
  border-bottom: 1px solid rgba(212, 165, 116, 0.3);
  padding: 1.25rem 1.5rem;
  border-radius: 20px 20px 0 0;
}

.edit-profile-header h3 {
  color: var(--primary) !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.edit-profile-header i {
  color: var(--primary) !important;
}

/* Logout button form styling for W3C compliance */
.dropdown-item[type="submit"] {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.25rem 1rem;
  color: inherit;
  display: block;
  cursor: pointer;
}

.dropdown-item[type="submit"]:hover {
  background-color: var(--bs-dropdown-link-hover-bg, #e9ecef);
  color: var(--bs-dropdown-link-hover-color, #1e2125);
}

/* Modal comment preview styling */
.modal .border.rounded.p-3 {
  background: var(--bg-secondary);
}

/* Profile stat styling classes */
.stat-number {
  color: #d4a574;
  color: var(--highlight);
  white-space: nowrap;
}

.stat-number-coral {
  color: #c8956d;
  color: var(--coral);
}

.stat-icon {
  color: #d4c19f;
  color: var(--text-secondary);
}

.stat-icon-coral {
  color: #c8956d;
  color: var(--coral);
}

.profile-link {
  color: #d4a574;
  color: var(--highlight);
}

/* Modal photo preview styling */
.modal-photo-preview {
  max-height: 200px;
}

/* Avatar sizing classes */
.avatar-list-size {
  width: 50px;
  height: 50px;
}

/* Icon sizing classes */
.icon-large {
  font-size: 3rem;
}

/* Edit profile image sizing */
.profile-edit-avatar {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.profile-edit-hero {
  max-height: 150px;
  width: 100%;
  object-fit: cover;
}

/* Font Awesome base class adjustments */
i[class^="fa-"] {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  display: inline-block;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}