/* ==========================================================================
   1. GLOBAL STYLES & NAVIGATION MENU
   ========================================================================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0d0d0d;
  color: #e0e0e0;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

header {
  background-color: #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  border-bottom: 2px solid #00ff99;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #00ff99;
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #e0e0e0;
  transition: color 0.3s;
}

nav a:hover {
  color: #00ff99;
}

/* ==========================================================================
   2. HOME: HERO, GRID & CARDS
   ========================================================================== */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #0d0d0d, #1a1a1a);
  border-bottom: 2px solid #00ff99;
}

.hero h1 {
  font-size: 2.5em;
  color: #00ff99;
}

.hero p {
  font-size: 1.2em;
  color: #cccccc;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 40px;
}

.post {
  background-color: #1a1a1a;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 8px;
  transition: transform 0.3s;
}

.post:hover {
  transform: translateY(-5px);
  border-color: #00ff99;
}

.post h2 {
  color: #00ff99;
}

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #00ff99;
  color: #0d0d0d;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #00cc77;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.card {
  background-color: #1a1a1a;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 8px;
  transition: transform 0.3s;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 10px;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #00ff99;
}

.card h3 {
  color: #00ff99;
}

footer {
  text-align: center;
  padding: 20px;
  background-color: #1a1a1a;
  border-top: 2px solid #00ff99;
  color: #888;
}

/* ==========================================================================
   3. READING MODE (NYT Style)
   ========================================================================== */
.nyt-article-wrapper {
  max-width: 680px;
  margin: 50px auto;
  padding: 0 25px;
}

.nyt-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 2.6rem;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: 700;
}

.nyt-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0a0a0;
  border-top: 1px solid #262626;
  border-bottom: 1px solid #262626;
  padding: 12px 0;
  margin-bottom: 35px;
}

.nyt-meta span {
  color: #00ff99;
  font-weight: 600;
}

.nyt-image-container {
  margin-bottom: 35px;
  border: 1px solid #262626;
  border-radius: 6px;
  overflow: hidden;
}

.nyt-image {
  width: 100%;
  height: auto;
  display: block;
}

.nyt-content {
  font-family: 'Georgia', 'Times New Roman', serif; 
  font-size: 1.22rem;  
  line-height: 1.75;   
  color: #e6e6e6;      
}

.nyt-content p {
  margin-bottom: 28px;
}

.nyt-content h2, .nyt-content h3, .nyt-content h4 {
  font-family: 'Segoe UI', sans-serif;
  color: #00ff99;
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.nyt-content pre, .nyt-content code {
  font-family: 'Courier New', Courier, monospace;
  background-color: #1a1a1a;
  color: #00ff99;
  border-radius: 4px;
}

.nyt-content pre {
  padding: 15px;
  overflow-x: auto;
  border: 1px solid #262626;
  margin-bottom: 28px;
}

.nyt-content p code {
  padding: 2px 6px;
  background-color: #1a1a1a;
  font-size: 0.95em;
}

.nyt-content ul, .nyt-content ol {
  margin-bottom: 28px;
  padding-left: 25px;
}

.nyt-content li {
  margin-bottom: 10px;
}

.nyt-footer {
  border-top: 1px solid #262626;
  margin-top: 60px;
  padding-top: 25px;
  text-align: center;
}

.btn-back {
  text-decoration: none;
  color: #a0a0a0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  display: inline-block;
  margin-bottom: 15px;
}

.btn-back:hover {
  color: #00ff99;
}

/* ==========================================================================
   4. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    text-align: center;
  }

  .hero h1 {
    font-size: 2em;
  }

  .hero p {
    font-size: 1rem;
  }

  .nyt-article-wrapper {
    margin: 25px auto;
    padding: 0 15px; 
  }

  .nyt-title {
    font-size: 1.9rem; 
    line-height: 1.25;
  }

  .nyt-meta {
    font-size: 0.75rem;
    padding: 10px 0;
    margin-bottom: 25px;
  }

  .nyt-content {
    font-size: 1.1rem; 
    line-height: 1.65;
  }

  .nyt-content p {
    margin-bottom: 22px;
  }
  
  .nyt-content pre {
    padding: 10px;
    font-size: 0.85rem;
  }
}

/* Conexión exitosa a AWS S3 - CypherPol 2026 */
