@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Open+Sans:wght@400;600&display=swap');

/* Global */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: linear-gradient(135deg, #031d44 0%, #04112b 100%);
  color: #f4f4f4;
  overflow-x: hidden;
}

.container {
  position: relative;
  max-width: 1100px; /* Increased from 900px to accommodate more buttons */
  margin: 0 auto 4rem;
  padding: 1rem;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
  color: #ffe08a;
}

h1 {
  font-size: 3rem;
  margin: 0;
}

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.image-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffe08a;
  box-shadow: 0 0 10px rgba(255, 224, 138, 0.7);
  flex-shrink: 0;
}

.title-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

nav {
  margin: 2rem 0;
}

.social-links {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  justify-items: center;
  max-width: 100%;
}

.social-links a {
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1rem; /* Reduced horizontal padding from 1.2rem to 1rem */
  background: rgba(255, 224, 138, 0.1);
  border: 2px solid #ffe08a;
  border-radius: 50px;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent text wrapping within buttons */
  font-size: 0.95rem; /* Slightly smaller font to fit better */
}

.social-links a:hover {
  background: #ffe08a;
  color: #031d44;
  transform: scale(1.05);
}

.card {
  background: rgba(0, 0, 0, 0.4);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  margin-bottom: 2rem;
}

section#about p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Clear floats in about section */
section#about {
  position: relative; 
}

section#about::after {
  content: "";
  display: table;
  clear: both;
}

/* About section images */
.about-image {
  float: right;
  width: 192px; /* 75% of original 256px for better proportion */
  height: 288px; /* 75% of original 384px */
  margin: 0 0 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 224, 138, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 224, 138, 0.3);
}

.about-image-float-left { /* MODIFIED: Renamed class to match HTML */
  float: left;
  width: 230px;
  height: 307px;
  margin: 0 1.5rem 0 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 224, 138, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  shape-outside: margin-box;
}

/* MODIFIED: Removed fixed padding-left from section#about */
section#about {
  position: relative; /* This was duplicated, but harmless. Kept for structural integrity if original was separate. */
  /* padding-left: 260px; /* REMOVED: This was causing the large gap */
  min-height: 350px; /* Ensure container is tall enough for the image, adjust as needed */
}

.about-image-float-left:hover { /* MODIFIED: Renamed class to match HTML */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 224, 138, 0.3);
}

/* Responsive image handling */
@media (max-width: 768px) {
  .about-image {
    float: none;
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 160px;
    height: 240px;
  }
  
  .about-image-float-left { /* MODIFIED: Renamed class to match HTML */
    float: none;
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 192px;
    height: 256px;
  }
  /* section#about will inherit its base padding from .card, no specific override needed here
     if padding-left: 260px was removed from its base style. */
}

/* Form Styles */
.form-preamble {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 224, 138, 0.05);
  border: 1px solid rgba(255, 224, 138, 0.2);
  border-radius: 8px;
}

.form-preamble p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #f4f4f4;
}

.form-preamble p:last-child {
  margin-bottom: 0;
}

