/* 
   Main Styles for Event Manager Website
   Contains all styling for the entire website
*/

:root {
  --primary-color: #4e54c8;
  --secondary-color: #8f94fb;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
}

/* ===== Basic Layout ===== */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
}

/* ===== Navbar styling ===== */
.navbar {
  background: linear-gradient(135deg, var(--dark-color) 0%, #3a3f48 100%);
  padding: 0.5rem 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 0 !important;
}

.navbar-brand > img {
  height: 160px !important;
  width: 160px !important;
  object-fit: contain !important;
  transform: scale(1.5) !important;
  transform-origin: left center !important;
}

.nav-link {
  font-weight: 500;
  color: white !important;
  margin: 0 0.5rem;
  position: relative;
  transition: color 0.3s ease;
  padding: 0.8rem 1rem;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

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

/* ===== Hero Carousel styling ===== */
#heroCarousel {
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  margin-top: 0 !important;
  margin-bottom: 2%;
}

.carousel-inner {
  border-radius: 0 0 20px 20px;
}

.carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  border-radius: 10px;
  padding: 2rem;
  bottom: 0;
  left: 0;
  right: 0;
}

.carousel-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.carousel-text {
  font-size: 1.2rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* ===== Button styling ===== */
.btn-custom {
  background: var(--primary-color); 
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(78, 84, 200, 0.3);
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(78, 84, 200, 0.4);
  color: white;
  background: var(--secondary-color);
}

/* ===== Filter section ===== */
.filter-container {
  background-color: white;
  padding: 2rem 1rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin: auto;
  text-align: center;
}

.filter-container h2 {
  color: var(--dark-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.filter-container h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.dropdown-menu {
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: none;
  padding: 0.5rem;
}

.dropdown-item {
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(78, 84, 200, 0.1);
  color: var(--primary-color);
}

.dropdown-menu a.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

/* Additional CSS for the search bar */

/* Search container styling */
.search-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  border-radius: 50px 0 0 50px !important;
  padding-left: 20px;
  border: 1px solid #ddd;
  height: 46px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(78, 84, 200, 0.25);
  border-color: var(--primary-color);
}

.search-btn {
  border-radius: 0 50px 50px 0 !important;
  padding: 10px 25px;
}

.search-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-pill {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.search-pill:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.search-pill .search-term {
    margin-right: 0.5rem;
}

.search-pill .clear-search {
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.search-pill .clear-search:hover {
    opacity: 1;
}

/* For dark mode compatibility */
[data-theme="dark"] .search-pill {
    background-color: var(--dark-primary-color);
}

/* Animation for the pill */
@keyframes pill-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-pill {
    animation: pill-appear 0.3s ease-out forwards;
}
/* Dark mode adjustments for search */
[data-theme="dark"] .search-input {
  background-color: var(--input-bg);
  color: var(--input-text);
  border-color: var(--border-color);
}

[data-theme="dark"] .search-input::placeholder {
  color: #999;
}

[data-theme="dark"] .alert-info {
  background-color: rgba(78, 84, 200, 0.2);
  color: var(--text-color);
  border-color: rgba(78, 84, 200, 0.1);
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .search-container {
    max-width: 100%;
  }
  
  .search-input, .search-btn {
    font-size: 0.9rem;
  }
}

/* Highlight search results */
.search-highlight {
  background-color: rgba(255, 193, 7, 0.2);
  padding: 0 3px;
  border-radius: 3px;
}

/* ===== Event card styling ===== */
.event-header{
  text-align: center;
}

.event-card {
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  background: white;
  border: none;
}

.event-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.event-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.event-card:hover .event-image {
  transform: scale(1.05);
}

.event-details {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.event-card:hover .event-title {
  color: var(--primary-color);
}

.event-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-grow: 1;
}

.event-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.event-meta i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* ===== Section headings ===== */
section h2, .container h2 {
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  text-align: center;
}

section h2::after, .container h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

/* ===== Things to do nearby section ===== */
.things-to-do-section {
  background-color: white;
  padding: 3rem 0;
  border-radius: 15px;
  margin: 3rem 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.things-to-do-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.things-to-do-section h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.attraction-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--light-color);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
  overflow: hidden;
  height: 100%;
}

.attraction-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.attraction-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.attraction-card:hover .attraction-img {
  transform: scale(1.05);
}

.attraction-text {
  flex: 1;
}

.attraction-text a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.attraction-text a:hover {
  color: var(--secondary-color);
}

.attraction-description {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* Ticket button styling */
.btn-ticket {
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 10px 24px;
}

.btn-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(255, 75, 43, 0.4);
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
}

.btn-ticket i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Social media section ===== */
.social-section {
  background: linear-gradient(135deg, var(--dark-color) 0%, #3a3f48 100%);
  padding: 3rem 1rem;
  border-radius: 15px;
  margin-bottom: 3rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.social-section h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

.social-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.social-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 800px;
}

.social-icon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.social-icon-wrapper:hover {
  transform: translateY(-5px);
}

.social-icon-wrapper a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.social-icon-wrapper a:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

.social-icon-label {
  color: white;
  font-size: 0.9rem;
}

/* ===== Footer ===== */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-heading {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
  .carousel-title {
      font-size: 2rem;
  }
  
  .carousel-text {
      font-size: 1rem;
  }
  
  .social-icons-grid {
      grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-brand img {
    height: 140px !important;
    width: 140px !important;
    max-height: none !important;
    object-fit: contain !important;
  }
  
  .carousel-title {
      font-size: 1.8rem;
  }
  
  .carousel-text {
      font-size: 0.9rem;
  }
  
  .btn-custom {
      padding: 0.6rem 1.5rem;
      font-size: 0.9rem;
  }
  
  .filter-container {
      padding: 1.5rem 0.5rem;
  }
  
  .attraction-card {
      flex-direction: column;
      text-align: center;
  }
  
  .attraction-img {
      margin-right: 0;
      margin-bottom: 1rem;
  }
  
  .social-icons-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px){
    .navbar-brand img {
    height: 140px !important;
    width: 140px !important;
    max-height: none !important;
    object-fit: contain !important;
  }
  #heroCarousel {
      height: 50vh !important;
  }
  
  .carousel-title {
      font-size: 1.5rem;
  }
  
  .carousel-text {
      font-size: 0.8rem;
      margin-bottom: 1rem;
  }
  
  .btn-custom {
      padding: 0.5rem 1.2rem;
      font-size: 0.8rem;
  }
  
  .filter-container h2 {
      font-size: 1.5rem;
  }
  
  .event-title {
      font-size: 1.1rem;
  }
  
  .social-icons-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
  }
  
  .social-icon-wrapper a {
      width: 50px;
      height: 50px;
      font-size: 1.3rem;
  }
}

/* ===== Animation styles ===== */
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

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

/* ===== Equal height rows ===== */
.row-equal-height {
  display: flex;
  flex-wrap: wrap;
}

.row-equal-height > [class*='col-'] {
  display: flex;
  flex-direction: column;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.pagination .page-item .page-link {
  color: var(--primary-color);
  border-radius: 50%;
  margin: 0 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  color: white;
}

.pagination .page-item .page-link:hover {
  background-color: rgba(78, 84, 200, 0.1);
  color: var(--primary-color);
}

/* ===== Cookie consent ===== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(33, 37, 41, 0.95);
  color: white;
  padding: 1rem;
  z-index: 1000;
  display: none;
}

.cookie-consent.show {
  display: block;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
      transform: translateY(100%);
  }
  to {
      transform: translateY(0);
  }
}

/* ===== Back to top button ===== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Filter section responsive adjustments */
@media (max-width: 768px) {
  .filter-container .d-flex {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .filter-container .btn-group,
  .filter-container .dropdown {
    width: 100%;
  }
  
  .filter-container .dropdown button {
    width: 100%;
  }
}

/* 
   Dark Mode Implementation for Event Manager Website
   This extends the existing styles.css with dark mode functionality
*/

/* ===== Dark Mode Variables ===== */
:root {
  /* Original light mode variables */
  --primary-color: #4e54c8;
  --secondary-color: #8f94fb;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  
  /* Background and text colors - light mode default */
  --bg-color: #f9f9f9;
  --text-color: #333;
  --card-bg: white;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.08);
  --header-footer-bg: var(--dark-color);
  --header-footer-text: white;
  --input-bg: white;
  --input-text: #333;
  --hover-bg: rgba(78, 84, 200, 0.1);
}

/* Dark Mode Theme Colors */
[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --card-bg: #1e1e1e;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.4);
  --header-footer-bg: #0a0a0a;
  --header-footer-text: #e0e0e0;
  --input-bg: #2d2d2d;
  --input-text: #e0e0e0;
  --hover-bg: rgba(78, 84, 200, 0.2);
}

/* Base elements in dark mode */
[data-theme="dark"] body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Navbar dark mode */
[data-theme="dark"] .navbar {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Cards and containers dark mode */
[data-theme="dark"] .event-card,
[data-theme="dark"] .event-details-card,
[data-theme="dark"] .filter-container,
[data-theme="dark"] .overlay-content,
[data-theme="dark"] .attraction-card,
[data-theme="dark"] .things-to-do-section {
  background-color: var(--card-bg);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* Text elements dark mode */
[data-theme="dark"] .event-title {
  color: var(--text-color);
}

[data-theme="dark"] .event-card:hover .event-title {
  color: var(--secondary-color);
}

[data-theme="dark"] .event-description,
[data-theme="dark"] .attraction-description {
  color: #b0b0b0;
}

[data-theme="dark"] .event-meta {
  color: #9e9e9e;
}

[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5 {
  color: var(--text-color);
}

/* Input elements dark mode */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .form-control {
  background-color: var(--input-bg);
  color: var(--input-text);
  border-color: var(--border-color);
}

/* Dropdown menus dark mode */
[data-theme="dark"] .dropdown-menu {
  background-color: #2d2d2d;
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-color);
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: var(--hover-bg);
}

/* Table elements dark mode */
[data-theme="dark"] table {
  color: var(--text-color);
}

[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Modal and overlays dark mode */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .overlay {
  background-color: var(--card-bg);
  color: var(--text-color);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: var(--border-color);
}

/* Map in dark mode */
[data-theme="dark"] .leaflet-container {
  filter: brightness(0.8) invert(1) contrast(1.2) hue-rotate(180deg) saturate(0.5);
}

/* Dark Mode Toggle Button - Improved Positioning */
.dark-mode-toggle {
  position: fixed;
  bottom: 80px; /* Changed from top: 80px to bottom: 80px */
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  border: none; /* Added to prevent default button styling */
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Ensure button doesn't conflict with back-to-top button */
.back-to-top {
  bottom: 20px;
}

/* Dark mode transition effect */
body, .event-card, .event-details-card, .navbar, input, select, textarea, 
.dropdown-menu, .overlay-content, .modal-content, .filter-container {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark mode specific animations */
@keyframes darkModeFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

[data-theme="dark"] .fade-in {
  animation: darkModeFadeIn 1s ease-in-out;
}