/* Morse Maven Website Styles */

:root {
  --primary-color: #7dd3fc; /* Light blue accent from app */
  --primary-dark: #0284c7;
  --secondary-color: #0ea5e9;
  --text-color: #0f172a;
  --light-gray: #f8fafc;
  --white: #ffffff;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Open Sans', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-gray);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 60px;
  margin-right: 10px;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Language Selector Styles */
.language-selector {
  position: relative;
  margin-left: 20px;
  cursor: pointer;
  z-index: 1001; /* Ensure it's above other elements */
}

.selected-language {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: var(--white);
  font-size: 1rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.selected-language:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.selected-language .flag-icon {
  width: 24px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid #eee; /* Subtle border for flags */
}

.selected-language span {
  margin-right: 8px;
}

.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.language-selector.active .dropdown-arrow {
  transform: rotate(180deg);
}

.language-dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: var(--box-shadow);
  min-width: 180px;
  padding: 5px 0;
  margin-top: 5px;
  display: none; /* Hidden by default */
}

.language-selector.active .language-dropdown {
  display: block; /* Show when active */
}

.language-dropdown li {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.language-dropdown li:hover {
  background-color: var(--light-gray);
}

.language-dropdown li .flag-icon {
  width: 24px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid #eee;
}

/* Remove old flag icon styles from select options */
.language-selector select option {
  padding-left: 0;
  background-image: none;
  background-repeat: initial;
  background-position: initial;
  background-size: initial;
}

.language-selector select option[value="en"],
.language-selector select option[value="fr"],
.language-selector select option[value="de"],
.language-selector select option[value="es"],
.language-selector select option[value="it"],
.language-selector select option[value="cy"],
.language-selector select option[value="pt"] {
  background-image: none;
}


/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 150px 0 100px;
  color: var(--white);
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 800;
  padding-top: 20px;
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 40px;
}

.btn {
  display: inline-block;
  background-color: var(--white);
  color: var(--secondary-color);
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  margin: 0 10px;
  text-align:center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--secondary-color);
}

/* Features Section */
.features {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title-with-spacing {
  text-align: center;
  margin-bottom: 60px;
  margin-top: 80px;
}

/* Inherit styles from section-title to section-title-with-spacing */
.section-title-with-spacing h2 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 15px;
}

.section-title-with-spacing p {
  max-width: 600px;
  margin: 0 auto;
  color: #64748b;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 15px;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
  color: #64748b;
}

.feature-note p {
  color: #64748b;
  margin-top: 36px;           /* Add space above */
  text-align: center;         /* Center the text */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.feature-card p {
  color: #64748b;
  margin-bottom: 20px;
}

.feature-card .btn {
  margin-top: auto;
  align-self: center;
}

/* Custom styling for history page content */
.content-block {
  margin-bottom: 40px;
}

.content-block h3 {
  margin-bottom: 25px;
}

.content-block p {
  margin-bottom: 20px;
}

.content-block p:last-child {
  margin-bottom: 0;
}

/* App Preview Section */
.app-preview {
  background-color: var(--white);
  padding: 100px 0;
  text-align: center;
}

.app-screenshots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.screenshot {
  max-width: 300px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
}

.screenshot:hover {
  transform: scale(1.05);
}

.feature-image {
  max-width: 300px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}


/* Download Section */
.download {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--white);
}

.download h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.download p {
  max-width: 600px;
  margin: 0 auto 40px;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  background-color: var(--white);
  color: var(--text-color);
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.store-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.store-btn img {
/*  height: 50px; */
/* margin-right: 10px; */
}

/* Contact Form Section */
.contact {
  padding: 100px 0;
  background-color: var(--white);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background-color: var(--primary-dark);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Improved unordered list styling for features and general use */
.features ul,
.feature-card ul,
ul {
  padding-left: 1.5em;
  margin-bottom: 20px;
}

.features ul li,
.feature-card ul li,
ul li {
  margin-bottom: 10px;
  color: #334155;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}

/* Custom bullet color for feature lists */
.features ul li::marker,
.feature-card ul li::marker,
ul li::marker {
  color: var(--primary-dark);
  font-size: 1.2em;
}

/* RSGB FAQ row: list left, logo right */
.rsgb-flex-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

/* RSGB logo in FAQ: right of list, match bullet list height */
.rsgb-logo {
  height: 80px;
  min-width: 60px;
  margin-left: 0;
  margin-bottom: 0;
  object-fit: contain;
  align-self: flex-start;
}

.nav-links {
  margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1000px) {
  .navbar {
    flex-direction: column;
  }
  
  .logo-text {
    font-size: 2rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding-left: 0;
  }
  
  .nav-links li {
    margin: 5px 10px;
  }
  
  .hero {
    padding: 270px 0 80px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
    padding-top: 20px;
  }
  
  .btn {
    margin: 10px;
    display: inline-block;
  }
  
  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .app-screenshots {
    flex-direction: column;
  }
  
  .store-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* Flag icons for language selector */
.language-selector select option {
  padding-left: 30px; /* Make space for the flag */
  background-repeat: no-repeat;
  background-position: 5px center;
  background-size: 20px 15px; /* Adjust size as needed */
}

.language-selector select option[value="en"] {
  background-image: url('../img/flags/gb.png'); /* Placeholder for English flag */
}

.language-selector select option[value="fr"] {
  background-image: url('../img/flags/fr.png'); /* Placeholder for French flag */
}

.language-selector select option[value="de"] {
  background-image: url('../img/flags/de.png'); /* Placeholder for German flag */
}

.language-selector select option[value="es"] {
  background-image: url('../img/flags/es.png'); /* Placeholder for Spanish flag */
}

.language-selector select option[value="it"] {
  background-image: url('../img/flags/it.png'); /* Placeholder for Italian flag */
}

.language-selector select option[value="cy"] {
  background-image: url('../img/flags/cy.png'); /* Placeholder for Welsh flag */
}

.language-selector select option[value="pt"] {
  background-image: url('../img/flags/pt.png'); /* Placeholder for Portuguese flag */
}
