/* 
 * Main stylesheet for Earth Explorer webpage
 * Adapted from the diatom-webpage project
 */

/* Base styles and reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Stars styling */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

.shooting-star {
  position: fixed;
  top: 0;
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%);
  opacity: 0;
  animation: shootingStar 1s ease-in forwards;
  z-index: 0;
  pointer-events: none;
}

/* Creating a subtle starfield background */
@keyframes twinkle {
  0% { opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { opacity: 0.3; }
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  line-height: 1.6;
  color: #e6f0ff; /* Light blue text for contrast */
  background-color: #080d17; /* Dark space background */
  background-image: 
    linear-gradient(to bottom, #040b1c, #0c1527, #1a203c, #090d18);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(white, rgba(255,255,255,0) 2px);
  background-position: 0 0, 50px 50px;
  background-size: 250px 250px;
  opacity: 0.15;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', 'Raleway', Arial, sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #7b9eff; /* Bright blue for headings */
  text-shadow: 0 0 10px rgba(123, 158, 255, 0.6);
  letter-spacing: 1px;
}

/* Container for all content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header styles */
header {
  background-color: rgba(10, 15, 30, 0.8); /* Semi-transparent deep blue */
  color: white;
  padding: 12px 0;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(123, 158, 255, 0.2);
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(123, 158, 255, 0.2);
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #7b9eff;
  text-shadow: 0 0 10px rgba(123, 158, 255, 0.6);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: #7b9eff;
  box-shadow: 0 0 8px #7b9eff, 0 0 12px #7b9eff;
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: #7b9eff;
  text-shadow: 0 0 10px rgba(123, 158, 255, 0.8);
}

nav ul li a:hover::after {
  width: 100%;
}

/* AI notice banner */
.ai-notice-container {
  position: fixed;
  top: 61px; /* Position just below the header */
  left: 0;
  right: 0;
  z-index: 999; /* Below the header but above other content */
  width: 100%;
  padding: 0;
  box-shadow: 0 2px 8px rgba(123, 158, 255, 0.3);
}

.ai-notice {
  background-color: rgba(15, 30, 60, 0.8);
  border-top: 1px solid rgba(123, 158, 255, 0.3);
  border-bottom: 1px solid rgba(123, 158, 255, 0.3);
  color: #d9e6ff;
  padding: 3px 0;
  text-align: center;
  border-radius: 0;
  box-shadow: 0 3px 10px rgba(123, 158, 255, 0.2);
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.ai-notice .phone {
  font-weight: bold;
  color: #7b9eff;
  text-shadow: 0 0 8px rgba(123, 158, 255, 0.8);
  letter-spacing: 0.5px;
}

.ai-notice p {
  margin: 0;
  line-height: 1.4;
}

.ai-notice-inner {
  padding: 0 15px;
}

/* Hero section */
.hero {
  height: 70vh;
  min-height: 500px;
  margin-top: 50px;
  background: url('../../images/image1.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 25, 50, 0.8) 0%, rgba(5, 15, 35, 0.9) 100%);
  z-index: 1;
}

.hero-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="white" opacity="0.4"/><circle cx="30" cy="40" r="0.8" fill="white" opacity="0.3"/><circle cx="70" cy="20" r="0.7" fill="white" opacity="0.2"/><circle cx="50" cy="90" r="0.6" fill="white" opacity="0.3"/><circle cx="90" cy="60" r="0.9" fill="white" opacity="0.4"/></svg>');
  background-size: 200px 200px;
  opacity: 0.5;
}

.hero-content {
  z-index: 2;
  padding: 20px;
  max-width: 900px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 25px;
  color: #f0f8ff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(123, 158, 255, 0.8);
  letter-spacing: 3px;
  font-family: 'Orbitron', sans-serif;
}

.hero p {
  font-size: 1.7rem;
  max-width: 800px;
  margin: 0 auto;
  color: #e6f2ff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 300;
}

/* Main content sections */
.section {
  padding: 80px 0;
  overflow: hidden;
  background-color: rgba(15, 20, 35, 0.7);
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(123, 158, 255, 0.1);
}

/* Earth Gallery specific styles */
.section:nth-child(8) img {
  transition: all 0.5s ease;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(123, 158, 255, 0.3), 0 0 15px rgba(123, 158, 255, 0.3);
  border-radius: 12px;
  margin: 5px;
}

.section:nth-child(8) img:hover {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(123, 158, 255, 0.6), 0 0 20px rgba(123, 158, 255, 0.5);
}

.section:nth-child(odd) {
  background-color: rgba(10, 15, 30, 0.7);
}

/* Custom section dividers */
.section {
  position: relative;
}

.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V0C57,10.15,136.15,62.57,212.2,73.05,287.42,83.36,334.59,55.92,321.39,56.44Z" fill="%230f1423" opacity="0.7"></path></svg>');
  background-size: cover;
  background-position: center top;
  z-index: 2;
  pointer-events: none;
}

.section:nth-child(even)::after {
  transform: rotate(180deg);
  top: 0;
  bottom: auto;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V0C57,10.15,136.15,62.57,212.2,73.05,287.42,83.36,334.59,55.92,321.39,56.44Z" fill="%230a0f1e" opacity="0.7"></path></svg>');
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 40px;
  color: #7b9eff;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title:after {
  content: '';
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(to right, rgba(123, 158, 255, 0.1), rgba(123, 158, 255, 0.8), rgba(123, 158, 255, 0.1));
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px rgba(123, 158, 255, 0.8);
}

.section-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.text-block {
  flex: 1;
  padding: 20px;
  min-width: 300px;
}

.text-block p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #d9e6ff; /* Light blue text for readability */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.image-block {
  flex: 1;
  padding: 20px;
  min-width: 300px;
  text-align: center;
}

.image-block img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(123, 158, 255, 0.3), 0 0 15px rgba(123, 158, 255, 0.2);
  transition: all 0.4s ease;
  filter: brightness(1.05) contrast(1.05);
  border: 1px solid rgba(123, 158, 255, 0.2);
}

