/*
Theme Name: Matrimony UI
Description: Modern Seeko Style (Transparent Header + Fixes)
Version: 3.5
*/

/* =========================================
   1. GLOBAL RESET & TYPOGRAPHY
   ========================================= */
* {
  box-sizing: border-box; 
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f7f6; /* Page Background */
  color: #2b2b2b;
  overflow-x: hidden;
  width: 100%;
  
  /* CRITICAL CHANGE: 0 padding so header floats OVER the content */
  padding-top: 0; 
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}
/* Default: Add padding so content isn't hidden behind the Black Header */
body {
  padding-top: 90px; /* Push content down on internal pages */
}

/* Home Page: No padding, because we want the image to go BEHIND the header */
body.home {
  padding-top: 0;
}

/* =========================================
   2. HEADER (Sticky & Centered)
   ========================================= */

/* A. DEFAULT STATE (Internal Pages like Members) 
   Background is Solid Black so White text is visible. */
.site-header {
  background: #000000; /* Solid Black */
  height: 80px;
  width: 100%;
  
  /* STICKY/FIXED: Stays pinned to the top */
  position: fixed; 
  top: 0;
  left: 0;
  z-index: 9999;
  
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
}

/* B. HOME PAGE ONLY (Transparent)
   Background is transparent to show the hero image. */
body.home .site-header {
  background: transparent; 
  box-shadow: none;
}

/* C. SCROLLED STATE (All Pages)
   Turns black and shrinks when scrolling down. */
