/* Enhanced NanoForge.AI Website Styles */
/* Color Palette:
   Primary: Cyan (#00f7ff)
   Background: Black (#000000)
   Secondary: Light Grey (#f4f4f4)
   Accent: Various blues and dark greys
*/

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #000000;
  color: #f4f4f4;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  margin-bottom: 1rem;
}

a {
  color: #00f7ff;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #00c8cc;
  text-decoration: none;
}

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

/* Header Styles */
header {
  padding: 2rem 0;
  position: relative;
  border-bottom: 1px solid rgba(0, 247, 255, 0.2);
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo-container {
  margin-bottom: 1.5rem;
  position: relative;
}

.logo {
  width: 180px;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.tagline {
  font-size: 1.2rem;
  color: #f4f4f4;
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Content Styles */
main {
  padding: 3rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  color: #00f7ff;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #00f7ff;
}

/* Enhanced News Feed Styles */
.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-card {
  background-color: rgba(20, 20, 20, 0.8);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 247, 255, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 247, 255, 0.2);
}

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.placeholder-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #001e3c 0%, #003366 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f7ff;
  font-weight: 500;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.news-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.8rem;
  color: #00f7ff;
  margin-bottom: 0.5rem;
}

.news-source {
  font-size: 0.8rem;
  color: #a0a0a0;
  margin-bottom: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.news-author {
  color: #d4d4d4;
  font-weight: 500;
}

.news-source-name {
  color: #00f7ff;
  font-style: italic;
}

.news-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: #d4d4d4;
  flex-grow: 1;
}

.read-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 247, 255, 0.1);
  color: #00f7ff;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: auto;
}

.read-more:hover {
  background-color: rgba(0, 247, 255, 0.2);
}

/* Loading Indicator */
.loading-indicator {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 247, 255, 0.3);
  border-radius: 50%;
  border-top-color: #00f7ff;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Feed Error */
.feed-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
}

.retry-button {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  background-color: rgba(0, 247, 255, 0.1);
  color: #00f7ff;
  border: 1px solid #00f7ff;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-button:hover {
  background-color: rgba(0, 247, 255, 0.2);
}

/* Enhanced Newsletter Section Styles */
.newsletter-section {
  margin-top: 4rem;
  padding: 3rem;
  background-color: rgba(20, 20, 20, 0.8);
  border-radius: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 247, 255, 0.1);
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 247, 255, 0.05), transparent);
  z-index: -1;
}

.newsletter-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #00f7ff;
}

.newsletter-description {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #f4f4f4;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.newsletter-input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
}

.newsletter-button {
  padding: 0.8rem 1.5rem;
  background-color: #00f7ff;
  color: #000000;
  border: none;
  border-radius: 0 4px 4px 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-button:hover {
  background-color: #00c8cc;
}

.newsletter-privacy {
  font-size: 0.8rem;
  color: #a0a0a0;
  margin-top: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-privacy a {
  color: #00f7ff;
  text-decoration: underline;
}

.message {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.message-success {
  background-color: rgba(0, 255, 0, 0.1);
  color: #00ff00;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

.message-error {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff5555;
  border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Enhanced Footer Styles */
footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 247, 255, 0.2);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: #d4d4d4;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.footer-nav a:hover {
  color: #00f7ff;
}

.copyright {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #a0a0a0;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 247, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: rgba(0, 247, 255, 0.3);
  transform: translateY(-3px);
}

.social-icon i {
  color: #00f7ff;
  font-size: 1.2rem;
}

/* Background Elements */
.bg-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 247, 255, 0.03) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Category Badges */
.category-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.category-quantum {
  background-color: rgba(128, 0, 255, 0.2);
  color: #b088ff;
  border: 1px solid rgba(128, 0, 255, 0.3);
}

.category-nanotech {
  background-color: rgba(0, 247, 255, 0.2);
  color: #00f7ff;
  border: 1px solid rgba(0, 247, 255, 0.3);
}

.category-ai {
  background-color: rgba(255, 128, 0, 0.2);
  color: #ff9d45;
  border: 1px solid rgba(255, 128, 0, 0.3);
}

/* Lazy Loading */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-image.loaded {
  opacity: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .news-feed {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-input {
    border-radius: 4px;
    margin-bottom: 1rem;
  }
  
  .newsletter-button {
    border-radius: 4px;
  }
  
  .logo {
    width: 150px;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .newsletter-section {
    padding: 2rem 1.5rem;
  }
  
  .footer-nav {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 120px;
  }
  
  .tagline {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .news-content {
    padding: 1rem;
  }
  
  .news-title {
    font-size: 1.1rem;
  }
  
  .newsletter-title {
    font-size: 1.4rem;
  }
  
  .social-icons {
    gap: 0.5rem;
  }
  
  .social-icon {
    width: 35px;
    height: 35px;
  }
}

/* Accessibility Improvements */
:focus {
  outline: 2px solid #00f7ff;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #00f7ff;
  color: #000000;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Print Styles */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  
  .bg-texture, .bg-particles, .newsletter-section, .social-icons {
    display: none;
  }
  
  .container {
    width: 100%;
    max-width: none;
  }
  
  a {
    color: #000;
  }
  
  .news-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
