/*
 * Global styles for the Global MarTech Integration Day landing page.
 * The design follows the provided flyer layout: dark blues, warm orange
 * highlights and generous spacing. The typography uses Montserrat for
 * English and Kanit for Thai text to match the flyer’s contemporary look.
 */

:root {
  --primary-dark: #041e42;
  --secondary-dark: #0a2f59;
  --tertiary-dark: #0e3b70;
  --highlight: #f4b23d;
  --white: #ffffff;
  --light-overlay: rgba(0, 0, 0, 0.02);
}

/* Navigation bar styling */
.navbar {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 20px;
}

.navbar a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.navbar a:hover {
  color: var(--highlight);
}

.navbar .lang-switch {
  background-color: var(--white);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  transition: background 0.3s, color 0.3s;
}

.navbar .lang-switch:hover {
  background-color: var(--highlight);
  color: var(--primary-dark);
}

/* Registration section */
.registration {
  background: var(--secondary-dark);
  padding: 80px 20px;
  text-align: center;
}

.registration-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.registration .form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.registration .form-group label {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
}

.registration .form-group input,
.registration .form-group select {
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
}

.registration .btn-submit {
  background: var(--highlight);
  color: var(--primary-dark);
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  align-self: center;
}

.registration .btn-submit:hover {
  background: #e39a2d;
}

.form-message {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--highlight);
}

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

body {
  font-family: 'Kanit', 'Montserrat', sans-serif;
  color: var(--white);
  background-color: var(--primary-dark);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  margin-bottom: 0.5em;
}

h1.hero-title span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-heading {
  font-size: 2rem;
  line-height: 1.3;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--white);
}

/* Hero Section */
.hero {
  position: relative;
  /* Use the provided scenic background for the hero section */
  background: url('bg-1.jpg') center/cover no-repeat;
  color: var(--white);
}

.hero-overlay {
  background: var(--light-overlay);
  padding: 60px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content {
  max-width: 1000px;
}

.hero-subtitle {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}

.hero-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Style for the official logo placed in the hero section */
.hero-logo {
  width: 80%;
  max-width: 600px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.hero-details p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 300;
}

.hero-date {
  font-weight: 700;
  font-size: 1rem;
}

/* Sponsor logos row */
.sponsor-logos {
  background: #ffffff;
  padding: 20px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.sponsor-logos img {
  /* Maintain consistent height while preserving aspect ratio */
  height: 40px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  background-color: #ffffff;
  border: none;
}

/* Mission Section */
.mission {
  /* Overlay a dark tint over the sunrise background for legibility */
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('bg-2.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px 60px;
  text-align: center;
}

.mission-points {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1000px;
  margin: 40px auto;
  align-items: stretch;
}

.mission-item {
  position: relative;
  padding-left: 50px;
  text-align: left;
}

.mission-item .arrow {
  position: absolute;
  left: 0;
  top: 8px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid rgba(255, 255, 255, 0.8);
}

.mission-item p {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 300;
}

.objectives-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 20px;
  text-align: left;
}

@media (min-width: 768px) {
  .mission-points {
    flex-direction: row;
  }
  .mission-item {
    flex: 1;
  }
  .objectives-title {
    text-align: center;
  }
}

/* Partners Section */
.partners {
  background: var(--secondary-dark);
  padding: 80px 20px;
  text-align: center;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  justify-items: center;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  margin-top: 40px;
}

/* Partner items for association logos */
.partner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0.5rem;
}

.partner-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.partner-item span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white);
}

/* Competition Section */
.competition {
  background: #020202;
  padding: 80px 20px 0px 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 40px;
}

.competition-content {
  flex: 2;
}

.competition-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Display the presenter illustration responsively */
.competition-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
}

.presenter-placeholder {
  width: 100%;
  max-width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #183a66 0%, #021d40 100%);
  border-radius: 12px;
}

.competition-list {
  list-style: none;
  margin: 20px 0;
}

.competition-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 300;
}

.competition-list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--highlight);
  font-size: 1.2rem;
  line-height: 1;
}

.quote {
  font-style: italic;
  font-weight: 400;
  margin: 20px 0;
  font-size: 1.1rem;
}

.highlight-box {
  background: var(--highlight);
  color: var(--primary-dark);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.highlight-box strong {
  display: block;
  margin-top: 8px;
  font-weight: 700;
}

/* Award graphics in competition section */
.award-graphics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.award-graphics img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 992px) {
  .competition {
    flex-direction: row;
  }
  .competition-content {
    padding-right: 40px;
  }
}

