/* ======================================================
   Table of Contents:
   1. Base Styles & Typography
   2. Layout
   3. Header & Footer
   4. Buttons
   5. Forms
   6. Search & Filter
   7. Event List & Cards
   8. Event Details
   9. RSVP & Attendees
   10. Dashboard
   11. Authentication
   12. Messages & Notifications
   13. Responsive Styles
   14. Animations & Effects
   ====================================================== */

/* 1. Base Styles & Typography */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Merriweather:wght@400;700&display=swap");

:root {
  /* Modern color palette */
  --primary-color: #4a6fa5;
  --primary-dark: #334e7a;
  --secondary-color: #f9c846;
  --accent-color: #ff7e5f;
  --bg-color: #f9f9f9;
  --text-color: #2d3748;
  --light-gray: #f7f8fa;
  --mid-gray: #e2e8f0;
  --dark-gray: #718096;
  --danger-color: #e53e3e;
  --success-color: #48bb78;

  /* UI Elements */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.08),
    0 4px 6px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --bg-gradient: linear-gradient(135deg, #3a1c71, #3a1c71, #3a1c71);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
}

/* Typography styles */
h1,
h2,
h3,
h4 {
  font-family: "Merriweather", serif;
  margin-bottom: 1.2rem;
  color: var(--primary-dark);
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.6rem;
}

h4 {
  font-size: 1.3rem;
}

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

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

/* 2. Layout */
.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* 3. Header & Footer */
header,
footer {
  background: var(--bg-gradient);
  color: white;
  padding: 18px 0;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header specific styles */
header .container {
  display: block;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

/* Footer specific styles */
footer {
  margin-top: 70px;
  font-size: 0.95rem;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
}

.eventsHeader{
  width: 100%;
  margin-bottom: 100px;

  >h2 {
    float: left;
  }

}

/* Logo styling */
.logo {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: -0.03em;
}

.logo a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo a:hover {
  opacity: 0.9;
  text-decoration: none;
}

/* Navigation styling */
.navigation ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.navigation li {
  position: relative;
}

.navigation a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  padding-bottom: 3px;
}

/* Navigation hover underline effect */
.navigation a:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transition: width 0.3s ease;
}

.navigation a:hover:after {
  width: 100%;
}

/* Footer navigation */
.footer-list {
  display: flex;
  list-style: none;
  gap: 25px;
  justify-content: center;
  margin-top: 15px;
}

.footer-list li a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}

/* Footer links hover underline effect */
.footer-list li a:after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: white;
  transition: width 0.3s ease;
}

.footer-list li a:hover:after {
  width: 100%;
}