.site-header.scrolled,
body.home .site-header.scrolled {
  background: #000000;
  height: 70px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* LAYOUT CONTAINER */
.header-inner {
  /* CHANGED: 1200px brings Logo & Menu closer on large screens */
  max-width: 1200px; 
  margin: 0 auto;
  padding: 0 24px;
  height: 100%; 
  
  display: flex;
  align-items: center; 
  justify-content: space-between; /* Keeps them separated but within the 1200px box */
}

/* LOGO */
.header-logo {
  display: flex;
  align-items: center;
  height: 100%; 
}

.header-logo .custom-logo-link img, 
.header-logo img {
  max-height: 45px; 
  width: auto;
  display: block;
  transition: all 0.3s ease;
}

/* Shrink logo on scroll */
.site-header.scrolled .header-logo img {
  max-height: 38px;
}

/* =========================================
   3. DESKTOP NAVIGATION
   ========================================= */
.main-nav {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: auto; 
  margin-right: 20px;
  max-width: 60%;
  overflow: hidden; 
}

.main-nav ul,
.main-nav .menu,
.main-nav div > ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 30px; /* More space between items */
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.main-nav li {
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
}

.main-nav a {
  color: #ffffff; /* FORCE WHITE (for dark background) */
  font-size: 15px;
  font-weight: 500;
  text-transform: capitalize; /* "Home" looks cleaner than "HOME" */
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: relative;
}

/* Hover Effect */
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: #FF2C55; /* Seeko Pink/Red */
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.account-btn {
  background: #FF2C55;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
}

.mobile-toggle {
  display: none; 
  color: #ffffff; 
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

/* =========================================
   4. MEMBER GRID LAYOUT (4-Col Big Mode)
   ========================================= */
div.item-list-tabs,
div#subnav,
div.dir-search, 
.bp-screen-reader-text {
  display: none !important;
}

.members-grid {
  display: grid;
  /* Use auto-fill + minmax so tiles don't shrink to 1/4th width when alone */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; 
  gap: 30px;
  max-width: 95%; 
  margin: 40px auto; 
  padding: 0 24px;
  
  /* Centers the items if there is only one or two profiles */
  justify-content: center; 
}

.member-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.member-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.member-card:hover .card-image-wrapper img {
  transform: scale(1.08);
}

.card-content {
  padding: 20px;
  text-align: center;
}

.card-name {
  margin: 5px 0;
  font-size: 18px;
  font-weight: 700;
}

.card-name a { color: #222; }
.card-name a:hover { color: #FF2C55; }

.activity-time {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
}

/* =========================================
   5. FILTER BAR
   ========================================= */
.filter-container {
  max-width: 95%; 
  margin: 120px auto 0; /* Adjusted for Fixed Header */
  padding: 0 24px;
}

.filter-toggle-btn {
  background: #fff;
  color: #333;
  border: 1px solid #eee;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
}

#member-filters-form {
  background: #fff;
  padding: 20px;
  margin-top: 10px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* =========================================
   6. MOBILE & TABLET RESPONSIVE
   ========================================= */
/* Mobile Menu Drawer */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: #111; /* Dark Theme Drawer */
  z-index: 10000;
  padding: 30px;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.menu-close-btn {
  align-self: flex-end;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  margin-bottom: 30px;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

/* Tablet */
@media (max-width: 1200px) {
  .members-grid {
    grid-template-columns: repeat(3, 1fr); 
  }
}

/* Mobile */
@media (max-width: 900px) {
  .site-header {
    background: #000; /* Force black on mobile */
  }

  .main-nav { display: none !important; }
  .mobile-toggle { display: block !important; }
  .header-actions .account-btn { display: none; }

  .members-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    padding: 0 16px;
    margin-top: 90px;
  }
  
  .filter-container { margin-top: 90px; }

  .card-content { padding: 12px; }
  .card-name { font-size: 15px; }
  
  .member-card div.friendship-button a {
      width: 38px;
      height: 38px;
  }
}

/* =========================================
   7. DYNAMIC FRIEND BUTTON (GRID)
   ========================================= */
.member-card div.friendship-button {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    z-index: 10;
    width: auto !important;
}

/* A. DEFAULT: Add Friend (Pink Gradient) */
.member-card div.friendship-button a,
.member-card div.friendship-button.add a, 
.member-card div.friendship-button.not_friends a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF2C55, #FF5C7C) !important; 
    box-shadow: 0 4px 15px rgba(255, 44, 85, 0.4);
    font-size: 0 !important;
    color: transparent !important;
}

.member-card div.friendship-button a::before,
.member-card div.friendship-button.add a::before,
.member-card div.friendship-button.not_friends a::before {
    content: "\2b"; /* Plus Icon */
    font-family: "Font Awesome 6 Free", FontAwesome, sans-serif !important;
    font-weight: 900 !important;
    font-size: 20px !important;
    color: #ffffff !important;
}

/* =========================================
   FIX: FRIEND BUTTON COLORS (Members Grid)
   ========================================= */

/* 1. REQUEST SENT -> Change to YELLOW (Was Green) */
/* Meaning: "Pending / Waiting for them" */
.member-card div.friendship-button.pending_friend a {
    background: #FFC107 !important; /* Amber Yellow */
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4) !important;
}

/* Update Icon to a "Clock" to signify waiting (Optional, looks better with yellow) */
.member-card div.friendship-button.pending_friend a::before {
    content: "\f017" !important; /* Clock Icon */
    color: #000 !important;       /* Black icon is easier to read on Yellow */
}

/* Hover Effect for Sent Request (Cancel) */
.member-card div.friendship-button.pending_friend a:hover {
    background: #dc3545 !important; /* Red */
}
.member-card div.friendship-button.pending_friend a:hover::before {
    content: "\f00d" !important; /* X Icon */
    color: #fff !important;
}

/* 2. REQUEST RECEIVED -> Change to BLUE (Was Yellow) */
/* Meaning: "Check this / Action needed" */
.member-card div.friendship-button.awaiting_response_friend a {
    background: #2196f3 !important; /* Material Blue */
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3) !important;
}

/* Target the Blue "Request Received" Button */
.member-card div.friendship-button.awaiting_response_friend a::before {
    content: "\f017" !important; /* Change to Clock/Timer Icon */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: #fff !important;      /* Keep icon White so it stands out on Blue */
}

/* Optional: Slight hover effect to show it's active */
.member-card div.friendship-button.awaiting_response_friend a:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.5) !important;
}

/* D. ALREADY FRIENDS (Green User Icon) */
.member-card div.friendship-button.is_friend a,
.member-card div.friendship-button.remove a {
    background: #25d366 !important;
}
.member-card div.friendship-button.is_friend a::before,
.member-card div.friendship-button.remove a::before {
    content: "\f007" !important; /* User Icon */
}

/* =========================================
   8. SINGLE MEMBER PROFILE (Big Photo)
   ========================================= */