.form-preamble .privacy-link {
  color: #ffe08a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-preamble .privacy-link:hover {
  color: #ffd700;
  text-decoration: underline;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ffe08a;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(255, 224, 138, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #f4f4f4;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s, background 0.3s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ffe08a;
  background: rgba(0, 0, 0, 0.5);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.character-count {
  text-align: right;
  font-size: 0.85rem;
  color: #cccccc;
  margin-top: 0.3rem;
}

.character-count.warning {
  color: #ffa500;
}

.character-count.limit {
  color: #ff6b6b;
}

.submit-btn {
  background: linear-gradient(135deg, #ffe08a 0%, #ffd700 100%);
  color: #031d44;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 12px rgba(255, 224, 138, 0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 224, 138, 0.5);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Stars animation */
#stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  animation: floatStar 2s ease-out forwards;
}

@keyframes floatStar {
  0% { transform: translateY(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(-80px) scale(0.5); opacity: 0; }
}

/* Event Banner */
.event-banner {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #ffe08a;
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.event-banner:hover {
  border-color: #ffd700;
  box-shadow: 0 4px 15px rgba(255, 224, 138, 0.3);
  transform: translateY(-2px);
}

.banner-title {
  background: #ffe08a;
  color: #031d44;
  padding: 0.8rem 1.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.banner-scroll-container {
  height: 60px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
}

.banner-text {
  white-space: nowrap;
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  color: #f4f4f4;
  font-size: 1rem;
  line-height: 1.4;
  padding: 0 1.5rem;
  animation: scrollText 40s linear infinite;
  will-change: transform;
}

@keyframes scrollText {
  0% {
    transform: translateY(-50%) translateX(0%);
  }
  100% {
    transform: translateY(-50%) translateX(-100%);
  }
}

.event-banner:hover .banner-text {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  .banner-title {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }
  
  .banner-scroll-container {
    height: 50px;
  }
  
  .banner-text {
    font-size: 0.9rem;
    padding: 0 1rem;
  }
}

/* Events Styles */
.loading-message {
  color: #ffe08a;
  font-style: italic;
  text-align: center;
  margin: 1rem 0;
}

.event-item {
  background: rgba(255, 224, 138, 0.05);
  border: 1px solid rgba(255, 224, 138, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.event-image {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 224, 138, 0.3);
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-content {
  flex: 1;
}

.event-content-no-image {
  flex: 1;
  margin-left: 166px; /* 150px image width + 16px gap */
}

.event-title {
  color: #ffe08a;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
}

.event-datetime {
  color: #f4f4f4;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-location {
  color: #cccccc;
  margin-bottom: 0.5rem;
}

.event-location-name {
  font-weight: 600;
  color: #ffe08a;
}

.event-gps {
  margin-top: 0.5rem;
}

.event-gps a {
  color: #ffe08a;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.event-gps a:hover {
  text-decoration: underline;
}

.event-description {
  color: #f4f4f4;
  line-height: 1.6;
  margin-top: 1rem;
}

.no-events {
  text-align: center;
  color: #cccccc;
  font-style: italic;
  padding: 2rem;
}

.past-events-section {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 224, 138, 0.3);
  padding-top: 1rem;
}

.past-events-toggle {
  background: rgba(255, 224, 138, 0.1);
  border: 1px solid rgba(255, 224, 138, 0.3);
  border-radius: 8px;
  color: #ffe08a;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  width: 100%;
  text-align: left;
  transition: background 0.3s ease;
}

.past-events-toggle:hover {
  background: rgba(255, 224, 138, 0.2);
}

.past-events-content {
  margin-top: 1rem;
}

.past-event {
  opacity: 0.7;
  border-color: rgba(255, 224, 138, 0.1);
}

.past-label {
  color: #cccccc;
  font-size: 0.9rem;
  font-style: italic;
}

.event-organizer {
  color: #cccccc;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-style: italic;
}

.event-links {
  margin-top: 0.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.event-links a {
  color: #ffe08a;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(255, 224, 138, 0.3);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.event-links a:hover {
  background: rgba(255, 224, 138, 0.1);
  border-color: #ffe08a;
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(255, 224, 138, 0.3);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  text-align: center;
  color: #cccccc;
}

.footer-content p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.privacy-link {
  color: #ffe08a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.privacy-link:hover {
  color: #ffd700;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .social-links {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
  
  .social-links a {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 950px) {
  .social-links {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0rem;
  }
  .social-links a {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .social-links {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* MODIFIED: Make LIs take full width */
    gap: 1rem;
    backdrop-filter: blur(2px);
  }
  
  .social-links a {
    display: block; /* MODIFIED: Make 'a' block to fill LI */
    text-align: center; /* MODIFIED: Center text in 'a' */
    padding: 0.6rem 1.2rem; /* Original padding */
    font-size: 1rem; /* Original font size */
    box-sizing: border-box; /* ADDED: For robust width/height calculation */
  }

  header {
    flex-direction: column;
    text-align: center;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .event-item {
    flex-direction: column;
    text-align: center;
  }
  
  .event-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .event-content-no-image {
    margin-left: 0;
  }
}