/* Hero Section - Enhanced Background */
.hero {
  position: relative;
  background-image: linear-gradient(
      to right,
      rgba(25, 28, 41, 0.8),
      rgba(44, 83, 100, 0.75)
    ),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  color: white;
  padding: 180px 0;
  margin-bottom: 80px;
  text-align: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* Hero decorative radial overlays */
.hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 15% 15%,
      rgba(32, 156, 238, 0.2),
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(249, 200, 70, 0.25),
      transparent 25%
    );
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* Hero heading with text gradient effect */
.hero-content h1 {
  color: white;
  font-size: 4rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.9s ease-out;
  line-height: 1.2;
  background: linear-gradient(90deg, #ffffff, #f9f9f9, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 20px;
  opacity: 0.95;
  max-width: 650px;
  line-height: 1.7;
  animation: fadeIn 0.9s ease-out 0.2s both;
  font-weight: 300;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* Hero button styling */
.hero-content .btn {
  font-size: 1.15rem;
  padding: 16px 38px;
  margin-top: 20px;
  background-color: #20a0ff;
  color: white;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
  animation: fadeIn 0.9s ease-out 0.4s both;
  border-radius: 30px;
  letter-spacing: 0.5px;
}

.hero-content .btn:hover {
  background-color: #1890ea;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 4. Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background-color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Button variants */
.btn.secondary {
  background-color: var(--dark-gray);
}

.btn.secondary:hover {
  background-color: #64748b;
}

.btn.delete {
  background-color: var(--danger-color);
}

.btn.delete:hover {
  background-color: #c53030;
}

/* 5. Forms */
.form-row {
  display: flex;
  margin-bottom: 20px;
  gap: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
  position: relative;
}

.form-group:has(input.error) {
  margin-bottom: 30px;
}

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

/* Form controls styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background-color: white;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

/* Form helper text */
.form-group small {
  display: block;
  color: var(--dark-gray);
  font-size: 0.8rem;
  margin-top: 5px;
}

/* Form action buttons */
.form-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.form-actions .btn {
  min-width: 120px;
  font-weight: 600;
  padding: 12px 30px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.form-actions .btn:hover {
  transform: translateY(-3px);
}

/* 6. Search & Filter */
.search-container {
  background-color: white;
  padding: 25px 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  margin-bottom: 40px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

/* Decorative gradient line at bottom of search */
.search-container:after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 5px;
  background: var(--bg-gradient);
  border-radius: 0 0 5px 5px;
  opacity: 0.5;
}

.search-form {
  position: relative;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--dark-gray);
  font-style: italic;
}

/* Login prompt */
.login-prompt {
  margin: 40px 0;
  padding: 20px;
  text-align: center;
  background-color: rgba(74, 111, 165, 0.1);
  border-radius: var(--border-radius);
}

.login-prompt a {
  font-weight: 600;
  text-decoration: underline;
}

/* 7. Event List & Cards */
.events-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* Featured events section */
.featured h2 {
  margin-bottom: 30px;
  text-align: center;
  color: var(--primary-dark);
  position: relative;
  padding-bottom: 15px;
}

.featured h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* Event grid layout */
.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Exactly two columns of equal width */
  gap: 35px;
  margin: 40px 0;
  max-width: 1100px; /* Limit max width to keep proportions nice */
  margin-left: auto;
  margin-right: auto;
}

/* Event card styling */
.event-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.event-header {
  text-align: center;
  margin-bottom: 20px;
}

.event-card h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  text-align: center;
  color: var(--primary-dark);
}

/* Event card image styling */
.event-card .event-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 12px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

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

/* Event card description */
.event-description {
  margin: 0 8px 20px;
  padding: 15px;
  font-size: 0.95rem;
  background-color: rgba(255, 243, 224, 0.5);
  border-radius: var(--border-radius);
  line-height: 1.6;
  border-left: 3px solid var(--secondary-color);
}

/* Event actions container - consolidated styles */
.event-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
}

.event-card .event-actions .btn {
  min-width: 130px;
  text-align: center;
  padding: 12px 18px;
}

/* Special styles for attending list event actions */
.attending-list .event-actions {
  justify-content: space-between;
  align-items: center;
}

/* RSVP Badge container */
.rsvp-badge-container {
  min-width: 120px;
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

/* Consolidated badge styles */
.attending-badge,
.maybe-badge,
.declined-badge,
.rsvp-badge {
  min-width: 100px;
  text-align: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Individual badge variations */
.attending-badge {
  background-color: var(--success-color);
  color: white;
}

.attending-badge:before {
  content: "✓";
  margin-right: 5px;
  font-weight: bold;
}

.maybe-badge {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.maybe-badge:before {
  content: "?";
  margin-right: 5px;
  font-weight: bold;
}

.declined-badge {
  background-color: var(--mid-gray);
  color: var(--dark-gray);
}

.declined-badge:before {
  content: "✕";
  margin-right: 5px;
  font-weight: bold;
}

.rsvp-badge {
  background-color: var(--light-gray);
  color: var(--dark-gray);
}

/* 8. Testimonials Section */
.testimonials {
  padding: 80px 0;
  background-color: var(--light-gray);
  text-align: center;
  margin-top: 40px;
  position: relative;
}

.testimonials h2 {
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.testimonials h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--secondary-color);
}

.testimonials blockquote {
  max-width: 850px;
  margin: 0 auto 40px;
  padding: 35px 40px;
  background-color: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  position: relative;
  font-style: italic;
  line-height: 1.8;
  font-size: 1.15rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.testimonials blockquote:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

/* 9. Dashboard Styles */
.dashboard {
  max-width: 1000px;
  margin: 0 auto;
}

.dashboard h1 {
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.dashboard h1:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.dashboard h2 {
  margin: 50px 0 25px;
  font-size: 1.8rem;
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
}

.dashboard h2:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 1.5px;
}

.dashboard-actions {
  display: flex;
  gap: 15px;
  float: right;
}

/* Dashboard event list */
.dashboard-events-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style: none;
}

.event-item {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: 25px;
  box-shadow: var(--box-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--primary-color);
}

.event-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow-hover);
}