/* Layout Container */
.single-profile-container {
  max-width: 1200px;
  /* Changed 120px to 30px. 
     Since your body already has padding-top: 90px for the header, 
     we only need a small 30px gap here. */
  margin: 30px auto 60px !important; 
  padding: 0 20px;
  
  display: grid;
  grid-template-columns: 400px 1fr; 
  gap: 40px;
  align-items: start; 
}

/* --- LEFT SIDEBAR --- */
.sidebar-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px; 
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  position: sticky;
  top: 100px; 
  overflow: hidden;
}

/* BIG RECTANGLE PHOTO WRAPPER */
.hero-avatar-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 25px;
}

/* The Actual Image */
.hero-avatar-wrapper img.hero-profile-img {
  width: 100%;       /* Full width of the card */
  height: auto;      /* Maintain aspect ratio */
  display: block;
  border-radius: 12px; /* Soft rounded corners (Rectangle) */
  object-fit: cover; /* Ensures it fills space nicely */
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Online Status Badge (Top Left of Image) */
.online-status-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  z-index: 5;
}

.online-status-badge.online {
  background: #25d366; /* WhatsApp Green */
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.4);
}

.online-status-badge.offline {
  background: #ccc;
  color: #555;
}
/* --- OWNER ACTION BUTTONS --- */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Edit Info (Blue/Dark) */
.action-btn.edit {
  background: #f0f2f5;
  color: #333;
}
.action-btn.edit:hover {
  background: #e4e6eb;
  color: #000;
}

/* Photo (Pink Theme) */
.action-btn.photo {
  background: #FF2C55;
  color: #fff;
}
.action-btn.photo:hover {
  background: #ff4f70;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 44, 85, 0.4);
}
.profile-name-main {
  font-size: 26px; /* Slightly bigger font */
  font-weight: 700;
  margin: 0 0 5px;
  color: #222;
}

.profile-tagline {
  color: #777;
  font-size: 16px;
  margin-bottom: 25px;
}

/* Action Buttons Container */
.profile-actions-centered {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

/* Sidebar Meta Data */
.sidebar-meta {
  border-top: 1px solid #eee;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
}

.meta-item {
  text-align: left;
}
.meta-item:last-child {
  text-align: right;
}

.meta-item span {
  display: block;
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
}
.meta-item strong {
  display: block;
  color: #333;
  font-size: 14px;
}

/* --- RIGHT CONTENT CARDS --- */
.profile-section-card {
  background: #fff;
  border-radius: 15px;
  padding: 0; 
  margin-bottom: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03);
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.profile-section-card .card-header {
  padding: 20px 30px;
  border-bottom: 1px solid #f9f9f9;
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-section-card .card-header i {
  font-size: 20px;
  color: #FF2C55; /* Theme Pink */
}

.profile-section-card .card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.profile-section-card .card-body {
  padding: 30px;
}

/* Details Grid List */
ul.details-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 20px;
}

ul.details-grid li {
  display: flex;
  flex-direction: column;
}

ul.details-grid li.full-width {
  grid-column: span 2;
}

ul.details-grid .label {
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
}

ul.details-grid .value {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

/* Contact Locked Special Style */
.contact-locked {
  background: #fff5f6; 
  border: 1px dashed #ffcad4;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
  .single-profile-container {
    grid-template-columns: 1fr; 
    gap: 30px;
    margin-top: 90px;
  }

  .sidebar-card {
    position: static; 
    padding: 20px;
  }
  
  .hero-avatar-wrapper img.hero-profile-img {
      max-height: 500px; /* Prevent it from being too tall on mobile */
  }

  ul.details-grid {
    grid-template-columns: 1fr; 
  }
}
/* =========================================
   9. EDIT PROFILE & PHOTO STYLES
   ========================================= */

/* Spacing inside the edit card */
.edit-mode-body {
    padding: 30px;
}

/* Form Groups */
.editfield {
    margin-bottom: 25px;
}

.editfield label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Inputs (Text, Textarea, Select) */
.editfield input[type="text"],
.editfield textarea,
.editfield select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    background: #fdfdfd;
    transition: all 0.3s;
}

.editfield input:focus,
.editfield textarea:focus {
    border-color: #FF2C55;
    background: #fff;
    outline: none;
}

/* "Save Changes" Button */
#profile-group-edit-submit,
#upload {
    background: #FF2C55;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

#profile-group-edit-submit:hover,
#upload:hover {
    background: #e61e45;
}

