/* =========================================
   Reset y Variables
   ========================================= */
:root {
  --bg-dark: #26343f;
  --bg-light: #fff;
  --accent-red: #b33636;
  --text-main: #333;
  --text-muted: #666;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-width: 1150px;
  --card-padding: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  /* Asumimos la ruta relativa original para la imagen */
  background-image: url('/assets/img/textura-de-pared-verde-lisa-llana.jpg');
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: auto 100vh;
  font-family: var(--font-serif);
  color: var(--text-main);
  line-height: 1.5;
  min-width: 350px;
  padding: 3rem 1rem;
  /* Espaciado externo similar a my-5 */
}

/* =========================================
   Tipografía y Enlaces
   ========================================= */
a {
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
  color: var(--accent-red);
}

h1,
h2,
h3 {
  color: var(--bg-dark);
  font-weight: normal;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

.text-muted {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.text-small {
  font-size: 0.7rem;
}

/* =========================================
   Layout Principal
   ========================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
}

.card {
  background-color: var(--bg-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: var(--card-padding);
  margin-bottom: 0.5rem;
  /* similar a mb-1 */
}

/* =========================================
   Tarjeta de Perfil (Grid System)
   ========================================= */
.profile-grid {
  display: grid;
  gap: 0.5rem;
  /* Definimos áreas para reordenar fácilmente en móvil/desktop */
  grid-template-areas:
    "photo"
    "name"
    "desc"
    "links"
    "social"
    "footer";
  text-align: center;
  /* Centrado por defecto en móvil */
}

/* Elementos del Grid */
.area-name {
  grid-area: name;
  font-size: 1.75rem;
  line-height: 1.2;
}

.area-photo {
  grid-area: photo;
  display: flex;
  justify-content: center;
}

.area-desc {
  grid-area: desc;
}

.area-links {
  grid-area: links;
}

.area-social {
  grid-area: social;
}

.area-footer {
  grid-area: footer;
  border-top: 1px solid #dee2e6;
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Foto de perfil */
.profile-photo {
  max-width: 65%;
  height: auto;
  display: block;
}

/* Listas de enlaces principales */
.link-list {
  list-style: none;
  font-family: var(--font-sans);
  text-align: left;
  /* Siempre alineado a la izquierda según diseño original */
}

.link-list a {
  font-weight: bold !important;
}

.link-list li {
  margin-bottom: 1rem;
}

/* Bloque de Redes Sociales */
.social-block {
  display: flex;
  gap: 2rem;
  justify-content: center;
  /* Centrado en móvil */
  text-align: left;
}

.social-group p {
  margin-bottom: 0.25rem;
  font-family: sans-serif;
  font-weight: normal;
}

.social-icon {
  font-size: 1.75rem;
  margin-right: 10px;
  color: var(--bg-dark);
  transition: color 0.3s;
}

.social-icon:hover {
  color: var(--accent-red);
}

/* Footer links */
.footer-links a {
  margin: 0 10px;
  font-weight: normal;
  font-size: 1rem;
}

/* =========================================
   Media Query: Escritorio (Desktop)
   ========================================= */
@media (min-width: 768px) {
.profile-grid {
    grid-template-columns: 7fr 5fr;
    text-align: left;
    
    /* TRUCO: Repetimos "photo" en la primera y segunda fila.
       CSS Grid fusionará automáticamente esas celdas verticalmente.
    */
    grid-template-areas: 
      "name   photo"  /* Fila 1: Nombre izq, Foto der */
      "links  photo"  /* Fila 2: Enlaces izq, Foto der (Foto continúa aquí) */
      "social desc"
      "footer desc";
  }

  /* Alineamos la foto arriba para que no flote en medio si sobra espacio */
  .area-photo {
    align-self: center; 
    justify-content: center;
  }
  
  /* Ajuste visual: el nombre no necesita margen inferior grande ahora */
  .area-name {
    margin-bottom: 0.5rem; 
  }

  .area-desc {
    text-align: center;
    /* La descripción bajo la foto va centrada */
    align-self: start;
  }

  .social-block {
    justify-content: flex-start;
    /* Alineado a la izquierda en desktop */
  }
}

/* =========================================
   Tarjeta de Recursos (Grid Simple)
   ========================================= */
.resources-header {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.resources-title {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 80%;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.resources-section {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 75%;
  
  display: block;

  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 1 columna en móvil */
  gap: 1.5rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.resource-item img {
  margin-right: 0.5rem;
  width: 24px;
}

@media (min-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr 1fr 1fr;
    /* 2 columnas en desktop */
  }
}