/* =========================================
   main.css – Estilos compartidos Becas Perú
   Usar en todas las páginas del sitio
   ========================================= */

:root {
  --primary: #1e3a8a;
  --secondary: #f1f5f9;
  --accent: #10b981;
  --text: #1e293b;
  --light-text: #64748b;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--secondary);
}

/* ---- Header & Nav ---- */
header {
  background: var(--white);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ---- Hero ---- */
.hero {
  background: var(--white);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.2rem;
  color: var(--light-text);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  gap: 3rem;
}

main {
  flex: 2;
}

/* ---- Post Cards ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid #f1f5f9;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.post-content h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-content h2 a:hover {
  color: var(--primary);
}

.post-content p {
  color: var(--light-text);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.meta {
  font-size: 0.85rem;
  color: var(--light-text);
  display: flex;
  gap: 1rem;
}

/* ---- Sidebar ---- */
aside {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--white);
  padding: 1.75rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.sidebar-widget h3 {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  margin-bottom: 0.75rem;
}

.sidebar-widget a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.sidebar-widget a:hover {
  color: var(--accent);
}

/* ---- Post Tag ---- */
.post-tag {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Read More Button ---- */
.read-more {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.read-more:hover {
  background: var(--primary);
  color: var(--white);
}

/* ---- AdSense placeholder ---- */
.adsense {
  background: #f8fafc;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--light-text);
  font-size: 0.9rem;
  text-align: center;
}

/* ---- Footer ---- */
footer {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 3rem 2rem 2rem;
}

footer p {
  margin-bottom: 0.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
}

footer p:last-child {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 2rem;
    padding: 0 1rem 2rem;
  }

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

  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  nav ul {
    gap: 1rem;
  }
}