/* Tab Navigation (Basic, Extended etc.) */
#item-body .item-list-tabs {
    display: block !important; /* Force show tabs only in edit mode */
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

#item-body .item-list-tabs ul {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#item-body .item-list-tabs li a {
    color: #777;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

#item-body .item-list-tabs li.current a,
#item-body .item-list-tabs li.selected a {
    background: #f0f2f5;
    color: #000;
}
/* =========================================
   10. HIDE PRIVACY / VISIBILITY OPTIONS
   ========================================= */

/* Hides the "This field can be seen by: Everyone" text */
.field-visibility-settings-toggle,
.visibility-toggle-link {
    display: none !important;
}

/* Hides the radio buttons selection box if it's already open */
.field-visibility-settings, 
.field-visibility-settings-notoggle {
    display: none !important;
}

/* Optional: Hides the description text under inputs if you want a cleaner look */
p.description {
    display: none; 
}
/* Delete Profile Link (Sidebar) */
.delete-profile-link {
    display: block;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
}

.delete-profile-link:hover {
    color: #dc3545; /* Red on hover */
    text-decoration: underline;
}

/* Delete Confirmation Button (Inside the form) */
#delete-account-button {
    background: #dc3545 !important; /* Red */
    color: #fff !important;
    border: none !important;
    padding: 10px 25px !important;
    border-radius: 30px !important;
    cursor: pointer;
}
/* =========================================
   12. OWNER NAVIGATION TABS
   ========================================= */

.profile-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #fff;
    padding: 10px;
    border-radius: 50px; /* Pill Shape */
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    flex-wrap: wrap;
}

.profile-nav-tabs a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

/* Icons */
.profile-nav-tabs a i {
    font-size: 16px;
}

/* Hover State */
.profile-nav-tabs a:hover {
    background: #f5f5f5;
    color: #000;
}

/* Active State (Selected Tab) */
.profile-nav-tabs a.active {
    background: #FF2C55;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 44, 85, 0.3);
}

/* Notification Badges (Red Numbers) */
.nav-badge {
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Active Badge color change */
.profile-nav-tabs a.active .nav-badge {
    background: #fff;
    color: #FF2C55;
}

/* Mobile: Scrollable Menu */
@media (max-width: 768px) {
    .profile-nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 15px; /* Less round on mobile */
        justify-content: flex-start;
    }
    .profile-nav-tabs a {
        flex-shrink: 0;
    }
}
/* =========================================
   13. MODERN INTERNAL PAGES (Messages, Notifs, etc.)
   ========================================= */

/* --- A. COMMON TABLE STYLES (Messages & Notifications) --- */
#buddypress table.messages-notices,
#buddypress table.notifications {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* Space between rows */
    border: none;
}

#buddypress table thead tr {
    background: transparent;
}

#buddypress table thead th {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    padding: 0 15px 10px;
    border: none;
    letter-spacing: 0.5px;
}

/* The "Card" Row */
#buddypress table tbody tr {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

#buddypress table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    z-index: 2;
    position: relative;
}

#buddypress table td {
    padding: 20px;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
    color: #555;
    font-size: 14px;
}

/* Rounded corners for the row */
#buddypress table td:first-child {
    border-left: 1px solid #f5f5f5;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
#buddypress table td:last-child {
    border-right: 1px solid #f5f5f5;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Unread Messages Highlight */
#buddypress table tr.unread {
    background: #fff5f7; /* Very light pink bg */
    border-left: 3px solid #FF2C55;
}

/* Avatars in Lists */
#buddypress table td img.avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    vertical-align: middle;
    margin-right: 10px;
}

/* --- B. MESSAGES SPECIFIC --- */
#message-threads {
    margin-top: 20px;
}

/* Compose Button & Action Bar */
#buddypress .messages-options-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 15px;
}

#buddypress a#compose-message-button {
    background: #FF2C55;
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 44, 85, 0.3);
}

/* --- C. NOTIFICATIONS SPECIFIC --- */
#buddypress table.notifications .notification-description a {
    color: #333;
    font-weight: 600;
}
#buddypress table.notifications .notification-since {
    font-size: 12px;
    color: #999;
}

