/* GLOBAL STYLES */
body {
  font-family: 'Poppins', sans-serif;
  color: white;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* TEXT CONTRAST RULES */
/* White text on dark backgrounds */
.hero-section, .hero-section *,
.glass-section, .glass-section *,
.navbar, .navbar *,
body, body > *:not(.card):not(.modal):not(.dropdown-menu) {
  color: white !important;
}

/* Black text on light backgrounds */
.card, .card *,
.modal-content, .modal-content *,
.dropdown-menu, .dropdown-menu *,
.form-control, .form-select,
.table, .table *,
.alert, .alert * {
  color: #333 !important;
}

/* Specific overrides for navigation */
.navbar-nav .nav-link,
.navbar-brand,
.dropdown-toggle {
  color: white !important;
}

/* Button text colors */
.btn-primary, .btn-success, .btn-danger, .btn-warning {
  color: white !important;
}

.btn-light, .btn-outline-light {
  color: #333 !important;
}

/* Form elements */
.form-label {
  color: white !important;
}

.card .form-label {
  color: #333 !important;
}

/* Table in cards */
.card .table th,
.card .table td {
  color: #333 !important;
}

/* Text muted variations */
.text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

.card .text-muted {
  color: #666 !important;
}

/* Purple Glass Effect */
.glass-section {
  background: linear-gradient(135deg, rgba(85, 26, 139, 0.3) 0%, rgba(45, 0, 63, 0.5) 100%) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(85, 26, 139, 0.3) 0%, rgba(45, 0, 63, 0.5) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
}

.card {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #333 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px !important;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.card-body {
  color: #333 !important;
}

.card .text-muted {
  color: #666 !important;
}

.card h5, .card h4, .card h3 {
  color: #333 !important;
}

.card p {
  color: #555 !important;
}

/* Glass Effect for Featured Section */
#featured {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(85, 26, 139, 0.6) 0%, rgba(45, 0, 63, 0.8) 100%),
              url("background.png") no-repeat center center/cover;
  background-attachment: fixed;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

#featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(85, 26, 139, 0.4) 0%, rgba(45, 0, 63, 0.6) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, rgba(45, 0, 63, 0.98) 0%, rgba(85, 26, 139, 0.98) 100%) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Keep Bootstrap collapse behavior on small screens, enable flex layout on large */
@media (min-width: 992px) {
  .navbar-collapse {
    display: flex !important;
  }

  .navbar-nav.me-3 {
    margin-left: auto;
    margin-right: auto;
  }
}

.navbar-nav .nav-link {
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0.75rem !important;
}

/* Make nav links easier to tap on small screens */
@media (max-width: 575.98px) {
  .navbar-nav .nav-link {
    padding: 0.65rem 1rem !important;
    font-size: 0.95rem;
  }
  .navbar-brand span {
    font-size: 1rem;
  }
}

.navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
  color: #fff !important;
  font-weight: 600;
}

.navbar-brand span {
  font-weight: bold;
  font-size: 1.2rem;
}

/* Toggler visibility on dark navbar */
.navbar-toggler {
  border-color: rgba(255,255,255,0.2);
}
.navbar-dark .navbar-toggler-icon {
  filter: invert(1) brightness(2);
}

/* Social buttons (login / signup) - ensure text is visible on dark backgrounds */
.btn-social {
  color: #fff !important;
}
.btn-social img,
.btn-social svg {
  vertical-align: middle;
}

/* HERO SECTIONS */
.hero-section,
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background: url('../css/background.png') no-repeat center center/cover;
  background-attachment: fixed;
}

/* First Hero Background */
#hero1 {
  background: url('../css/background.png') no-repeat center center/cover;
  background-attachment: fixed;
}

/* Text Styling */
.hero-section h1,
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.hero-section p,
.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.6;
}


/* HERO SECTION 2 ADJUSTMENTS */
#hero2 {
  min-height: auto;
  padding: 100px 0 40px;
  background: url('../css/background.png') no-repeat center center/cover;
  background-attachment: fixed;
  position: relative;
}

#hero2 .hero-content {
  position: relative;
  z-index: 2;
}

/* Overlay fade for depth */
#hero2 .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 0, 50, 0.5);
  z-index: 1;
}

/* Search bar styling */
.search-bar input {
  width: 220px;
  padding: 10px;
  border-radius: 8px;
  border: none;
}

.search-bar button {
  padding: 10px 20px;
}

/* FEATURED SECTION merged visually with hero */
#hero2 .featured {
  position: relative;
  z-index: 2;
}

.featured .card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: white;
}

.featured .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.featured-title {
    text-align: center;
  font-family: 'Playfair Display', serif;
  color: white;
  font-weight: 700;
}


/* ENHANCED BUTTONS */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.btn-outline-primary {
  border: 2px solid #667eea !important;
  color: #667eea !important;
  background: transparent !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  transform: translateY(-2px) !important;
}

/* ENHANCED FORMS */
.form-control {
  border-radius: 8px !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  padding: 12px 16px !important;
  transition: all 0.3s ease !important;
}

.form-control:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
  background: white !important;
}

.form-label {
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

/* ENHANCED SECTIONS */
.py-5 {
  padding: 4rem 0 !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

/* FOOTER */
footer {
  background: linear-gradient(135deg, rgba(45, 0, 63, 0.95) 0%, rgba(85, 26, 139, 0.95) 100%) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
}
