/* ================================================== */
/* === ESTILO MINIMALISTA TIPO ARXIV PAPER (v2) ==== */
/* === Adaptado para CV Personal JM (Layout 3 Líneas Header + Links Header sin estilo) === */
/* ================================================== */

/* --- Reseteo y Base --- */
html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-padding-top: 7.5rem; /* Ajustar según altura final header */
    scroll-behavior: smooth;
}
body {
    margin: 0;
    padding: 0;
    font-family: Georgia, Times, 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.6;
    color: #000000;
    background-color: white;
    padding-top: 0rem; /* Ajustar según altura final header */
}

/* --- Encabezado (Header Multi-Línea) --- */
.site-header.multi-line {
  padding: 0.8em 1.5em;
  position: sticky;
  top: 0; left: 0; right: 0; width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
  box-sizing: border-box;
}

/* Línea 1: Nombre | Controles */
.header-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.5em; /* Espacio que actúa como Línea 2 */
}

.header-name h1 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16pt;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

/* Contenedor para controles de la derecha */
.header-right-controls {
    display: flex;
    align-items: center;
    gap: 0.8em;
    flex-shrink: 0;
}

/* Línea 3: Subtítulo */
.header-subtitle-line {
    text-align: center; /* Centrado */
    width: 100%;
}
.header-subtitle-line p {
   display: block;
   font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
   font-size: 10pt; /* Ajustado */
   color: #444;
   margin: 0;
   line-height: 1.2;
   padding-top: 0.2em;
}

/* === INICIO: Estilos para quitar apariencia de enlace en Header === */
a.header-link-unstyled,
a.header-link-unstyled:link,
a.header-link-unstyled:visited,
a.header-link-unstyled:hover,
a.header-link-unstyled:active {
  color: inherit; /* Hereda color de H1 o P */
  text-decoration: none; /* Sin subrayado */
  cursor: pointer; /* Mantiene cursor de enlace */
}
/* Opcional: asegurar que H1/P dentro del enlace mantenga su estilo */
.header-name h1 a { font-size: inherit; font-weight: inherit; line-height: inherit; }
.header-subtitle-line p a { font-size: inherit; font-weight: inherit; line-height: inherit; }
/* === FIN: Estilos para quitar apariencia de enlace en Header === */


/* --- Selector de Idioma --- */
.language-switcher {
  font-size: 9pt; order: 1; white-space: nowrap; text-align: right;
}
.language-switcher a { color: grey; text-decoration: none;}
.language-switcher a:hover { color: black;}
.language-switcher a[style*="font-weight:bold"] { color: black; }