.image-block img:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(123, 158, 255, 0.6), 0 0 20px rgba(123, 158, 255, 0.4);
  filter: brightness(1.1) contrast(1.1);
  border: 1px solid rgba(123, 158, 255, 0.6);
}

/* Alternating layout for sections */
.section:nth-child(even) .section-content {
  flex-direction: row-reverse;
}

/* Special styling for highlighting important information */
.highlight-box {
  background-color: rgba(15, 25, 50, 0.6);
  border-left: 5px solid rgba(123, 158, 255, 0.7);
  padding: 25px;
  margin: 30px 0;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 5px 15px rgba(123, 158, 255, 0.15), inset 0 0 30px rgba(10, 20, 40, 0.5);
  position: relative;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.highlight-box p {
  font-style: italic;
  color: #d9e6ff;
  line-height: 1.8;
  position: relative;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.highlight-box p::before {
  content: '"';
  font-size: 50px;
  color: rgba(123, 158, 255, 0.25);
  position: absolute;
  top: -20px;
  left: -15px;
  font-family: Georgia, serif;
  text-shadow: 0 0 10px rgba(123, 158, 255, 0.3);
}

.highlight-box p em {
  font-weight: 500;
  color: #7b9eff;
  display: block;
  text-align: right;
  margin-top: 10px;
  font-style: normal;
  text-shadow: 0 0 8px rgba(123, 158, 255, 0.6);
}

/* Call to action section */
.cta {
  background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%);
  color: white;
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../../images/image7.jpg') no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  z-index: 1;
}

.cta .container {
  position: relative;
  z-index: 2;
}

.cta h2 {
  margin-bottom: 25px;
  font-size: 2.5rem;
  color: #f0f8ff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.cta p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 20px;
  color: #e6f2ff;
}

.cta-button {
  display: inline-block;
  background-color: #3182ce;
  color: white;
  padding: 15px 35px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  background-color: #2b6cb0;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* VR box styles */
.vr-box {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  margin: 25px auto;
  max-width: 700px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
  background-color: #1a202c;
  color: #fff;
  padding: 50px 0 30px;
  text-align: center;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #3182ce, #2a4365, #1a365d);
}

footer p {
  margin-bottom: 15px;
  opacity: 0.9;
  font-size: 0.95rem;
}

.qr-code {
  margin: 20px auto;
  text-align: center;
}

footer small {
  opacity: 0.7;
  font-size: 0.85rem;
}

footer a {
  color: #90cdf4;
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: #fff;
  text-decoration: none;
}

/* Space icons */
.space-icon {
  color: #7b9eff;
  margin-right: 10px;
  text-shadow: 0 0 10px rgba(123, 158, 255, 0.8);
  animation: glow 2s infinite ease-in-out;
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(123, 158, 255, 0.5);
  }
  50% {
    text-shadow: 0 0 15px rgba(123, 158, 255, 0.8), 0 0 20px rgba(123, 158, 255, 0.5);
  }
}

.highlight-box .space-icon {
  font-size: 1.2rem;
  opacity: 0.9;
  vertical-align: middle;
  margin-right: 8px;
}

/* Lists in content */
.text-block ul {
  margin-bottom: 1.5rem;
  padding-left: 20px;
}

.text-block li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

/* Scroll animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Star animations */
@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 8px rgba(255, 255, 255, 0.5);
  }
}