/* Action Buttons (Mark Read / Delete) */
#buddypress table.notifications .actions a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 11px;
    color: #777;
    margin-right: 5px;
    transition: 0.2s;
}
#buddypress table.notifications .actions a.mark-read:hover {
    background: #e6ffea;
    border-color: #25d366;
    color: #25d366;
}
#buddypress table.notifications .actions a.delete:hover {
    background: #fff0f0;
    border-color: #dc3545;
    color: #dc3545;
}

/* --- D. FRIENDS TAB CLEANUP --- */
/* Hide the main member filter when inside a profile (it looks cluttered) */
.single-profile-container .filter-container {
    display: none !important;
}

/* Ensure the grid fits the tab area */
.single-profile-container .members-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 Cols inside profile tab */
    padding: 0;
    margin-top: 0;
}



/* --- F. rtMEDIA (Photos Tab) --- */
/* Grid Layout for Photos */
.rtmedia-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 0;
    list-style: none;
}

.rtmedia-list li.rtmedia-list-item {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    width: 100% !important;
}

.rtmedia-item-thumbnail {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1;
}

.rtmedia-item-thumbnail:hover {
    transform: scale(1.03);
}

.rtmedia-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* =========================================
   SIDEBAR ACTION BUTTONS (Friend & Message) - FIXED
   ========================================= */

/* 1. Container: Use Flexbox to align them properly */
.profile-actions-centered {
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between buttons */
    flex-wrap: wrap; /* Allow wrapping only on very small screens */
}

.profile-actions-centered div.generic-button, 
.profile-actions-centered .friendship-button, 
.profile-actions-centered #send-private-message {
    margin: 0 !important; /* Remove default margins */
}

/* 2. Base Button Style */
.profile-actions-centered a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px !important; /* Slightly reduced padding to fit */
    border-radius: 30px !important;
    font-size: 13px !important; /* Slightly smaller font */
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: none !important;
    line-height: 1 !important;
    white-space: nowrap !important; /* PREVENTS TEXT FROM BREAKING INTO 2 LINES */
    min-width: 120px; /* Ensures buttons have consistent width */
}

/* Hover Effect */
.profile-actions-centered a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* 3. "Add Friend" (Pink) */
.profile-actions-centered .friendship-button a,
.profile-actions-centered a.friendship-button,
.profile-actions-centered a.add {
    background: #FF2C55 !important;
    color: #fff !important;
}

/* Plus Icon */
.profile-actions-centered .friendship-button a::before {
    content: "\2b"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 6px;
}

/* 4. "Message" (Black) */
.profile-actions-centered #send-private-message a,
.profile-actions-centered a.send-message {
    background: #222 !important;
    color: #fff !important;
}

/* Envelope Icon */
.profile-actions-centered #send-private-message a::before {
    content: "\f0e0"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 6px;
}

/* 5. REQUEST SENT (Pending) - Gray */
.profile-actions-centered .friendship-button.pending_friend a, 
.profile-actions-centered .friendship-button.remove a {
    background: #f0f2f5 !important;
    color: #555 !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
}

/* 6. REQUEST RECEIVED (Incoming) - Blue */
.profile-actions-centered .friendship-button.awaiting_response_message a {
    background: #2196f3 !important; /* Blue */
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3) !important;
}

/* =========================================
   FULL WIDTH MEMBERS DIRECTORY
   ========================================= */

/* 1. Override the Default Page Width specifically for Member Directory */
body.directory.members main {
    max-width: 100% !important;
    padding: 0 !important;
    margin-top: 0 !important; /* Let grid handle the spacing */
}

/* 2. Stretch the Grid Container */
.members-grid {
    max-width: 98% !important; /* Uses 98% of the screen */
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 100px !important; /* Space for the fixed header */
    padding: 0 20px !important;
}

/* 3. (Optional) Show 5 columns on very large screens */
@media (min-width: 1600px) {
    .members-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* 4. Keep the Filters aligned with the new width */
.filter-container {
    max-width: 98% !important;
    padding: 0 20px !important;
}
/* =========================================
   HIDE GENDER IN EDIT PROFILE
   ========================================= */
/* Prevents users from changing Gender (Field ID 10) after registration */
body.profile-edit .field_10, 
#profile-edit-form .field_10 {
    display: none !important;
}