/* --- Botón Hamburguesa --- */
.hamburger-btn {
  display: block; background: none; border: none; padding: 5px; cursor: pointer; z-index: 1002; order: 2;
  width: 40px; height: 35px; display: flex; flex-direction: column; justify-content: space-around;
}
.hamburger-btn span { display: block; width: 100%; height: 4px; background-color: #333; transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease; border-radius: 1px; }
.hamburger-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.hamburger-btn:hover span { background-color: #000; }


/* --- Menú Navegación Desplegable --- */
.mobile-nav { display: none; position: fixed; top: 0; right: 0; width: 280px; max-width: 80%; height: 100%; background-color: #f8f8f8; border-left: 1px solid #ccc; box-shadow: -2px 0 5px rgba(0,0,0,0.1); padding: 1.5em; box-sizing: border-box; overflow-y: auto; z-index: 1001; }
.mobile-nav.open { display: block; }
.mobile-nav h2 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1.2em; margin-top: 0; margin-bottom: 1em; border-bottom: 1px solid #ddd; padding-bottom: 0.5em; color: #000; text-align: left; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav ul li a { display: block; padding: 0.6em 0; color: #333; text-decoration: none; font-size: 1em; border-bottom: 1px solid #eee; text-align: left; }
.mobile-nav ul li:last-child a { border-bottom: none; }
.mobile-nav ul li a:hover { background-color: #eee; color: black; }
.mobile-nav ul ul { margin-left: 1em; padding-left: 0.5em; border-left: 2px solid #ddd; margin-top: 0.5em; margin-bottom: 0.5em; }
.mobile-nav ul ul li a { font-size: 0.9em; padding: 0.4em 0; color: #555; border-bottom: none; }
.mobile-nav ul ul li:last-child a { padding-bottom: 0.4em; }
.mobile-nav ul ul li a:hover { color: black; }
.mobile-nav.visible { display: block; }


/* --- Contenedor Página Principal --- */
.page-container { display: block; max-width: 900px; margin: 1.5em auto; padding: 0 1em; background-color: white; box-sizing: border-box; }

/* --- Contenido Principal (Main) --- */
main { background-color: #ffffff; padding: 1.5em; border: 1px solid #e0e0e0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); text-align: justify; border-radius: 0; box-sizing: border-box; margin-top: 0; }


/* --- Estilos Comunes (Secciones, Títulos, Listas, etc.) --- */
section { margin-bottom: 1.5em; padding-bottom: 0; border-bottom: none; }
section:last-child { margin-bottom: 0; }
h2, h3, h4, h5, h6 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; margin: 1.8em 0 0.8em 0; text-align: left; border-bottom: none; line-height: 1.3; }
h2 { font-size: 14pt; }
h3 { font-size: 12pt; }
h4 { font-size: 11pt; font-style: italic; }
p { margin-bottom: 1em; }
ul, ol { margin: 0.5em 0 1em 1.5em; padding-left: 1.5em; }
ul { list-style: disc outside; }
ol { list-style: decimal outside; }
ul li, ol li { margin-bottom: 0.3em; padding-left: 0.3em; text-align: justify; }
code { font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-size: 0.95em; background-color: #f0f0f0; padding: 1px 4px; border: 1px solid #e0e0e0; border-radius: 2px; word-break: break-word; color: #1a1a1a; }

/* Estilos Foto y Datos Personales */
.details-container { display: flex; align-items: center; gap: 1.5em; margin-top: 1.5em; margin-bottom: 1em; }
.details-photo-container { flex-shrink: 0; }
.details-list-container { flex-grow: 1; }
.details-list-container ul { margin: 0; padding: 0; list-style: none; } /* Sin viñetas/padding */
.details-list-container li { margin-bottom: 0.6em; text-align: left; padding-left: 0; line-height: 1.4; }
.details-list-container li strong { display: block; font-weight: bold; color: #333; font-size: 0.95em; }
.profile-photo { width: 180px; height: auto; border-radius: 5px; display: block; }

/* Placeholder de Gráficas/Media */
.graph-placeholder { display: block; text-align: center; margin: 1em auto; padding: 1em; border: 1px dashed #ccc; background-color: #f9f9f9; font-style: italic; font-size: 0.9em; color: #555; box-sizing: border-box; }
.graph-placeholder strong { display: block; margin-bottom: 0.3em; font-style: normal; color: #333; }
.graph-placeholder img, .graph-placeholder video { max-width: 100%; height: auto; display: block; margin: 0.5em auto; border: none; }


/* --- Pie de Página --- */
footer { text-align: center; margin: 2em auto 1em auto; max-width: 900px; padding: 1em 1em 0 1em; border-top: 1px solid #ccc; font-size: 9pt; color: #555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
footer a { color: #555; text-decoration: underline;}
footer a:hover { color: black; }

/* --- Links Generales --- */
a { color: grey; text-decoration: none; } /* Color por defecto menú/lang */
main a { color: #0056b3; text-decoration: underline;} /* Color enlaces contenido */
main a:hover { color: #003d80; }
main a:visited { color: #551a8b; }
/* Estilo para quitar apariencia de enlaces en header ya está incluido arriba */


/* --- Botón Volver Arriba --- */
#back-to-top-btn { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 999; border: none; background: none; outline: none; color: #555; cursor: pointer; padding: 5px; border-radius: 4px; opacity: 0.7; transition: opacity 0.3s ease, color 0.3s ease; }
#back-to-top-btn:hover { color: black; opacity: 1; background: none; }
#back-to-top-btn svg { display: block; width: 24px; height: 24px; }


/* ================================================== */
/* === Media Queries (RESPONSIVE) =================== */
/* ================================================== */

@media (max-width: 900px) { /* Para Tablets y móviles grandes */
     body {
         /* Ajusta padding-top si la altura final del header cambia mucho en este tamaño */
         /* padding-top: 5.5rem; */ /* Mantenido de versión anterior, podría ser menos */
          padding-top: 0rem; /* Prueba un valor un poco menor */
     }
     html {
         /* scroll-padding-top: 5.5rem; */
          scroll-padding-top: 5.0rem; /* Debe coincidir con padding-top del body */
     }

     .page-container {
         width: 92%; /* Ancho responsive */
         margin: 1em auto;
         padding: 0;
     }
     main { padding: 1em; border: none; box-shadow: none; }

     /* Header responsive mediano */
     .site-header.multi-line { padding: 0.6em 1em; flex-wrap: wrap; /* Permitir wrap */ }
     .header-top-line { margin-bottom: 0.3em; }
     .header-name h1 { font-size: 14pt; }
     .header-right-controls { gap: 0.5em; } /* Espacio reducido entre idioma y botón */

     /* --- AJUSTE IDIOMAS RESPONSIVE --- */
     .language-switcher {
         order: 1; /* Primero en el grupo derecho */
         width: auto; /* Ocupa solo lo necesario */
         text-align: right; /* Alineado a la derecha */
         padding: 0; /* Sin padding extra */
         margin: 0; /* Sin margen extra */
         font-size: 8pt; /* Tamaño reducido */
     }
     /* --- FIN AJUSTE IDIOMAS --- */

     .hamburger-btn {
         order: 2; /* Después del idioma */
         width: 35px; height: 30px;
         /* Otros estilos del botón sin cambios */
     }
     .hamburger-btn span { height: 3px; }
     .hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
     .hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
     .header-subtitle-line p { font-size: 9pt; padding-top: 0.1em; }

     /* Layout detalles personales: Lado a Lado */
     .details-container { flex-direction: row; gap: 1em; align-items: center; flex-wrap: nowrap; justify-content: flex-start; }
     .profile-photo { width: 150px; }
     .details-list-container li { text-align: left; }
     .details-list-container ul { padding-left: 0; list-style: none; }
     .details-photo-container { margin-bottom: 0; }

     #back-to-top-btn { right: 15px; bottom: 15px; padding: 4px; }
     #back-to-top-btn svg { width: 22px; height: 22px; }
}

@media (max-width: 600px) { /* Móviles más pequeños */
     body { font-size: 10pt; padding-top: 0rem; } /* Menos padding */
     html { scroll-padding-top: 4.5rem; }

     .site-header.multi-line { padding: 0.5em 0.8em; min-height: 0; /* Quitar altura mínima si causa problemas */}
     .header-top-line { margin-bottom: 0.2em; }
     .header-name h1 { font-size: 12pt; }
     .header-right-controls { gap: 0.4em; /* Aún menos espacio */ }

     /* Hereda los estilos corregidos de .language-switcher del breakpoint anterior */
     .language-switcher { font-size: 7pt; } /* Solo ajustamos tamaño si es necesario */

     .hamburger-btn { width: 30px; height: 25px; }
     .hamburger-btn span { height: 2px; }
     .hamburger-btn.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
     .hamburger-btn.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
     .header-subtitle-line p { font-size: 8pt; } /* Subtítulo muy pequeño */

     .page-container { width: 95%; margin: 0.5em auto; }
     main { padding: 0.8em; }

     /* Layout detalles personales: Lado a Lado */
     .details-container { gap: 0.8em; flex-wrap: nowrap; justify-content: flex-start; }
     .profile-photo { width: 130px; }
     .details-list-container li { margin-bottom: 0.3em; line-height: 1.3; }
     .details-list-container li strong { font-size: 0.85em; }

     /* Tamaños fuente contenido */
     h2 { font-size: 12pt; }
     h3 { font-size: 11pt; }

     /* Botón Volver Arriba */
     #back-to-top-btn { right: 10px; bottom: 10px; padding: 3px; }
     #back-to-top-btn svg { width: 20px; height: 20px; }
}

/* ================================================== */
/* === CORRECCIONES PARA FORMULARIOS DE WORKLIVE ==== */
/* ================================================== */

main form label {
    text-align: left; /* Alinea las etiquetas a la izquierda */
    display: block;   /* Asegura que la etiqueta ocupe su propia línea */
    font-weight: bold;/* Opcional: Pone las etiquetas en negrita */
    margin-bottom: 0.5em; /* Añade un pequeño espacio debajo de la etiqueta */
}