/* Participants Section */
.participants {
  background: linear-gradient(180deg, #05244a 0%, #0a4068 100%);
  padding: 80px 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto 0;
}

.participant-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.participant-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.participant-card p {
  font-size: 0.9rem;
  font-weight: 300;
}

.participant-card .card-img {
  width: 100%;
  height: 150px;
  background: none;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.participant-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Schedule Section */
.schedule {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url(bg-3.jpg);
  padding: 80px 20px;
}

.schedule-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.schedule-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schedule-item {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--highlight);
  padding: 12px 16px;
  border-radius: 8px;
  align-items: flex-start;
}

.schedule-item.day-23 {
  border-left: 4px solid #f4b23d; /* orange */
}

.schedule-item.day-24 {
  border-left: 4px solid #55d6be; /* mint green */
}

.schedule-item.day-25 {
  border-left: 4px solid #ff6b6b; /* soft red */
}

.schedule-date {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 120px;
}

.schedule-date span {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.schedule-desc {
  font-size: 0.9rem;
  font-weight: 300;
}

.schedule-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
}

@media (min-width: 992px) {
  .schedule-wrapper {
    flex-direction: row;
  }
  .schedule-list {
    max-width: 50%;
  }
  .schedule-image {
    max-width: 50%;
  }
}

/* Awards Section */
.awards {
  background-image: linear-gradient(rgba(2, 26, 63, 0.4), rgba(2, 15, 39, 0.5)), url('bg-4.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
}

.awards-top {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.awards-info {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.award-block {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--highlight);
  padding: 20px;
  border-radius: 8px;
}

.award-block h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--highlight);
}

.award-block ul {
  list-style: none;
}

.award-block ul li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 300;
}

.awards-banner {
  flex: 1;
  background: url('hero_abstract.png') center/cover no-repeat;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--white);
}

.awards-banner h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.awards-banner p {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Sponsors Section */
.sponsors {
  padding: 80px 20px;
}

/* Container for award banner image */
.banner-image {
  margin-top: 20px;
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 20px auto 0;
}

.prize-card {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--highlight);
  padding: 20px;
  border-radius: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.prize-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--highlight);
}

.prize-card ul {
  list-style: none; /* Remove default bullets */
  padding-left: 0;
  margin-left: 0;
}

.prize-card ul li {
  position: relative;
  padding-left: 1.5rem; /* Space for the star */
  margin-bottom: 0.5rem;
}

.prize-card ul li::before {
  content: "★"; /* Unicode star */
  position: absolute;
  left: 0;
  top: 0;
  color: var(--highlight); /* Use your brand orange */
  font-size: 1rem;
  line-height: 1.2;
}

@media (min-width: 992px) {
  .awards-top {
    flex-direction: row;
  }
  .awards-info {
    flex: 2;
    padding-right: 40px;
  }
  .awards-banner {
    flex: 1;
  }
}

/* Timeline Section */
.timeline {
  background: var(--tertiary-dark);
  padding: 80px 20px;
}

.timeline-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 40px;
  max-width: 1000px;
  margin: 40px auto 0;
  position: relative;
}

.timeline-flow::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 30px;
  width: 2px;
  height: calc(100% - 60px);
  background: rgba(244, 178, 61, 0.4);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 20px;
}

.timeline-item h4 {
  font-size: 1rem;
  margin: 20px 0 4px;
  font-weight: 700;
  color: var(--highlight);
}

.timeline-item p {
  font-size: 0.85rem;
  font-weight: 300;
}

.timeline-icon {
  width: 50px;
  height: 50px;
  background: var(--secondary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--highlight);
}

/* Ensure timeline icons display custom graphics instead of FontAwesome */
.timeline-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

@media (min-width: 768px) {
  .timeline-flow {
    flex-direction: row;
    justify-content: space-between;
  }
  .timeline-flow::after {
    top: 50%;
    left: 30px;
    width: calc(100% - 60px);
    height: 2px;
    transform: translateY(-50%);
  }
  .timeline-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Footer Section */
/* Footer uses the provided scenic footer image with a dark overlay */
.footer {

  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url(footer.jpg);
  background-size: cover;
  background-position: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--white);
}

.footer-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.boat-image {
  width: 100%;
  max-width: 400px;
  height: 200px;
  background: url('waves_abstract.png') center/cover no-repeat;
  border-radius: 12px;
  margin-bottom: 16px;
}

.footer-banner h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.footer-heading {
  font-size: 1.6rem;
  margin: 20px 0;
}

.contact-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 300;
}

.contact-item i {
  color: var(--highlight);
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 10px;
  color: var(--highlight);
}

#popup-message .popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

#popup-message .popup-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: #000; /* ✅ Add this line */
  padding: 2rem;
  border-radius: 10px;
  z-index: 1000;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#popup-message button {
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#popup-message button:hover {
  background-color: #0056b3;
}