/* =========================================
   MEMBER GRID: DYNAMIC COLUMN FIX
   ========================================= */
.members-grid {
    display: grid;
    /* Keeps tiles at a healthy size (min 250px) */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; 
    gap: 20px;
    max-width: 98% !important; 
    margin: 20px auto; 
    padding: 0 15px;
    justify-content: center; 
}

/* =========================================
   MOBILE & TABLET RESPONSIVE FIXES
   ========================================= */
@media (max-width: 768px) {
    /* 1. Fix Layout Container (Prevent sidebar from pushing content) */
    .bp-pf-layout {
        display: block !important; /* Remove flex on mobile */
        width: 100% !important;
    }

    /* 2. Fix the Members Grid on small screens */
    .members-grid {
        /* Force 2 columns on mobile instead of auto-fill to ensure they look big enough */
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important;
        padding: 0 10px !important;
        margin-top: 20px !important;
    }

    /* 3. Sidebar Mobile Overlay Fix */
    .bp-pf-sidebar {
        position: fixed !important;
        left: -100% !important; /* Start completely off-screen */
        top: 0 !important;
        height: 100vh !important;
        width: 80% !important; /* Take up 80% of screen */
        max-width: 300px;
        background: #fff !important;
        z-index: 99999 !important; /* Stay above everything */
        transition: left 0.3s ease !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2) !important;
        padding: 20px !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .bp-pf-sidebar.open {
        left: 0 !important; /* Slide in when open */
    }

    /* 4. Show the Filter Toggle Button clearly */
    .bp-pf-toggle {
        display: block !important;
        width: calc(100% - 30px);
        margin: 15px auto !important;
        background: #FF2C55 !important; /* Theme Pink */
        color: #fff !important;
        border: none;
        padding: 12px;
        border-radius: 8px;
        font-weight: 600;
    }

    /* 5. Adjust Card Content for Mobile */
    .card-content {
        padding: 10px !important;
    }
    .card-name {
        font-size: 14px !important;
    }
}
/* =========================================
   LAYOUT CONTROLLER (Fixes Slider Gap)
   ========================================= */

/* 1. All Pages (Default): Keep content centered with a gap */
main, .site-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: block;
}

/* 2. Home Page ONLY: Remove ALL gaps and limits */
body.home main,
body.home .site-main {
    max-width: 100% !important; /* Allow full width */
    margin: 0 !important;       /* REMOVE the 40px top margin */
    padding: 0 !important;      /* Remove side padding */
    width: 100% !important;
}

/* 3. Force the Slider to fill the screen */
body.home .calids-slider {
    width: 100%;
    display: block;
}
/* =========================================
   MEDIAPRESS (MPP) GRID STYLES
   ========================================= */