@keyframes shootingStar {
  0% {
    transform: translateY(0) translateX(0) rotate(330deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(-100px) rotate(330deg);
    opacity: 0;
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
  animation-delay: 0.15s;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.15s;
}

.delay-1 {
  animation-delay: 0.25s;
}

.delay-2 {
  animation-delay: 0.35s;
}

/* Responsive design */
@media (max-width: 992px) {
  .section-content {
    gap: 30px;
  }
  
  .text-block, .image-block {
    padding: 15px;
  }
  
  .section::after {
    height: 50px; /* Smaller section dividers on tablets */
  }
  
  .space-icon {
    margin-right: 8px;
  }
}

@media (max-width: 768px) {
  .section-content {
    flex-direction: column !important;
  }
  
  .hero {
    min-height: 400px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
  
  .section {
    padding: 60px 0 80px; /* Extra padding to account for wave divider */
  }
  
  .section::after {
    height: 40px; /* Smaller section dividers on mobile */
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    letter-spacing: 1px; /* Reduced letter spacing on mobile */
  }
  
  .section-title .space-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 2rem;
  }
  
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  nav ul {
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  nav ul li {
    margin: 0 10px;
    margin-bottom: 5px;
  }
  
  .cta h2 {
    font-size: 2rem;
  }
  
  .cta-button {
    padding: 12px 28px;
  }
  
  /* Make AI notice more responsive */
  .ai-notice-container {
    top: 125px;
  }
  
  .hero {
    margin-top: 65px;
  }
  
  .ai-notice {
    padding: 6px 0;
  }
  
  /* Adjust star animations for mobile */
  .stars-container {
    opacity: 0.5; /* Reduce star opacity on mobile for better readability */
  }
  
  .shooting-star {
    display: none; /* Hide shooting stars on mobile for better performance */
  }
}

@media (max-width: 576px) {
  .section {
    padding: 40px 0 70px; /* Account for wave divider */
  }
  
  .section::after {
    height: 30px; /* Even smaller section dividers on small mobile */
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .text-block, .image-block {
    padding: 10px;
  }
  
  .highlight-box {
    padding: 20px;
    margin: 20px 0;
  }
  
  .cta {
    padding: 50px 0;
  }
  
  /* Fix for AI notice on mobile */
  .ai-notice-container {
    height: auto;
    position: fixed;
  }
  
  .ai-notice {
    min-height: auto;
    padding: 10px 0;
  }
  
  .ai-notice p {
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0 5px;
  }
  
  /* Image adjustments for mobile */
  .image-block img,
  .section:nth-child(8) img {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(123, 158, 255, 0.2);
    margin-bottom: 15px;
  }
  
  /* Space icon adjustments for small screens */
  .space-icon {
    margin-right: 5px;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  .ai-notice-container {
    top: 135px;
  }
  
  .ai-notice-inner {
    padding: 0 10px;
  }
  
  .ai-notice p {
    font-size: 0.85rem;
    line-height: 1.3;
  }
  
  .hero {
    margin-top: 75px;
  }
}