/* ============================================
   Vishwakarma Matrimony - Modern Responsive CSS
   ============================================ */

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #e74c3c;
  --primary-dark: #c0392b;
  --secondary-color: #3498db;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --text-color: #333;
  --text-light: #666;
  --border-color: #e0e0e0;
  --bg-color: #f8f9fa;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  font-size: 16px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ===== CONTAINER & LAYOUT ===== */
.container-fluid {
  width: 100%;
  padding: 0 15px;
  margin: 0 auto;
}

@media (min-width: 576px) {
  .container-fluid { max-width: 540px; }
}

@media (min-width: 768px) {
  .container-fluid { max-width: 720px; }
}

@media (min-width: 992px) {
  .container-fluid { max-width: 960px; }
}

@media (min-width: 1200px) {
  .container-fluid { max-width: 1140px; }
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-12, .col-md-3, .col-md-9, .col-lg-3, .col-lg-9 {
  padding: 0 15px;
}

.col-12 { width: 100%; }

@media (min-width: 768px) {
  .col-md-3 { width: 25%; }
  .col-md-9 { width: 75%; }
}

@media (min-width: 992px) {
  .col-lg-3 { width: 25%; }
  .col-lg-9 { width: 75%; }
}

/* ===== HEADER & NAVIGATION ===== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.btn-secondary {
  background: var(--light-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #d5dbdb;
  color: var(--text-color);
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  margin-bottom: 20px;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0;
  font-size: 1.25rem;
}

.card-title i {
  margin-right: 8px;
}

/* ===== FILTER SIDEBAR ===== */
.filter-sidebar {
  margin-bottom: 20px;
}

.filter-toggle-btn {
  width: 100%;
  margin-bottom: 15px;
  display: none;
}

@media (max-width: 991px) {
  .filter-toggle-btn {
    display: block;
  }
  
  .filter-sidebar.collapsed {
    display: none;
  }
}

.filter-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.filter-section {
  margin-bottom: 25px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  font-size: 16px;
}

.filter-title i {
  margin-right: 8px;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

.filter-label i {
  margin-right: 6px;
  color: var(--primary-color);
}

.filter-divider {
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
}

/* ===== FORM ELEMENTS ===== */
.form-control, .form-select {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: var(--white);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
  outline: none;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

/* ===== PROFILE CARDS ===== */
.profiles-container {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  min-height: 400px;
}

.profiles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 15px;
}

.profiles-header h3 {
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
  font-size: 1.5rem;
}

.profiles-header h3 i {
  margin-right: 10px;
}

.results-count {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
}

.profiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .profiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.profile-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
  gap: 15px;
}

.profile-image-container {
  width: 100px;
  height: 100px;
  border-radius: var(--border-radius);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  background: var(--light-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .profile-image-container {
    width: 80px;
    height: 80px;
  }
}

.profile-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.no-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: #999;
  text-align: center;
  padding: 10px;
}

.no-image-placeholder i {
  font-size: 32px;
  margin-bottom: 5px;
  color: #ccc;
}

.no-image-placeholder span {
  font-size: 11px;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
}

.profile-info-header {
  flex: 1;
  min-width: 0;
}

.profile-id {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 5px;
  word-wrap: break-word;
}

.profile-details {
  flex: 1;
  margin-bottom: 15px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-label i {
  color: var(--primary-color);
  font-size: 14px;
}

.detail-value {
  color: var(--text-color);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.profile-card-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.view-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}

.view-profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.view-profile-btn i {
  font-size: 16px;
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.no-results i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #ddd;
}

.no-results h4 {
  color: var(--text-color);
  margin-bottom: 10px;
}

/* ===== MODAL ===== */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 2px solid #f0f0f0;
  padding: 20px;
}

.modal-title {
  color: var(--primary-color);
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 2px solid #f0f0f0;
  padding: 20px;
}

/* ===== LOADING & SPINNER ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  text-align: center;
  padding: 40px;
}

.loading .spinner {
  width: 40px;
  height: 40px;
  border-width: 4px;
  margin-bottom: 15px;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

@media (max-width: 767px) {
  .d-md-none { display: none; }
  .d-md-block { display: block; }
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container-fluid {
    padding: 0 10px;
  }
  
  .card, .filter-card, .profiles-container {
    padding: 15px;
  }
  
  .profiles-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .profile-card-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
  }
  
  .profile-image-container {
    margin: 0 auto 15px;
  }
  
  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .detail-value {
    text-align: left;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar, .filter-sidebar, .btn, .profile-card-footer {
    display: none;
  }
  
  .profile-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