/* Attending events style */
.attending-list .event-item {
  border-left: 4px solid var(--secondary-color);
  background-color: rgba(249, 250, 251, 0.9);
}

/* Event info for dashboard */
.event-info {
  flex: 1;
}

.event-info h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
  color: var(--primary-dark);
}

.event-date {
  color: var(--dark-gray);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.event-location {
  color: var(--text-color);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.event-organizer {
  color: var(--dark-gray);
  font-size: 0.9rem;
  margin-top: 10px;
  font-style: italic;
}

/* Message styling */
.error-message {
  background-color: rgba(229, 62, 62, 0.1);
  border-left: 4px solid var(--danger-color);
  color: var(--danger-color);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-weight: 500;
}

.success-message {
  background-color: rgba(72, 187, 120, 0.1);
  border-left: 4px solid var(--success-color);
  color: var(--success-color);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-weight: 500;
}

/* 10. Event Details */
.event-details {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  position: relative;
}

.event-details h1 {
  margin-bottom: 25px;
  color: var(--primary-dark);
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.event-details h1:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

/* Event details image */
.event-details .event-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  margin: 0 auto 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  position: relative;
}

.event-details .event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.event-details .event-image:hover img {
  transform: scale(1.02);
}

/* Event info section */
.event-details .event-info {
  background-color: var(--light-gray);
  padding: 25px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  border-left: 4px solid var(--primary-color);
}

.event-details .event-info p {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.event-details .event-info p:last-child {
  margin-bottom: 0;
}

.event-details .event-info strong {
  color: var(--primary-dark);
  font-weight: 600;
  margin-right: 5px;
}

/* Event description */
.event-details .event-description {
  margin-bottom: 40px;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--mid-gray);
  border-bottom: 1px solid var(--mid-gray);
}

.event-details .event-description h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.event-details .event-description h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
}

.event-details .event-description p {
  line-height: 1.8;
  color: var(--text-color);
  white-space: pre-line;
}

/* RSVP section */
.event-details .rsvp-section {
  margin: 40px 0;
  padding: 30px;
  background-color: rgba(74, 111, 165, 0.05);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(74, 111, 165, 0.1);
}

.event-details .rsvp-section h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.event-details .event-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--mid-gray);
}

/* RSVP form specific styling */
.rsvp-form {
  display: flex;
  align-items: flex-end;
  gap: 15px;
}

.rsvp-form .form-group {
  margin-bottom: 0;
}

.rsvp-form select {
  margin-bottom: 0;
}

#rsvp-form {
  display: flex;
  align-items: center;
  gap: 15px;
}

#rsvp-form .form-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

#status {
  min-width: 150px;
}

/* 11. Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 12. Responsive Styles */
@media (max-width: 768px) {
  /* Dashboard responsiveness */
  .event-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-actions {
    margin-top: 15px;
    width: 100%;
    justify-content: flex-start;
  }

  /* Event details responsiveness */
  .event-details .event-image {
    max-height: 300px;
  }

  #rsvp-form .form-group {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  #rsvp-form button {
    margin-top: 15px;
  }

  .event-details .event-actions {
    flex-direction: column;
    gap: 15px;
  }

  .event-details .event-actions .btn {
    width: 100%;
    text-align: center;
  }
}