/* Force Grid Layout for MPP items */
.mpp-g, .mpp-u {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 20px !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Reset float/width behavior from default MPP styles */
.mpp-u-1-1, .mpp-u-1-2, .mpp-u-1-3, .mpp-u-1-4 {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

/* The Item Card */
.mpp-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.mpp-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Thumbnail Wrapper */
.mpp-item-entry.mpp-media-entry {
    margin: 0;
}

.mpp-item img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Force Square */
    object-fit: cover;
    display: block;
}

/* Title & Meta */
.mpp-item-meta {
    padding: 10px;
    text-align: center;
}

.mpp-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Hide unwanted MPP meta details if they clutter the view */
.mpp-meta-content {
    font-size: 12px;
    color: #999;
}
/* Custom Gallery Grid */
.custom-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-item {
    display: block;
    aspect-ratio: 1 / 1; /* Perfect Squares */
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
    border-color: #FF2C55;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* =========================================
   FIXED NAVIGATION ARROWS (Transparent & Floating)
   ========================================= */

/* 1. The Container - Transparent & Floating */
html body .mfp-wrap button.mfp-arrow {
    background-color: transparent !important; /* Forces transparency */
    background: none !important;              /* Double-check to kill gradients */
    box-shadow: none !important;              /* Removes shadow */
    border-radius: 0 !important;
    
    /* Size - Larger clickable area */
    width: 60px !important;
    height: 80px !important;
    padding: 0 !important;
    opacity: 1 !important;
    
    /* PERFECT VERTICAL CENTERING */
    top: 50% !important;
    transform: translateY(-50%) !important; 
    margin: 0 !important;
    
    /* Stick to Screen */
    position: fixed !important;
    z-index: 1046 !important;
    
    /* Flexbox Center */
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    border: none !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
}

/* 2. CRITICAL: Remove Default Plugin Backgrounds (The Dark Box/Triangles) */
/* If you miss this part, the dark box remains! */
.mfp-arrow:before, 
.mfp-arrow:after,
.mfp-arrow .mfp-b, 
.mfp-arrow .mfp-a {
    display: none !important;
    content: '' !important;
    border: none !important;
}

/* 3. Hover Effect - Scale Arrow Only */
html body .mfp-wrap button.mfp-arrow:hover {
    background-color: transparent !important; 
    transform: translateY(-50%) scale(1.2) !important; 
}

/* 4. Position (Floating 30px from edge) */
html body .mfp-wrap button.mfp-arrow-left { 
    left: 30px !important; 
}

html body .mfp-wrap button.mfp-arrow-right { 
    right: 30px !important; 
}

/* 5. FontAwesome Icons */
button.mfp-arrow::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 40px !important; 
    color: #fff !important;
    display: block !important;
    line-height: 1 !important;
    
    /* Text Shadow ensures visibility on white images */
    text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
}

/* Specific Arrow Icons */
button.mfp-arrow-left::before { content: "\f053" !important; }
button.mfp-arrow-right::before { content: "\f054" !important; }
/* =========================================
   PLUGIN COMPATIBILITY: BP Profile Filter + Grid
   ========================================= */

/* 1. Force the Plugin's Content Area to allow a Grid */
.bp-pf-layout {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. The Content Wrapper (Right Side) */
/* We must ensure this container is wide enough to hold the grid */
.bp-pf-layout > #buddypress,
.bp-pf-layout > div:not(.bp-pf-sidebar) {
    flex-grow: 1 !important;
    width: calc(100% - 320px) !important; /* Sidebar width + gap */
    max-width: calc(100% - 320px) !important;
}

/* 3. FORCE THE GRID (The Critical Fix) */
/* We target the grid container specifically when it is inside the plugin layout */
.bp-pf-layout .members-grid {
    display: grid !important;
    /* This creates the columns: Auto-fill with min 250px width */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 4. FORCE THE CARDS TO BEHAVE */
/* Prevents them from stretching to 100% width */
.bp-pf-layout .member-card {
    width: auto !important; 
    max-width: none !important;
    flex: none !important; /* Stop Flexbox from squishing them */
}

/* 5. Mobile Fix for Plugin */
@media (max-width: 900px) {
    .bp-pf-layout {
        display: block !important; /* Stack sidebar on top */
    }
    .bp-pf-layout > div:not(.bp-pf-sidebar) {
        width: 100% !important;
        max-width: 100% !important;
    }
}
/* =========================================
   MOBILE FIX: Filter Plugin + Grid
   ========================================= */
@media (max-width: 900px) {

    /* 1. Stop Sidebar & Content from sitting side-by-side */
    .bp-pf-layout {
        display: block !important; /* Stack mode */
        position: relative !important;
    }

    /* 2. Content must fill 100% width on mobile */
    .bp-pf-layout > #buddypress,
    .bp-pf-layout > div:not(.bp-pf-sidebar),
    .bp-pf-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: none !important;
    }

    /* 3. Force 2-Column Grid on Mobile (Standard Look) */
    .bp-pf-layout .members-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2 Columns */
        gap: 10px !important;
    }

    /* 4. Ensure Filter Button is Visible */
    .bp-pf-toggle {
        display: inline-block !important;
        width: 100%; /* Full width button is easier to tap */
        text-align: center;
        margin-bottom: 20px;
    }

    /* 5. Sidebar (Off-Canvas) - Ensure it stays hidden until clicked */
    .bp-pf-sidebar {
        position: fixed !important;
        left: -320px !important; /* Hidden off-screen */
        top: 0 !important;
        z-index: 99999 !important;
        height: 100vh !important;
        transition: left 0.3s ease !important;
    }

    /* When Open (Plugin adds .open class) */
    .bp-pf-sidebar.open {
        left: 0 !important;
    }
}
/* =========================================
   MOBILE PROFILE PAGE FIXES (No Scrollbar)
   ========================================= */
@media (max-width: 900px) {
    
    /* 1. GLOBAL SAFETY: Kill horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative;
    }

    /* 2. RESET PROFILE CONTAINER */
    /* Switch from Grid to Flex Column to prevent width calculation errors */
    .single-profile-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 5px !important; /* Smaller padding for mobile */
        margin: 10px auto !important;
        box-sizing: border-box !important;
        gap: 10px !important;
    }

    /* 3. DISABLE STICKY SIDEBAR */
    /* Sticky elements often push width on mobile. We make it static here. */
    aside.profile-sidebar {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 20px !important;
        z-index: 1 !important;
    }

    /* 4. FIX BUTTON WRAPPING */
    /* If "Add Friend" + "Message" are too wide, let them wrap */
    .profile-actions-centered {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    /* Ensure buttons don't overflow */
    .profile-actions-centered a,
    .profile-actions-centered button,
    .generic-button a {
        flex: 1 1 auto !important; /* Allow buttons to shrink if needed */
        min-width: 100px !important; /* Prevent them from becoming invisible */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5. FIX DETAILS GRID */
    /* Ensure the "Age / DOB" grid doesn't push the card open */
    ul.details-grid {
        grid-template-columns: 1fr 1fr !important; /* Keep 2 columns */
        gap: 10px !important; /* Reduce gap */
        width: 100% !important;
    }
    
    /* Safety for long text (Emails/URLs) */
    .value {
        word-break: break-word !important; /* Force long text to wrap */
        overflow-wrap: break-word !important;
    }
}	
/* =========================================
   FIX: WIDER PROFILE ON MOBILE
   ========================================= */
@media (max-width: 900px) {

    /* 1. Unlock the Page Width (Was restricted by page.php) */
    main.site-main {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* 2. Push Content to Edges (Like the DP Card) */
    .single-profile-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-top: 85px !important; /* Adjust for header */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 3. Widen the White Card Internally */
    /* Reduced from 30px to 20px to match DP card */
    .profile-section-card .card-body {
        padding: 20px !important;
    }
    
    .profile-section-card .card-header {
        padding: 15px 20px !important;
    }

    /* 4. Ensure Sidebar (DP) aligns perfectly */
    .sidebar-card {
        margin: 0 0 20px 0 !important;
        width: 100% !important;
    }
}			
/* Style the Report/Block Button to match the theme */
.profile-actions-centered #report-content-button,
.profile-actions-centered .bp-report-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    background: #fff !important; /* White background */
    color: #333 !important;      /* Dark text */
    border: 1px solid #ddd !important;
    margin: 0 !important;
}

/* Hover Effect */
.profile-actions-centered #report-content-button:hover,
.profile-actions-centered .bp-report-button:hover {
    background: #dc3545 !important; /* Red on hover */
    color: #fff !important;
    border-color: #dc3545 !important;
}
/* =========================================
   HIDE BUDDYPRESS "CLEAR" LINK ON RADIO BUTTONS
   ========================================= */
.clear-value {
    display: none !important;
}
/* =========================================
   DESKTOP PROFILE LAYOUT FIXES
   ========================================= */
@media (min-width: 992px) {
    /* 1. Perfect the Grid Proportions */
    .single-profile-container {
        display: grid;
        grid-template-columns: 320px 1fr !important; /* Sidebar gets 320px, Main gets ALL remaining space */
        gap: 40px !important;
        width: 100%;
    }

    /* 2. Force the Right Column to Stretch */
    .profile-main {
        width: 100% !important;
        max-width: 100% !important; 
        box-sizing: border-box;
    }

    /* 3. Make the cards take up the full width */
    .profile-section-card {
        width: 100% !important;
    }

    /* 4. Upgrade the Details to a 2-Column Grid (Looks much more professional) */
    .details-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* Split into 2 equal columns */
        gap: 15px 40px !important; /* 15px vertical gap, 40px horizontal gap */
    }
    
    /* Ensure the list items behave well in the grid */
    .details-grid li {
        margin-bottom: 0 !important;
        display: flex;
        flex-direction: column;
    }
}